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?
If I understood your issue correctly, you want the marker name to be displayed in Google My Maps. For that click on the style option just below layer name. Now change the set label option to name or description to display it.
For adding a custom marker to Google Maps navigate to the app > res > drawable > Right-Click on it > New > Vector Assets and select the icon which we have to show on your Map. You can change the color according to our requirements. After creating this icon now we will move towards adding this marker to our Map.
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()
Something like that:
googleMap.addMarker(new MarkerOptions() .position(new LatLng(latitude, longitude)) .title("Your position")).showInfoWindow();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With