Thanks Alex .. it was easy
1- But if i draw a rout and later i want to delete it for creating another one ..how do i delete it ?
should i delete all the parts like :
foreach (OnlineMapsGoogleDirectionsResult.Leg leg in result.routes.legs)
foreach (OnlineMapsGoogleDirectionsResult.Step step in leg.steps)
or just destroy : result.routes
or its is else ?
2- what is the index in (result.routes) ?
3- when i used and set a 3D Marker .. there is a 2 problems
1- the marker "Prefab" moved and change its location by moving the map with the mouse cursor and by zooming .its not
sensitive like the 2D Marker ?
2- i used your function to scale the 3D Marker when zooming . but the result wasn't ok ?
your Function :
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;
private void OnChangeZoom()
marker.scale = Mathf.Pow(2, OnlineMaps.instance.floatZoom - defaultZoom);