evoverbeeke / beniatlas-repository

1 stars 3 forks source link

Zoom to extents of neighbourhood when click on feature #6

Open evoverbeeke opened 9 years ago

evoverbeeke commented 9 years ago

@acabunoc I still haven't resolved the zoom to extents. https://github.com/evoverbeeke/beniatlas-respository/blob/master/javascript/beniatlas.js#L786

When in the "neighbourhood" from "select a place" I want to be able to click on a neighbourhood boundary to zoom to the extents of that boundary. So far I have gotten the style to change when clicking and hovering on the boundaries.

The problem could be in several places:

abbycabs commented 9 years ago

This may help: http://gis.stackexchange.com/questions/24597/openlayers-zoom-to-selected-feature

evoverbeeke commented 9 years ago

Thanks for your help @acabunoc! This is definitely one step closer. No matter what I do though I can't seem to resolve the two-click issue. I've tested it and it requires two clicks as a rule. https://github.com/evoverbeeke/beniatlas-repository/blob/master/javascript/beniatlas.js#L789

abbycabs commented 9 years ago

Two click thing is SO STRANGE. You might have to remove the style change on click? Maybe it can only hear one click at a time? Anyways, I have some time this weekend I'll take a look again. So curious.