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

problem making a clickable marker #718

Closed
RobertZiegler opened this issue Aug 20, 2014 · 1 comment
Closed

problem making a clickable marker #718

RobertZiegler opened this issue Aug 20, 2014 · 1 comment
Assignees

Comments

@RobertZiegler
Copy link

heres one example. click on the circle, and you only see the layers below it. am i missing somethign or should the example work. ive tried several other implementations using addSource, and cannot make a working example :-/

http://jsfiddle.net/k5y3n1yf/

@ansis
Copy link
Contributor

ansis commented Aug 20, 2014

Thanks for the example! 9566050 should fix interactivity for geojson layers.

Currently interactivity is based on the geometries instead of their size on the map, so you'll need to add a radius parameter. Points within that radius will get returned.

map.featuresAt(e.point, { radius: 20 }, function(err, res) {});

#316 will hopefully make this easier

@ansis ansis closed this as completed Aug 20, 2014
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