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
28 stars 7 forks source link

BasemapGallery - Support auto-dismiss on selection #671

Open dfeinzimer opened 4 months ago

dfeinzimer commented 4 months ago

cc @rolson

rolson commented 4 months ago

I'd like to be able to do something like this:

        .sheet(isPresented: $isBasemapGalleryPresented) {
            BasemapGallery(portal: portal!, geoModel: map)
                .style(.grid(maxItemWidth: 100))
                .onBasemapSelection {
                    isBasemapGalleryPresented = false
                }
        }

Also, I am not sure the geoModel parameter makes sense as nullable currently without something like onBasemapSelection. Otherwise, how would a user make any use of the BasemapGallery?