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?)

Re: Placement of 3D Markers

Hello.

Vector2: X - longitude, Y - latitude.
locationMarker.enabled = true; // Does nothing, because it is enabled by default.

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.

Most likely you have two instances of Tileset Control.
You should use only one control.

Kind Regards,
Infinity Code Team.

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

Re: Placement of 3D Markers

Hi,

It is not enabled on default, i have to set it explicitly.

I'll look into it after work, but i'm 99% sure i just have one tileset control script on the map.

Re: Placement of 3D Markers

All markers are enabled by default.
See here: OnlineMapsMarkerBase: 96.
The fact that 3d marker instance is activated - it's a bug.
We'll fix it.

If you are sure that you have one instance of Tileset control, and have two markers by pressing «N», please send your scene as package to support (support@infinity-code.com).
We will check it.

Kind Regards,
Infinity Code Team.

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

Re: Placement of 3D Markers

While pressing "N" i get two instances of the prefab, one correctly parented in the hirarchy the other under root.

The behaviour of the instance with Map as parent behaves correctly and moves and disappears accordingly.

Post's attachments

Attachment icon map_doof1.jpg 347.74 kb, 285 downloads since 2016-07-27 

Re: Placement of 3D Markers

I Just have one OnlineMapsTileSetControl on the Map and in the scene. I'll try to build a package with this scene

Post's attachments

Attachment icon map_control.jpg 146.94 kb, 347 downloads since 2016-07-27