Topic: Question about marker creation callback

Hi
I started to play around with the UI bubble popup example.
Basically i want to show a ui popup on my 3D markers on click.

I tried to modify the UI Bubble Popup script this way :

i replaced this part :

if (datas != null)
            {
                foreach (CData data in datas)
                {
                    OnlineMapsMarker marker = OnlineMapsMarkerManager.CreateItem(data.longitude, data.latitude);
                    marker["data"] = data;
                    marker.OnClick += OnMarkerClick;
                }
            }

By this

OnlineMaps.instance.OnMarkerAdded += registerPopup;

with :

 private void registerPopup(OnlineMapsMarker marker)
 {
        Debug.Log("a new marker has been created");
        marker.OnClick += OnMarkerClick;
 }

As it doesn't work (registerPopup is not getting called when i create my 3D marker), i think i misanderstound what OnlineMaps.instance.OnMarkerAdded does. Can you explain me what it does ?

-> I'm looking for a callback for marker creation

Thanks

Re: Question about marker creation callback

Hello.

OnMarkerAdded does nothing.
I missed this when marking obsolete members.
I'm sorry that it misled you.

The current version of Online Maps has no way to track that a marker has been created.
If necessary, I can add such an API.

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

Re: Question about marker creation callback

I managed to throw my own marker-specific creation event, so i'm good on my side, but it would probably be nice to have this callback (put it on a low priority todo-list ^^)
Thanks for the reply smile