1

i tried using

MarkerOptions marker = new MarkerOptions().position(geom.get(0)).title("hai how are bgdj");

map.addMarker(marker);

where geom.get(0) is the LatLng and map is google map

3 Answers3

0

Try this,

mMap.addMarker(new MarkerOptions()
                            .position(MELBOURNE)
                            .title("Melbourne")
                            .snippet("Population: 4,137,400")
.icon(BitmapDescriptorFactory.fromResource(R.drawable.arrow)));
Pramod Waghmare
  • 1,273
  • 13
  • 21
0
MarkerOptions marker = new MarkerOptions().position(geom.get(0)).title("hai how are bgdj");
map.addMarker(marker);
Marker mk = map.addMarker(marker);
mk.showInfoWindow();

where geom.get(0) is the LatLng and map is google map

thanks guys, this worked for me.

0
Marker marker = myMap.addMarker(new MarkerOptions()
                 .position(currentLocation)
                 .title("Name")
                 .snippet("pranav")
                 .icon(BitmapDescriptorFactory
                 .fromResource(R.drawable.marker)));

marker.showInfoWindow();
Pranav Moyal
  • 307
  • 2
  • 6
  • 2
    While this code may answer the question, providing additional context regarding why and/or how this code answers the question improves its long-term value. – Vishal Chhodwani Apr 18 '18 at 08:51