Topic: Placement of 3D Markers
Hi,
i'm struggling to set 3D markers by code..
a method:
public void AddMarker(float latitude, float longitude){
//Create a marker to show the current GPS coordinates.
locationMarker = control.AddMarker3D(new Vector2(latitude, longitude), prefab);
locationMarker.range = new OnlineMapsRange(1, 20);
//Hide handle until the coordinates are not received.
locationMarker.enabled = true;
}
places the marker correctly in the scene. But everytime i move the camera or click somewhere, the marker gets disabled.
If i use the buildin feature of the OnlineMapsTileSetControl.cs and enable marker placement via "N" it works.
It works so good, i get 2 gameobject placed every time, on a spot near my mouse and a second instance wich sits at 0,0,0 .
Please tell my how i can place custom prefabs wich correctly move with the world, as it gets updated.
(Do i have to use the update via Location Service or can i use my own GSP signal Manager und just update the map?)