Planit.js

relativePosition ()

Class: Marker

Returns the position of the marker as a percentage of 100, relative to the top left of the container.

Returns: An array of coordinates as [xPc, yPc]

Example

// assuming you already have access to `marker` as a Marker object
marker.relativePosition() // will return something like [64.22, 31.255]