Topic: Online maps 3.0.0.30 and Marker 3D scaling

Hello,

I switched from 2.5 to 3.0.0.0.30 and since I use the new Online Maps Marker 3D Manager I have a problem with 3D marker scaling.

When I was using version 2.5 I changed scale with the following function described in the example MarkerScaleByZoomExample:

private void OnChangeZoom()
{
     float originalScale = 1 << defaultZoom;
     float currentScale = 1 << OnlineMaps.instance.zoom;

     marker.scale = currentScale / originalScale;
}

The scaling was working well and was smooth.

Since I use version 3.0.0.0.30 and Online Maps Marker 3D Manager when I zoom the 3D markers are well resized but it's not smooth we can see a "jump".

Is there another way to using 3D marker scaling with the new version?

Thank you in advance

Re: Online maps 3.0.0.30 and Marker 3D scaling

Hello.

marker.scale = Mathf.Pow(2, OnlineMaps.instance.floatZoom - defaultZoom);
Kind Regards,
Infinity Code Team.

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

Re: Online maps 3.0.0.30 and Marker 3D scaling

Sorry about the delay.

I tried your code but it does not work. The 3d Marker still "jump" from one zoom to another and are not resize properly.

What I did is just add the followig to the start :

OnlineMaps.instance.OnChangeZoom += OnChangeZoom;

And setup OnchangeZomm() like this :

private void OnChangeZoom()
{
        foreach (OnlineMapsMarker3D marker in Markers)
        {
            marker.scale = Mathf.Pow(2, OnlineMaps.instance.floatZoom - defaultZoom);
        }
}

I only have a couple of Markers (less than 10 ) that why I use a foreach.

Re: Online maps 3.0.0.30 and Marker 3D scaling

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

Script:

using UnityEngine;

public class TestScale3DMarkers : MonoBehaviour
{
    public float defaultZoom = 3;
    public GameObject prefab;
    private OnlineMapsMarker3D marker;

    private void Start ()
    {
        marker = OnlineMapsMarker3DManager.CreateItem(OnlineMaps.instance.position, prefab);

        OnlineMaps.instance.OnChangeZoom += OnChangeZoom;
        OnChangeZoom();
    }

    private void OnChangeZoom()
    {
        marker.scale = Mathf.Pow(2, OnlineMaps.instance.floatZoom - defaultZoom);
    }
}

What size of map (pixels) are you using?

Kind Regards,
Infinity Code Team.

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

Re: Online maps 3.0.0.30 and Marker 3D scaling

Thanks Alex.
I made some tests and found out that the bug only appears when I use the script OnlineMapsBingMapsElevationManager.cs.
If I desable it the scaling works great.

Is it something you already experienced?

Re: Online maps 3.0.0.30 and Marker 3D scaling

Here is a video of the same script with elevations:
https://www.dropbox.com/s/zn5fnriquadsv … 0.mp4?dl=0

Kind Regards,
Infinity Code Team.

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