Leaflet airplane markers finally fixed?
This commit is contained in:
parent
a8df56665e
commit
a822fac904
|
|
@ -8,14 +8,11 @@ function LMarker () {
|
||||||
|
|
||||||
LMarker.prototype.onAdd = function() {
|
LMarker.prototype.onAdd = function() {
|
||||||
this.div = this.create();
|
this.div = this.create();
|
||||||
var offset = this.getAnchorOffset();
|
|
||||||
var size = this.getSize();
|
|
||||||
|
|
||||||
this.setIcon(L.divIcon({
|
this.setIcon(L.divIcon({
|
||||||
html : this.div,
|
html : this.div,
|
||||||
iconSize : size,
|
iconSize : this.getSize(),
|
||||||
// iconAnchor : [size[0]/2, size[1]/2],
|
popupAnchor : this.getAnchorOffset(),
|
||||||
popupAnchor : offset,
|
|
||||||
className : 'dummy'
|
className : 'dummy'
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -756,7 +756,7 @@ AircraftMarker.prototype.getAnchorOffset = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
AircraftMarker.prototype.getSize = function() {
|
AircraftMarker.prototype.getSize = function() {
|
||||||
return [72 * this.scale, 72 * this.scale];
|
return [72, 72];
|
||||||
};
|
};
|
||||||
|
|
||||||
AircraftMarker.prototype.getInfoHTML = function(name, receiverMarker = null) {
|
AircraftMarker.prototype.getInfoHTML = function(name, receiverMarker = null) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue