I have a google maps v2 in my android application and some markers on it. When user click one of these markers, a title popup comes. How can I show these titles always without user click?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
Something like that:
I'm not so good in some implementation but here is my code:
I implemented this in a fragment in a map app with some variations. For example, with a custom Info Window and some events on the map but its implementation was required to show all marker title at the same time. Let me know if it was helpful for you too
the ACTIVITY of "activity.getResources().getDimensionPixelSize(R.dimen.tooltips_width)" variable is a property in the fragment
Just call
Marker.showInfoWindow();
. See https://developers.google.com/maps/documentation/android/marker#info_windows and https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/model/Marker#showInfoWindow()You can do this:
For displaying marker titles on the map around the markers, none of the solutions I found on internet worked for me so I rolled up my sleeves and made this library which solves this problem for me, hopefully it will help others too:
https://github.com/androidseb/android-google-maps-floating-marker-titles
Here is a preview of how it works: