Hey all -
I've got my maps working, now dealing with more visual issues. One thing I'm trying to tweak is the location of popups. I have this code:
var popup = new L.Popup({
closeOnClick: true,
autoPan: true,
closeButton: false,
autoPanPadding: [10,10]
})
.setLatLng(this.latlng)
.setContent(infowindow_html);
listingmarker.bindPopup(popup).openPopup();
and it works fine, but the popup is shifted over from where I want it "on" my icon. So I try to use the offset argument:
var offset = [0, 6];
var popup = new L.Popup({
offset: offset,
closeOnClick: true,
autoPan: true,
closeButton: false,
autoPanPadding: [10,10]
})
.setLatLng(this.latlng)
.setContent(infowindow_html);
And nothing changes, the popup still comes up at the same position relative to my icon. Putting large offsets (40 or -40)
doesn't make any difference.
Any thoughts? What am I messing up here?
thanks,
Andy