1 (edited by leviniarened 2017-10-07 15:14:47)

Topic: Marker3d dragging problem with non zero map position + elevations

Hi,
I found an incorrect behaviour
How to reproduce:
Using map with enabled bing elevation.
Change map position to (1000, 0, 0). Go to place with big height difference (example lat: 46.0290180901501, lng: 11.0902961294749, zoom: 16))
Create marker3d, set allow drag and  try to drag marker (marker flies).

Re: Marker3d dragging problem with non zero map position + elevations

Hello.

Thanks for bug report, but I could not reproduce it.

Video:
https://www.dropbox.com/s/gxvucu52eplwd … 1.mp4?dl=0

I missed something?

Kind Regards,
Infinity Code Team

Re: Marker3d dragging problem with non zero map position + elevations

I'm also manually setting marker altitude while dragging action is triggered:

void Start()
{
    marker3d = GetComponent<OnlineMapsMarker3DInstance>().marker as OnlineMapsMarker3D;

    marker3d.SetDraggable();

    marker3d.OnDrag += (v) =>
    {
         marker3d.altitude = CalculateAltitude();
    };
}

float CalculateAltitude()
{
    double tlx, tly, brx, bry;
    api.GetCorners( out tlx , out tly , out brx , out bry );
    var h = tscb.GetElevationValue( transform.position.x , transform.position.z , 1 , api.topLeftPosition , api.bottomRightPosition );
        return h;
}

Solution for me is to use local position. Would you mention about relative (local) coordinates in the doc?

Re: Marker3d dragging problem with non zero map position + elevations

I see.
Fixed a description of the method in the documentation.

Kind Regards,
Infinity Code Team