-
Notifications
You must be signed in to change notification settings - Fork 429
Open
Description
The initial coordinates of marker label is determined in the Marker class constructor:
x: this.labelX,
y: this.labelY
While in updateLabelPosition
the position is determined using a more complex calculation:
x: this.labelX * this.map.scale + this.offsets[0] +
this.map.transX * this.map.scale + 5 + (this.isImage ? (this.shape.width || 0) / 2 : this.shape.properties.r),
y: this.labelY * this.map.scale + this.map.transY * this.map.scale + this.offsets[1]
This leads to the situation for the us_mill_en map that the label position is wrong when the map is loaded, but is fixed when the map is zoomed or panned.
It can be fixed by calling updateLabelPosition
in the constructor.
Metadata
Metadata
Assignees
Labels
No labels