Status Update
Comments
ze...@gmail.com <ze...@gmail.com> #2
I just noticed that calling .showInfoWindow() on the marker DOES place it on top of the others.
Sadly I want no info window at all. For now the trick is to create a 0px * 0px view in my own InfoWindowAdapter.
Sadly I want no info window at all. For now the trick is to create a 0px * 0px view in my own InfoWindowAdapter.
de...@deive.co <de...@deive.co> #4
You can now change a Marker's icon (thanks!), however this functionality is still required!
I have tried the workaround of a 0 sized view as below, but the view actually takes up the whole width of the map and half the height (i.e. all the space above the Marker) - which stops all user interaction with the top half of the map. (If you call show then hide then the Marker is placed back to it's original z-order).
zeroSizedInfoWindow = new View(getActivity());
zeroSizedInfoWindow.setLayoutParams(new ViewGroup.LayoutParams(0, 0));
I have tried the workaround of a 0 sized view as below, but the view actually takes up the whole width of the map and half the height (i.e. all the space above the Marker) - which stops all user interaction with the top half of the map. (If you call show then hide then the Marker is placed back to it's original z-order).
zeroSizedInfoWindow = new View(getActivity());
zeroSizedInfoWindow.setLayoutParams(new ViewGroup.LayoutParams(0, 0));
au...@gmail.com <au...@gmail.com> #6
[Comment deleted]
au...@gmail.com <au...@gmail.com> #7
Is it possible to know if this issue is being solved ? I really need to set z-orders of some markers, and I can't use the infoWindow trick as I want 4 markers to be always above 4 others markers.
Thanks...
Thanks...
ra...@gmail.com <ra...@gmail.com> #8
I too want to show certain markers on top of others such that if there are two types of markers Red and Blue, i want the Red marker to stay above of Blue marker.
sj...@gmail.com <sj...@gmail.com> #9
I'm using the following workaround to add a "current selection" red marker that is always on top of another map marker (in my case, a bus stop) with the exact same lat/long, much like Google Maps does (see screenshot).
// Reduce focus marker latitude by small amount to ensure it is always on top of the
// corresponding stop marker (i.e., so its not identical to stop marker latitude)
LatLng latLng = new LatLng(stop.getLatitude() - 0.000001, stop.getLongitude());
Marker mCurrentFocusMarker = mMap.addMarker(new MarkerOptions().position(latLng));
When you slightly reducing the latitude of the marker you want on top, Google Maps will then render this marker on top of other marker.
But, it would be nice to have official z-order rending control via an API.
// Reduce focus marker latitude by small amount to ensure it is always on top of the
// corresponding stop marker (i.e., so its not identical to stop marker latitude)
LatLng latLng = new LatLng(stop.getLatitude() - 0.000001, stop.getLongitude());
Marker mCurrentFocusMarker = mMap.addMarker(new MarkerOptions().position(latLng));
When you slightly reducing the latitude of the marker you want on top, Google Maps will then render this marker on top of other marker.
But, it would be nice to have official z-order rending control via an API.
Description
My scenario is that I have a few markers on the map, and they can be clicked. I then wish to change its icon to
'selected'. The replacement method works, but if a marker was behind (drawn before) another one, the new one is also behind it.
I would expect a newer marker to be drawn over older ones. If I have a lot of markers close together, the relevant
one should be on top.
Or allow us to specify a draw order somehow.