how to get default google map marker to represent user's current location
i am 开发者_开发问答using a mapview in my android application and to represent user's current location i have used a custom image. But now i want to replace that custom image by google default map marker(for eg. a blue pulsing dot or blue arrowhead/beackon).
cam somebody please help me....!!
use enableMyLocation() in MyLocationOverlay class:
MyLocationOverlay mMyLocationOverlay = new MyLocationOverlay(this,mapView);
mMyLocationOverlay.enableMyLocation();
mapView.getOverlays().add(mMyLocationOverlay);
Just use MyLocationOverlay class.
mMyLocationOverlay = new MyLocationOverlay(this,mapView);
mMyLocationOverlay.enableCompass();
mapView.getOverlays().add(mMyLocationOverlay);
You will have to download these Icons using the static url's.
- Here is one source: Google Earth Icons list
- Here is another : Google Maps Icons
You can use these code bases as examples.
- IncidentMap
- MapView Baloons
精彩评论