How to make such a custom marker?
Asked
Active
Viewed 1,361 times
1 Answers
-1
Firstly use BitmapDescriptorFactory.fromResource(id goes here)
Then add marker to the map using
Marker marker = GoogleMap.addMarker(new MarkerOptions().position(latLng)
.icon(BitmapDescriptorFactory.fromResource(id goes here));
For the text you can use
marker.setTitle(string); //text on top
marker.setSnippet(string); //text below the title

Aniruddha Bera
- 399
- 6
- 19
-
The text itself is offset relative to the overlay. And is in a white oval. I use osmdroid. – alexmx Aug 26 '17 at 18:33
-
1https://stackoverflow.com/questions/10533071/osmdroid-add-custom-icons-to-itemizedoverlay see this solution – Aniruddha Bera Aug 26 '17 at 19:25
-
The question is tagged `osmdroid`. – Sebastián Palma Nov 27 '19 at 10:54