Esri / arcgis-maps-sdk-swift-toolkit

Mapping components that will simplify your Swift app development with the ArcGIS Maps SDK for Swift.
https://developers.arcgis.com/swift
Apache License 2.0
29 stars 9 forks source link

OverviewMap does not change when switching basemaps on the original map #858

Closed rolson closed 2 months ago

rolson commented 2 months ago

The OverviewMap control is great. I have noticed, however, that if you switch basemaps, the overview map component doesn't also switch. Should it?

image
dfeinzimer commented 2 months ago

I believe for this you'd use the optional map parameter on forMapView(with:visibleArea:map:) or forSceneView(with:map:).

philium commented 2 months ago

We are currently using arcGISTopographicBase for the basemap style. For the case where the user hasn't provided their own map, we could switch to using a style with a dark equivalent and then automatically switch between the two.

dfeinzimer commented 2 months ago

For the case where the user hasn't provided their own map, we could switch to using a style with a dark equivalent and then automatically switch between the two.

@philium Wouldn't the component then need a method of tracking the current primary basemap?

philium commented 2 months ago

No. We would just need to know what the current mode is (light/dark), which we could get from SwiftUI.

rolson commented 2 months ago

Sorry, the map I tested this with was topo, and so I thought that overview map used the same as the regular map (I'm not sure how I thought that was happening technically, magic?). Closing since the behavior I was asking for was based on a misunderstanding of the intention of this component.