Topic: How can I change marker's layer?

I want to put one marker into the layer which ignore raycast layer?
And also I want to know how to change the collider size for marker in editor.
Thank you!

Re: How can I change marker's layer?

Hello.

Please specify what control do you use and about what markers you ask (2D or 3D).

Kind Regards,
Infinity Code Team.

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

Re: How can I change marker's layer?

2D marker, tap on marker control, one marker I add cover other markers, I want to put this marker in the lower layer, or make it ignore the tap event.

Re: How can I change marker's layer?

I mean: Tileset Control, UIImage Control or some other.

Kind Regards,
Infinity Code Team.

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

Re: How can I change marker's layer?

tileset control

Re: How can I change marker's layer?

For tileset control all 2D markers drawn in «Map GameObject / Markers» in single mesh.
You can find this GameObject and change layer. But it will change the layer for all markers.

When the markers overlap, triggered event of marker that is added last.
If you want to the events of some marker do not overlap events of the other markers, add it first, or remove it from «OnlineMaps.markers» and insert to begin of list.

Kind Regards,
Infinity Code Team.

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

Re: How can I change marker's layer?

I added the marker first, but still cover the markers added after. So I will try to remove and insert it again, how to insert it to the begin of OnlineMaps.markers?

8 (edited by tobytaro 2016-09-26 07:37:09)

Re: How can I change marker's layer?

Please look at the image I upload, Does it mean that the Marker 1 is the first marker I added. It still cover some markers I add later. Is there some bug ?

Post's attachments

Attachment icon 屏幕截图 2016-09-26 15.33.34.png 89.88 kb, 257 downloads since 2016-09-26 

Re: How can I change marker's layer?

Please show the script where you add a events of markers.

Kind Regards,
Infinity Code Team.

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

10 (edited by tobytaro 2016-09-26 08:00:25)

Re: How can I change marker's layer?

private void Start () {
        // Add RadarMarker
        radarMarker = OnlineMaps.instance.AddMarker(new Vector2(0, 0), radarMarkerTexture, "Radar");
        radarMarker.align = OnlineMapsAlign.Center;
}

private void OnLocationChanged(Vector2 position) {
        // Get player's position
        playerPosition = position;

        //Adjust radarMarker's position
        radarMarker.position = playerPosition;

        // Add marker.
        AddMarkersBasedonPlayerPosition (playerPosition);

        // Redraw map.
        OnlineMaps.instance.Redraw();
    }

The radar marker cover some markers added later

Re: How can I change marker's layer?

I think I understand: you're talking about the order of drawing of markers, instead of the order of events of markers, right?!
Use «OnlineMapsTileSetControl.markerComparer», to manually sort the markers.
Example:
http://infinity-code.com/atlas/online-m … ample.html

Kind Regards,
Infinity Code Team.

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

Re: How can I change marker's layer?

No, I'm talking about the event order. For instance, I want to tap and show the tooltip. But the radar marker cover some of the markers I add later based on the playerPosition.

Re: How can I change marker's layer?

In this case, I do not understand you.
I just checked, shows the tooltip of the last the marker (screenshot attached).

Post's attachments

Attachment icon img1.png 707.41 kb, 234 downloads since 2016-09-26 

Kind Regards,
Infinity Code Team.

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

Re: How can I change marker's layer?

maybe it's hard to describe, please show me how to do this " remove it from «OnlineMaps.markers» and insert to begin of list.". I will try to see if it works for me

Re: How can I change marker's layer?

private void MoveMarker(OnlineMapsMarker marker)
    {
        OnlineMapsMarker[] markers = OnlineMaps.instance.markers;
        int offset = 0;
        for (int i = markers.Length - 1; i > 0; i--)
        {
            OnlineMapsMarker m = markers[i];
            if (marker == m) offset++;
            else markers[i + offset] = m;
        }
        markers[0] = marker;
    }
Kind Regards,
Infinity Code Team.

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

16 (edited by tobytaro 2016-09-27 02:47:14)

Re: How can I change marker's layer?

Thank you for the code, but it doesn't work. And after hundreds try, I found some issue about the method "AddMarker".
                radarMarker = OnlineMaps.instance.AddMarker(new Vector2(0, 0), "Radar");
                radarMarker.texture = radarMarkerTexture;
                radarMarker.align = OnlineMapsAlign.Center;
                radarMarker.position = playerPosition;  //I Worte this code in OnlocationChanged
I used these code above to add radarMarker,  it fit the event issue, the radarMarker wouldn't cover(I mean block the tap event) any markers I added later. But the position of the radarmarker is not at the position.
                radarMarker = OnlineMaps.instance.AddMarker(new Vector2(0, 0), RadarMarkerTexture, "Radar");
                radarMarker.align = OnlineMapsAlign.Center;
                radarMarker.position = playerPosition;  //I Worte this code in OnlocationChanged
I I used these code above to add radarMarker, the position is right. But it's weird that the upper half of the radarMarker cover(I mean block the tap event) the markers I added later, the lower half of the radarMarker wouldn't cover(I mean block the tap event) any markers I added later.

I think maybe there is some bug in the source code. Pls help to fix it. Thank you!

And I add An image to show you the issue, one player is added by editor, the other player and the green radarMarker are add by code like this
playerMarker = OnlineMaps.instance.AddMarker(new Vector2(0, 0), "Player");
playerMarker.texture = playerMarkerTexture;
playerMarker.align = OnlineMapsAlign.Center;
playerMardker.position = playerPosition;  //I Worte this code in OnlocationChanged
radarMarker marker's code is similar as above.
In editor they all have same location and align point, and the 2 playerMarker used same playerMarkerTexture. But in the game view, 2 players have different location, and the green radar is not in the center of the playerMarker.

Post's attachments

Attachment icon 屏幕截图 2016-09-27 10.38.10.png 888.85 kb, 272 downloads since 2016-09-27 

Re: How can I change marker's layer?

It's just a mystic.
I just tested it, and I have all the markers in the right location.
Please send us a scene where we can see and test it to support (support@infinity-code.com).
We will check and immediately fix the problem.

Kind Regards,
Infinity Code Team.

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

Re: How can I change marker's layer?

Just now I found that if I added radarMarker.Init() after assigning the texture, it would be in the right position, but again, it blocked the tap event of some other markers on it's upper haft area.

Re: How can I change marker's layer?

Please send something (a scene or video), to I can see the problem.

Kind Regards,
Infinity Code Team.

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

Re: How can I change marker's layer?

I already sent you the unity package. pls help me to solve the problem.