Planit.js

savePosition ()

Class: Marker

Planit likes to save values within data attributes on the marker. This method saves the current position (by calling position()) in data-xpc and data-ypc attributes on the marker's container.

It returns the coordinates to you.

Returns: Array of coordinates as [xPc, yPc]

Example

// assuming you already have access to `marker` as a Marker object
marker.savePosition()