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

Query visible features in a single MGLStyleLayer #6520

Closed
1ec5 opened this issue Sep 29, 2016 · 4 comments
Closed

Query visible features in a single MGLStyleLayer #6520

1ec5 opened this issue Sep 29, 2016 · 4 comments
Labels
archived Archived because of inactivity feature iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling

Comments

@1ec5
Copy link
Contributor

1ec5 commented Sep 29, 2016

#6514 will add additional options for querying features by source rather than (or in addition to) by layer. We’ll need to add additional methods to MGLMapView like -[MGLMapView visibleFeaturesAtPoint:inSourcesWithIdentifiers:] and -[MGLMapView visibleFeaturesInRect:inSourcesWithIdentifiers:].

/cc @boundsj @frederoni

@1ec5 1ec5 added feature iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling labels Sep 29, 2016
@1ec5 1ec5 changed the title Query rendered features in sources Query visible features in sources Sep 29, 2016
@1ec5
Copy link
Contributor Author

1ec5 commented Sep 29, 2016

This gets me thinking: most of the time, a developer is querying either a set of layers that are baked into the style or a single layer that they’ve added at runtime. It would be more convenient and object oriented to be able to say:

-[MGLStyleLayer visibleFeaturesAtPoint:]
-[MGLStyleLayer visibleFeaturesInRect:]
-[MGLSource visibleFeaturesAtPoint:]
-[MGLSource visibleFeaturesInRect:]

@1ec5
Copy link
Contributor Author

1ec5 commented Sep 29, 2016

Per #5110 (comment), we may also want to consider a new API that takes an MGLFeatureQuery object or somesuch, to stop the proliferation of querying methods on MGLMapView.

@1ec5
Copy link
Contributor Author

1ec5 commented Oct 7, 2016

#6514 ended up taking a different approach. Repurposing this ticket to cover the MGLStyleLayer convenience methods described in #6520 (comment):

-[MGLStyleLayer visibleFeaturesAtPoint:]
-[MGLStyleLayer visibleFeaturesInRect:]

@1ec5 1ec5 changed the title Query visible features in sources Query visible features in a single MGLStyleLayer Oct 7, 2016
@stale stale bot added the archived Archived because of inactivity label Nov 16, 2018
@stale
Copy link

stale bot commented Nov 23, 2018

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Nov 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived Archived because of inactivity feature iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling
Projects
None yet
Development

No branches or pull requests

1 participant