This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Tap gesture recognizer for style layers #6515
Labels
archived
Archived because of inactivity
feature
iOS
Mapbox Maps SDK for iOS
macOS
Mapbox Maps SDK for macOS
runtime styling
As discussed in #6505, implementing interactive style layers (for use with the runtime styling API) is a lot more involved than implementing interactive annotations. We can mitigate the pain by offering subclasses of UITapGestureRecognizer and NSClickGestureRecognizer that only send their actions when tapping or clicking on a feature within the map view – and that make it easier to get the tapped/clicked feature.
MGLFeatureTapGestureRecognizer and MGLFeatureClickGestureRecognizer would have a
layerIdentifiers
property for filtering taps by layer and a-featureInMapView:
method for getting the tapped/clicked feature from within the action method.This is essentially the iOS/macOS equivalent to mapbox/mapbox-gl-js#1002.
/cc @frederoni @incanus
The text was updated successfully, but these errors were encountered: