Topic: How draw location marker on top of other markers?

I generate several 2D markers using OnlineMapsMarker.Create(). I also use OnlineMapsLocationService. At runtime all markers including the location marker are drawn in one Mesh and all use the same Render Queue.

I want the location marker to be drawn always on top of the other markers. How can I achieve this?

I have seen an example about Marker Comparing ( … ample.html), but I do not understand whether this may help me, since I do not see how I find the location marker between the others.

Re: How draw location marker on top of other markers?


You need to modify the Compare method in this example.
Something like that:

public int Compare(OnlineMapsMarker m1, OnlineMapsMarker m2)
    if (m1 == OnlineMapsLocationService.marker) return 1;
    if (m2 == OnlineMapsLocationService.marker) return -1;

    if (m1.position.y > m2.position.y) return -1;
    if (m1.position.y < m2.position.y) return 1;
    return 0;