simplegeo / polymaps

Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers.
http://polymaps.org/
Other
1.6k stars 213 forks source link

layer zoom event #98

Open kueda opened 13 years ago

kueda commented 13 years ago

It would be very useful to be able to observe zoom level changes on layers. I'm trying to keep a layer of points scaled by values in meters, so I need to recalculate the radii whenever the zoom level changes. I can work around this by observing the 'move' event on the map object and keeping track of the last zoom level, but that seems clunky. Am I missing a better way to do this? If not, how about adding this event?

stefl commented 12 years ago

I'd also like to be able to do this - I'm aggregating data into a heatmap geojson overlay, and knowing the level of zoom is useful for efficiency.

RyanEwen commented 12 years ago

I am also observing the 'move' event and checking for the zoom level as this happens, but I am happy with that. It doesn't seem too clunky, but a specific 'zoom' event wouldn't hurt, either.

hamroune commented 12 years ago

hi all, is there any workaround to check the zoom events?