Planit.js

positionInfobox ()

Class: Marker

This will move the infobox if it needs to be moved. It runs infoboxCoords to check its position and then sets a new position.

It will send you back the output of position(), or the position of the marker, not the infobox.

Note: This is run automatically whenever set() is called, or when a plan is dragged or zoomed.

Returns: position()

Example

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