Planit.js

position ()

Class: Marker

Returns the position of the marker as a percentage of 100, relative to the top left of the image if there is an image, otherwise it is 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.position() // will return something like [64.22, 31.255]