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

Feature highlight on click for polygons without any unique properties. #2210

Closed
divya1c opened this issue Mar 1, 2016 · 3 comments
Closed

Comments

@divya1c
Copy link

divya1c commented Mar 1, 2016

mapbox-gl-js version: v0.14.1

Hi!

I am trying to implement a 'highlight feature' using mapbox gl js. I saw this example - https://www.mapbox.com/mapbox-gl-js/example/hover-styles/. But, the problem is that my polygons do not have any properties that are unique to the polygon (unlike the name property in the example). Is there a way to filter based on geometry? Or any other way to highlight or change the paint property of the feature on click?

Thanks!

@jfirebaugh
Copy link
Contributor

Nope; you'll need to add some identifying property to the data.

@jbibla
Copy link

jbibla commented Oct 21, 2016

@jfirebaugh what would you recommend if it's not possible to add an identifying property (because i'm displaying third party data)?

@lucaswoj
Copy link
Contributor

@jolesbi the feature you're requesting is #200. It's something we'd love to build but haven't yet had the time.

Have you checked if your features have a unique id field? mapbox/mapbox-gl-style-spec#391

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

4 participants