Skip to content
This repository was archived by the owner on Mar 11, 2024. It is now read-only.
This repository was archived by the owner on Mar 11, 2024. It is now read-only.

Click on markers #32

@iracom

Description

@iracom

Hello.

Is ther a way to click or touch in markers? I would like to add a listener to the markers to open a screen with the information of a place. But i don't know how do this. I add a listener, but it never get the action.

`GameObject markerGO = Instantiate(go) as GameObject;
map.CreateMarker("Point", map.CenterWGS84, markerGO);
MapInput.lat = map.CenterWGS84[0];
MapInput.lon = map.CenterWGS84[1];
double[] point = new double[2];
point[0] = map.CenterWGS84[0];
point[1] = map.CenterWGS84[1];
MapInput.sitios.Add(point);

markerGO.GetComponent().material.mainTexture = Resources.Load("green_marker") as Texture;
markerGO.GetComponent().material.color = new Color(1.0f, 1.0f, 1.0f, 1.0f);

markerGO.AddComponent().onClick.AddListener(() => OnClick());`

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions