-
Notifications
You must be signed in to change notification settings - Fork 3
Switch of basemaps doesn't work properly when using multiple webmaps #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for reaching out. Since this is more of a UI/View model issue, would you mind moving this issue to toolkit repo or asking on Esri Community? Also, please clarify
Thank you |
Thank you for the quick response. We decided to ask here because we aren't sure if it is an sdk issue related to different/multiple map initializations. So everything is working fine when using one webmap, but if we initialize another one, it's not working properly anymore.
|
cc @mhdostal |
@mmoosbac94 I was able to reproduce the behavior you're seeing. A There's one other solution that @rolson mentioned: if you set the basemap of the existing map to Let us know if you have any more issues! |
Oh yes! Very nice. It's working now if we set basemap to nil prior creating a new map with same basemap. But it only seems to work when we use a custom solution for displaying the selection of basemaps. So when we use the BasemapGallery from ArcGIS Toolkit for a second map it is not working. Maybe the BasemapGallery is only meant to cover one map with basemaps. Thank you very much for your quick help and reply! |
@mmoosbac94 I just merged a PR into the Toolkit's You could employ the same solution when using your custom method for selecting basemaps. Just call Hope that helps. |
With version 200.1 we currently have the issue that the switch of basemaps (also when using basemap-gallery) doesn't work when using multiple webmaps. So we have a viewmodel where we create Map using Map(item: ...). The basemaps are working correctly. When we then switch to another webmap also using Map(item: ...) and so override map in viewModel the switch of basemaps doesn't work properly anymore (so one basemap can be selected, the other cannot). Same issue with the Basemap-gallery (here even both basemaps cannot be selected).
e.g.
we first fetch default webmap with "item: PortalItem(portal: portal, id: PortalItem.ID("...")!) and after that we load portalItems/webmaps from portal manually with "findItems" and set selected map also in viewmodel.
It's working when we first load all portalItems/webmaps with "findItems" and then choose a portalItem with specific ID.
The text was updated successfully, but these errors were encountered: