Leaflet airplane markers finally fixed?

This commit is contained in:
Marat Fayzullin 2023-09-28 22:41:39 -04:00
parent a8df56665e
commit a822fac904
2 changed files with 3 additions and 6 deletions

View File

@ -8,14 +8,11 @@ function LMarker () {
LMarker.prototype.onAdd = function() {
this.div = this.create();
var offset = this.getAnchorOffset();
var size = this.getSize();
this.setIcon(L.divIcon({
html : this.div,
iconSize : size,
// iconAnchor : [size[0]/2, size[1]/2],
popupAnchor : offset,
iconSize : this.getSize(),
popupAnchor : this.getAnchorOffset(),
className : 'dummy'
}));
};

View File

@ -756,7 +756,7 @@ AircraftMarker.prototype.getAnchorOffset = function() {
};
AircraftMarker.prototype.getSize = function() {
return [72 * this.scale, 72 * this.scale];
return [72, 72];
};
AircraftMarker.prototype.getInfoHTML = function(name, receiverMarker = null) {