Basemap Gallery Custom Widget

587
2
01-07-2026 09:22 AM
Brian_McLeer
MVP Regular Contributor
2 2 587

The Basemap Gallery Custom widget provides some additional functionality from the out of the box Basemap Gallery widget to give developers more customization. 

https://github.com/brianmcleer/basemap-gallery-custom-widget

- Display items in thumbnail or list options

- 5 size settings for list/thumbnails

- Import/Export XML files to transfer widget settings across applications

- Change order of basemaps in list

- Set default basemap for application load

- WCAG compliance

(view in My Videos)

2 Comments
KeyHunter
Occasional Contributor

Hey Brian,

When testing the Base Gallery custom for EB 1.20, I am getting a [Name is duplicated] when I run npm start on the client folder. When I remove it I do not get any indication it has been added to the Entrypoint list. 

With both starts, the tool does not work. 

I think I have jacked up the naming conventions, but can't seem to track down where and why a fresh new basemap-gallery-custom does not resolve the issue. 

Update: 

I thought it was because in my 1.19 build I inadvertently loaded the tool in with this pathway: \client\your-extensions\widgets\basemap-gallery-custom\basemap-gallery-custom

I tried to replicate that pathway for a new 1.20 build, but am still getting the same results. I am at a bit of a loss on how to clean up the 1.20 build and fear a fresh install of 1.20 to reset it. 

Brian_McLeer
MVP Regular Contributor

Hello @KeyHunter, thanks for the detailed writeup, that nesting clue is exactly the right thread to pull. The "is duplicated" message comes from the build scanning your-extensions\widgets and finding the same manifest name registered twice, so somewhere there are two copies. A single correctly placed copy can't trip it, which is why a fresh basemap-gallery-custom on its own doesn't fix it: the second copy is still sitting elsewhere.

Three places to check, in order: a nested folder at widgets\basemap-gallery-custom\basemap-gallery-custom (the manifest has to be one level up, directly inside basemap-gallery-custom); any leftover folder from your 1.19 build, including an old basemapToggleCustom folder this widget was renamed from; and a stale compiled copy in client\dist\widgets carried over from 1.19. For that last one, stop the client, delete the matching folder under dist\widgets, then npm start again. Your "remove it and nothing shows in the Entrypoint list" symptom is the tell that the copy you kept is nested too deep.

I also just standardized this widget and put it on this blog post and GitHub with a README that walks through install placement and this exact error: https://github.com/brianmcleer/basemap-gallery-custom-widget. Grab the v1.0.0 release, drop the folder in so the manifest sits directly inside basemap-gallery-custom, and you should be set. Let me know how it goes.

Contributors
About the Author
GIS Administrator/Developer at City of Grand Junction, CO.