Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visibility as a property on the Features for a GeoJSON source #1786

Closed
steinbachr opened this issue Dec 2, 2015 · 1 comment
Closed

Visibility as a property on the Features for a GeoJSON source #1786

steinbachr opened this issue Dec 2, 2015 · 1 comment

Comments

@steinbachr
Copy link

Given a GeoJSON source with a bunch of features we want to render as symbols, it would be good to have a property appended to each feature, isVIsible, designating whether that feature is currently visible or not. The issue is especially important for cases when trying to select features within a given boundary by using featuresAt or featuresWithin. Without this identifier, it's impossible to tell whether the features selected are visible or currently being hidden without doing the extra and - seemingly unnecessary - steps of:

  1. checking which of the selected features intersect each other at the current zoom
  2. for those that intersect, comparing drawing order and only selecting the feature drawn first

See fiddle here for example of issue.

Note: This all assumes icon-allow-overlap: false on the layer, otherwise this is a non-issue

@jfirebaugh
Copy link
Contributor

Duplicate of #582.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants