add layer getElement methods
This commit is contained in:
parent
c4b6e79fa4
commit
8ffbb707c6
@ -101,6 +101,10 @@ L.ImageOverlay = L.Layer.extend({
|
||||
return this._bounds;
|
||||
},
|
||||
|
||||
getElement: function () {
|
||||
return this._image;
|
||||
},
|
||||
|
||||
_initImage: function () {
|
||||
var img = this._image = L.DomUtil.create('img',
|
||||
'leaflet-image-layer ' + (this._zoomAnimated ? 'leaflet-zoom-animated' : ''));
|
||||
|
@ -103,6 +103,10 @@ L.Popup = L.Layer.extend({
|
||||
return this;
|
||||
},
|
||||
|
||||
getElement: function () {
|
||||
return this._container;
|
||||
},
|
||||
|
||||
update: function () {
|
||||
if (!this._map) { return; }
|
||||
|
||||
|
@ -82,6 +82,10 @@ L.Marker = L.Layer.extend({
|
||||
return this;
|
||||
},
|
||||
|
||||
getElement: function () {
|
||||
return this._icon;
|
||||
},
|
||||
|
||||
update: function () {
|
||||
|
||||
if (this._icon) {
|
||||
|
@ -74,6 +74,10 @@ L.Path = L.Layer.extend({
|
||||
return this;
|
||||
},
|
||||
|
||||
getElement: function () {
|
||||
return this._path;
|
||||
},
|
||||
|
||||
_clickTolerance: function () {
|
||||
// used when doing hit detection for Canvas layers
|
||||
return (this.options.stroke ? this.options.weight / 2 : 0) + (L.Browser.touch ? 10 : 0);
|
||||
|
Loading…
Reference in New Issue
Block a user