cutting-room-floor / markers.js

DEPRECATED: USE MAPBOX.JS
http://mapbox.com/mapbox.js
BSD 3-Clause "New" or "Revised" License
18 stars 9 forks source link

Marker drawn callback fired too early? #51

Closed tmcw closed 11 years ago

tmcw commented 11 years ago

Is there any reason why the marker 'drawn' callback is fired before the markers are repositioned? I'm trying to pan the map the the center of my custom tooltip window (instead of panning to the coordinates it is attached to, so that the entire marker windows is guaranteed to be visible), but that requires the tooltip window / marker to be positioned correctly on the drawn callback so that it could correctly calculate the offset.

Offending line is here: https://github.com/mapbox/mapbox.js/blob/master/dist/dev/mapbox.uncompressed.js#L8234

(from https://github.com/mapbox/mapbox.js/issues/153 )