开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜