Marker#openPopup

This commit is contained in:
Mourner 2011-01-11 17:51:02 +02:00
parent 0cd810bbb1
commit 663620efed

View File

@ -1,12 +1,15 @@
L.Marker.include({
openPopup: function(content) {
this._map.openPopup(this._latlng, content, this.options.icon.popupAnchor);
},
bindPopup: function(content) {
this._popupContent = content;
this.on('click', this._onMouseDown, this);
},
_onMouseDown: function() {
this._map.closePopup();
this._map.openPopup(this._latlng, this._popupContent, this.options.icon.popupAnchor);
this.openPopup(this._popupContent);
}
});