Topic: Getting Marker Positions as a Vector3
Hello,
I have been using OnlineMaps for some dev work and I am hoping someone can assist me with getting the location of a OnlineMapsMarker3D marker ( I have added many markers to the map with altitude). I create many markers on the map with altitude and I want to get the markers world position and not where it is living on the map. I want to connect these markers with a lineRenderer ( not draw on the map ) and I know how to do it fine outside of OnlineMaps..but the issue is that as soon as I add the marker to the map and start to query for its position I cannot get the actual position. I have looked at MARKER.instance.transform.position and MARKER.transform.position but things do not appear to pass back the actual transform of the OnlineMapsMarker3D.
Inside of a loop I am doing:
OnlineMapsMarker3D fishLoc = OnlineMapsMarker3DManager.CreateItem(nLng, nLat, bearingGameObject);
fishLoc.altitudeType = OnlineMapsAltitudeType.absolute;
fishLoc.altitude = showBelowWater ? val.z : -val.z;
fishLoc.sizeType = OnlineMapsMarker3D.SizeType.meters;
fishLoc.scale = 100f;
..then I am trying to get the world position of the marker I just added ( something like):
vector3 actualWorldLoc = fishLoc.transform.position; // or fishLoc.instance.transform.position
..the issue I am having is that it is not giving me back the actual position of the markers as is noted in the inspector when I look at the marker on the 'marker' section of the map. The inspector values all seem accurate but I cannot get the same values via code when I am creating the items on the map.
Hopefully that all makes sense. ANy help appreciated!