Lose search or custom basemaps in BasemapGallery when going from 4.18 to 4.19

170
2
08-18-2022 08:47 AM
BrentGrossman
New Contributor III

I updated an application I've been working on for a while, from API version 4.18 to 4.19. When I did that, my Search widget no longer worked (there was some sort of message above the widget about no results available). I was able to fix that by removing my developer apiKey from my code (that was the standard esriConfig.apiKey = ...), but that made unavailable some basemaps that I explicitly added to my BasemapGallery widget (via this code: source: [that.Basemap.fromId("topo-vector"), that.Basemap.fromId("arcgis-imagery"), that.Basemap.fromId('osm-streets')]). The latter 2 basemaps appeared dithered in the gallery and some errors appeared in the developer console.

Putting my apiKey in the Search widget instantiation didn't help the situation. For the time being, I don't have my apiKey in the code and am just letting all default basemaps appear in the gallery, and everything is working.

I'd say this is a minor issue given the effect it's had and the small compromise I've had to make (all basemaps instead of the few I want), but thought that I should bring it to light.

0 Kudos
2 Replies
AnneFitz
Esri Contributor

Hi @BrentGrossman - Is your API key configured with the geocoding location service? This may be why search is not currently working for you. If you enable geocoding, both search and the basemaps should work when you have the global API key set (esriConfig.apiKey = ...)

0 Kudos
BrentGrossman
New Contributor III

Thanks, @AnneFitz. I think I have geocoding enabled:

BrentGrossman_0-1660937045740.png

Interestingly, though, I created a second key, and I can't add geocoding (stored or not) to that one, as I get an indication that I don't have sufficient privileges to do so, when I try.

0 Kudos