Comments (6)
Alternatively, it could be simplified by taking a binding to the selected bookmark as an initializer parameter, giving the caller flexibility to do whatever they want when the selected bookmark is updated (onChange(of selectedBookmark) { … }
). I think that would be better than taking a binding to a viewpoint.
from arcgis-maps-sdk-swift-toolkit.
Yes - I still think we should do it and I thought we had an issue for it but I'm not seeing it so I'll reopen and re-characterize this issue instead.
from arcgis-maps-sdk-swift-toolkit.
The selection parameter should be non-optional because those initializers should only be used with a selection binding. In my opinion, having four initializers isn't a big deal. Several SwiftUI views have much more than four initializers.
from arcgis-maps-sdk-swift-toolkit.
Closing; onSelectionChanged(perform:)
is provided
from arcgis-maps-sdk-swift-toolkit.
@dfeinzimer Was there any consideration given to taking a binding to the selection? While there is the modifier that you pointed out, taking a binding to the selected bookmark would be simpler and more idiomatic in SwiftUI. Many SwiftUI-provided modifiers take a selection binding instead of providing a separate modifier to inform when the selection has changed.
from arcgis-maps-sdk-swift-toolkit.
Some additional API considerations:
The current initializers are:
init(isPresented: Binding<Bool>, bookmarks: [Bookmark], viewpoint: Binding<Viewpoint?>?)
&
init(isPresented: Binding<Bool>, bookmarks: [Bookmark], viewpoint: Binding<Viewpoint?>?)
Would we want to add 2 new initializers:
init(isPresented: Binding<Bool>, bookmarks: [Bookmark], selection: Binding<Bookmark?>?)
&
init(isPresented: Binding<Bool>, geoModel: GeoModel, selection: Binding<Bookmark?>?)
brining us to a total of 4? 4 seems like it would be a lot to me.
from arcgis-maps-sdk-swift-toolkit.
Related Issues (20)
- BasemapGallery - Support auto-dismiss on selection HOT 1
- Search Results Overlay Should be State Variable
- Basemap Gallery Re-queries the portal every time it's shown HOT 2
- Scalebar recalculates and resizes several times during a double-tap zoom operation HOT 1
- Floating Panel Animation Differs From Built-In Sheet HOT 2
- Extra space at the end of `PopupView` HOT 2
- Bottom toolbar covers floating panel HOT 1
- 200.4.0 package resolution failure HOT 5
- `Scalebar` - Various revisions
- Add linting phase to TestRunner
- Enable User Script Sandboxing
- `CertificatePickerViewModelTests.testViewModel()` fails with Xcode 15.0
- `FloorFilter` - `NavigationStack` incompatibility
- API Key documentation needed HOT 4
- Make `Result.init(awaiting:)` internal
- Previews are broken HOT 2
- Apple map
- 18BluntWrapz
- Xcode 16 warnings HOT 1
- `UtilityNetworkTraceViewModelTests.testCase_2_x` failures
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arcgis-maps-sdk-swift-toolkit.