Topic: Marker3d remain suspended in the air

Hi.
I'm new to programming.
I'm trying to update from v2.5 to 3.5.
With v2.5 I use OnlineMapsTileSetControl.instance.useElevation = false; to disable the elevation in the range of
"control.zoom <= minZoom || control.zoom> = maxZoom" but I can't get it in v3.5.
The problem is that the marker3d remain suspended in the air. Thanks

Re: Marker3d remain suspended in the air

Hello.

Unfortunately, I did not understand your problem.
Please show your script.

Kind Regards,
Infinity Code Team.

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

Re: Marker3d remain suspended in the air

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ContollerElevationLazz : MonoBehaviour
{

    OnlineMaps control;

    public int minZoom = 10;
    public int maxZoom = 14;
    public GameObject image_3D;
   
    private OnlineMapsMarker3D marker3D;
   

   
   void Start()
   
    {
        control = OnlineMaps.instance;
       
        control.OnChangeZoom += Control;

       
    }

   
    void Update()
    {
        control = OnlineMaps.instance;
       
        control.OnChangeZoom += Control;
       
       
    }

   

    private void Control()
    {
        if ( control.zoom <= minZoom || control.zoom >= maxZoom )
        {
           
            OnlineMapsTileSetControl.instance.useElevation = false;       
            image_3D.SetActive(false);   
           
        }
        else
        {
           
            OnlineMapsTileSetControl.instance.useElevation = true;
            image_3D.SetActive(true);
           
        }
    }
}

Re: Marker3d remain suspended in the air

In Online Maps v3.x, the elevations feature has been moved from Tileset Control to separate managers, one of which you need to add (for example, Bing Maps Elevation Manager).
You do not need to manually turn on and off elevations. Just specify a zoomRange at which elevations will work.
Something like this:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ContollerElevationLazz : MonoBehaviour
{

    OnlineMaps control;

    public int minZoom = 10;
    public int maxZoom = 14;
    public GameObject image_3D;
   
    private OnlineMapsMarker3D marker3D;
   

   
   void Start()
   
    {
        control = OnlineMaps.instance;
       
        control.OnChangeZoom += Control;
        OnlineMapsElevationManagerBase.instance.zoomRange = new OnlineMapsRange(minZoom, maxZoom);
       
    }

   
    void Update()
    {
        control = OnlineMaps.instance;
       
        control.OnChangeZoom += Control;
       
       
    }

   

    private void Control()
    {
        if ( control.zoom <= minZoom || control.zoom >= maxZoom )
        {
            image_3D.SetActive(false);   
           
        }
        else
        {
            image_3D.SetActive(true);
           
        }
    }
}
Kind Regards,
Infinity Code Team.

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

Re: Marker3d remain suspended in the air

Thanks Alex, I will try your solution. Good job

Re: Marker3d remain suspended in the air

Thanks Alex. Your suggested solution is very useful, however it does not solve the problem. If there are 3d markers, they remain suspended in the air when the elevation is turned off in the range. I am forced to activate (Lock Y Scale) to bring the markers down to the ground

Re: Marker3d remain suspended in the air

I rechecked this, found and fixed the bug in elevations when elevation manager has been disabled or a map zoom goes out of the elevation zoom range.
The new version will most likely be available through the built-in update system in 24 hours.

Kind Regards,
Infinity Code Team.

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

Re: Marker3d remain suspended in the air

Thanks Alex. Good job!