开发者

how to get default google map marker to represent user's current location

开发者 https://www.devze.com 2023-04-05 12:15 出处:网络
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 ma

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

精彩评论

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