Marker#openPopup
This commit is contained in:
parent
0cd810bbb1
commit
663620efed
@ -1,12 +1,15 @@
|
|||||||
|
|
||||||
L.Marker.include({
|
L.Marker.include({
|
||||||
|
openPopup: function(content) {
|
||||||
|
this._map.openPopup(this._latlng, content, this.options.icon.popupAnchor);
|
||||||
|
},
|
||||||
|
|
||||||
bindPopup: function(content) {
|
bindPopup: function(content) {
|
||||||
this._popupContent = content;
|
this._popupContent = content;
|
||||||
this.on('click', this._onMouseDown, this);
|
this.on('click', this._onMouseDown, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onMouseDown: function() {
|
_onMouseDown: function() {
|
||||||
this._map.closePopup();
|
this.openPopup(this._popupContent);
|
||||||
this._map.openPopup(this._latlng, this._popupContent, this.options.icon.popupAnchor);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user