Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Introduce visible annotations API #6061

Merged
merged 3 commits into from
Oct 27, 2016

Conversation

boundsj
Copy link
Contributor

@boundsj boundsj commented Aug 17, 2016

This adds an API for getting all annotations that are currently visible on the map. We can also add an additional API to query by a specific rect. That API can be used internally to power this one.

This also adds a new option to iosapp to test the feature.

Fixes #5467

@boundsj boundsj added iOS Mapbox Maps SDK for iOS ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold annotations Annotations on iOS and macOS or markers on Android labels Aug 17, 2016
@boundsj boundsj added this to the ios-v3.4.0 milestone Aug 17, 2016
@boundsj boundsj self-assigned this Aug 17, 2016
@1ec5
Copy link
Contributor

1ec5 commented Aug 17, 2016

MGLMapView's accessibility hint also says the number of visible annotations. It currently does so using a different API. Maybe it should be migrated over to this API? Not sure.

@boundsj
Copy link
Contributor Author

boundsj commented Aug 18, 2016

Since -[MGLMapView accessibilityAnnotationCount] just goes after the count, it may be better to just leave it as is instead of using the new visibleAnnotations method that creates, populates, and returns an NSArray of annotations.

@boundsj boundsj force-pushed the boundsj-accessor-for-visible-views branch from c2a7ec8 to 16da44f Compare August 24, 2016 23:52
@boundsj boundsj force-pushed the boundsj-accessor-for-visible-views branch from bae2717 to 861c066 Compare October 17, 2016 20:39
@boundsj
Copy link
Contributor Author

boundsj commented Oct 17, 2016

I rebased to include #6627 and this is a lot closer. The visible annotations query result works as expected except when the map is tilted. In that case, annotations are still returned as visible even when they are slightly offscreen. This does work now for all other cases (i.e. not tilted, with or without rotation)

@boundsj boundsj force-pushed the boundsj-accessor-for-visible-views branch from 861c066 to 9ed7757 Compare October 26, 2016 22:04
@boundsj boundsj added macOS Mapbox Maps SDK for macOS ✓ ready for review and removed ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold labels Oct 26, 2016
@boundsj boundsj changed the base branch from master to release-ios-v3.4.0 October 26, 2016 22:06
@boundsj
Copy link
Contributor Author

boundsj commented Oct 26, 2016

Resuming this since #6055 is fixed.

@boundsj boundsj changed the title [WIP] Introduce visible annotations API Introduce visible annotations API Oct 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
annotations Annotations on iOS and macOS or markers on Android iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants