Topic: Set marker altitude to match 3d map height
Hey!
I'm trying to set marker.altitude to match the height of 3d map.
marker = GetComponent<OnlineMapsMarker3DInstance>().marker as OnlineMapsMarker3D;
OnlineMaps api = OnlineMaps.instance;
OnlineMapsTileSetControl control = OnlineMapsTileSetControl.instance;
OnlineMapsControlBase3D tscb = OnlineMapsControlBase3D.instance;
double tlx, tly, brx, bry;
api.GetCorners(out tlx, out tly, out brx, out bry);
float bestYScale = tscb.GetBestElevationYScale(tlx, tly, brx, bry);
var h = tscb.GetElevationValue(transform.position.x, transform.position.z, bestYScale, api.topLeftPosition, api.bottomRightPosition);
marker.altitude = h;
But the marker is below of ground level. Is there a way to do this?