ericlee
ericlee

Reputation: 2753

How to do a mapview showing your current location that is similar to google maps?

Is there anyway to do a similar type? as in a map show the current direction of the user and where he is.

Upvotes: 1

Views: 144

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007099

Add MyLocationOverlay to the MapView:

me=new MyLocationOverlay(this, map);
map.getOverlays().add(me);

It will show the user's location (if you have the proper permissions) and it will show the user's orientation via a compass rose (if you run it on a device with the right sensors). You can see this, along with a custom overlay, in this sample project.

Upvotes: 1

Related Questions