Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

setMapOrientation #301

Closed
Mantj opened this issue Apr 22, 2016 · 3 comments
Closed

setMapOrientation #301

Mantj opened this issue Apr 22, 2016 · 3 comments

Comments

@Mantj
Copy link

Mantj commented Apr 22, 2016

when i am moving , i want to change my map orientation so i can always see the correct direction of my map.
i want to do it by using :

map.setMapOrientation();

but how i can get my orientation when i am moving .
please help me ,thanks~ ,and forgive my poor English~

@spyhunter99
Copy link
Collaborator

it's the same command, but you'll need to set the map orientation based on gps heading or compass orientation.

@Mantj
Copy link
Author

Mantj commented Apr 22, 2016

Thank for your focus.
i try to use ## mCompassOverlay.getOrientation() to get the orientation,and i successfully get what i want .
but i notice that my compass sometimesiInaccuracy,so i want to use the gps,but i don't know how to use it.

MyLocationNewOverlay mLocationOverlay = new MyLocationNewOverlay(new GpsMyLocationProvider(this), map, mResourceProxy);

is it use "mLocationOverlay" to get the orientation?

@spyhunter99
Copy link
Collaborator

Just use android's location manager and handle onLocationChanged in whatever way you want

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants