Topic: Marker position

I am sure it is simple, but I cannot find the code needed. I am using online maps in a 2D situation and in the inspector I use a marker indicating the current position. I Would like to retrieve the longitude, latitude and altitude of the current marker position.

Where should I look?

Jaap van Driel

Re: Marker position

Hello.

2D markers have only latitude and longitude.
To get them use OnlineMapsMarkerBase.GetPosition or OnlineMapsMarkerBase.position.
https://infinity-code.com/doxygen/onlin … 20d4968b61
https://infinity-code.com/doxygen/onlin … 0a8c559dcd

3D markers can have altitude.
Latitude and longitude are obtained in the same ways as for 2D markers.
To get altitude use OnlineMapsMarker3D.altitude.
https://infinity-code.com/doxygen/onlin … 1b4998fa1e

Examples of working with markers can be found in the atlas of examples:
https://infinity-code.com/atlas/online- … tml#Marker

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.