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() { 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'
})); }));
}; };

View File

@ -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) {