CloudMade/Leaflet — Issue #490: Proper method to overlay arbitrary elements on the map
Author: tmcw
Created: 2012-02-15 17:32:06+00:00
State: open

Hey @mourner, how's it going :) congrats on the Leaflet progress. That's a lot of watchers!

Just a quick q: so in [Wax](http://github.com/mapbox/wax) I support adding popups to maps from a non-vector source (UTFGrid data) and those popups generally go in the map parent, for MM/Leaflet/OL/Google Maps. This has been okay in MM, since some additional code ensures that the map only pans or reacts to user input when the actual event target is a map tile, rather than overlaid content. I'm not sure whether this'd be viable to implement in Leaflet, or whether it'd even make sense - if Wax should instead be absolute-positioning an element over the map div rather than in it - opening itself up to a different class of problems but at least avoiding the event-bubbling problem.

Have you run into this problem before with overlaid elements? Any ideas as far as the best solution?