0

How can I add a custom marker to my current location in my map? At this stage no marker is being displayed at my location.

I'm using Google map api v2 and android version 4.0.4.

Avi Kumar
  • 4,403
  • 8
  • 36
  • 67
prophetz
  • 107
  • 2
  • 10
  • Do u have changed the location and verified that marker is changed to that location?? Post some code/logcat/give correct information that what you have tried???? – Avadhani Y Mar 04 '13 at 13:20
  • To find current location refer this... http://www.androidhive.info/2012/07/android-gps-location-manager-tutorial/ and to add overlay refer this... https://developers.google.com/maps/documentation/android/ – satish kumar rajput Mar 04 '13 at 13:30
  • hi refer this link http://stackoverflow.com/questions/13844209/google-maps-android-api-v2-and-current-location – itsrajesh4uguys Mar 04 '13 at 13:54

1 Answers1

1


Assuming the latitude and longitude for the current location is lat and lng.(Which you can find out programatically).

 GoogleMap mMap;
 // Initialize your map ...And
 mMap.addMarker(new MarkerOptions().position(
            new LatLng(lat , lng)).title("Marker"));

Use icon() method for image .

Anukool
  • 5,301
  • 8
  • 29
  • 41