move a circlemarker's popup with each new position.
This commit is contained in:
parent
b313165cca
commit
e5bf57c4f7
@ -22,6 +22,13 @@ L.CircleMarker = L.Circle.extend({
|
||||
this.setRadius(this.options.radius);
|
||||
},
|
||||
|
||||
setLatLng: function (latlng) {
|
||||
L.Circle.prototype.setLatLng.call(this, latlng);
|
||||
if (this._popup && this._popup._isOpen) {
|
||||
this._popup.setLatLng(latlng);
|
||||
}
|
||||
},
|
||||
|
||||
setRadius: function (radius) {
|
||||
this.options.radius = this._radius = radius;
|
||||
return this.redraw();
|
||||
|
Loading…
Reference in New Issue
Block a user