-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[iOS] Support callout for POI (public transport stops, etc) #5432
Comments
Related #5110 |
With #5110 in v3.3.0-beta.1, you could install a tap gesture recognizer to query for rendered bus stops at the tapped location, assuming that you’re displaying a style that renders bus stops, and add an annotation and callout if you find a bus stop that way. The documentation for We could consider automatically doing this only for Mapbox Streets–based styles, but source-specific logic depends on #5368, which we haven’t hooked up to the iOS SDK yet. |
POI is already rendered in the Map. Adding a dummy annotation to simply facilitate the callout presentation flow does not look like a good architectural choice.
|
At the moment, we’re trading off convenience for customizability. A built-in tappable POI feature wouldn’t make sense when the map is showing a style that doesn’t use Mapbox Streets, such as (pure) Satellite, or a custom Mapbox Studio style that happens to hide bus stops. In these cases, the map simply doesn’t have the data it would need to find the bus stop. You’re right that adding annotations to the map, as I suggested above, would be duplicative. Perhaps it would make more sense to expose an API for displaying callouts that aren’t attached to annotations. Mapbox GL JS has had this API for awhile. It would be much more feasible in the iOS SDK once we implement #4392. In the meantime, as things stand in v3.3.0-beta.1, you could indeed specify an invisible annotation view (in |
I still do not understand your concern about the case when POIs are not displayed/hidden. If map does not have/does not show POIs, it does not call any delegate callout method for those annotations. That simple.
Or somethings like that to make sure delegate wants to receive callbacks when POIs are clicked. |
My point is that we’d be writing a feature specifically for the Mapbox Streets source, which is one out of many potential sources. I’m not ruling out the feature you’re requesting. Rather, in v3.3.0, the platform-specific code just doesn’t have the ability to know what source is being loaded, so it doesn’t know that, for example, |
#6515 would simplify the process of detecting the tap and associating it with a feature, but #4392 would still be required for making the callout functionality modular enough to work with non-annotations. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
SDK should have a functionality to display callouts (including custom ones) for a different POIs preferably public transport stops.
Platform: iOS
Mapbox SDK version: 3.2.2
Steps to trigger behavior
User taps on the public transport stop
Expected behavior
Actual behavior
No callbacks are called to MapView delegate
The text was updated successfully, but these errors were encountered: