Android MapView Initial Location
My app currently starts detecting its location as soon as it launches however when I load up a MapActivity some time later it takes a while before MyLocationOverlay.runOnFirstFix is fired.
Am I able to somehow pass the location I already have to the map when it is开发者_如何学Python initially created?
I find it hard to believe that your runOnFirst fix is taking a long time to run as if you already have an active location listener or had one recently it should get a location pretty quickly:
runOnFirstFix:
Queues a runnable to be executed as soon as we have a location fix. If we already have a fix, we'll execute the runnable immediately and return true. If not, we'll hang on to the runnable and return false; as soon as we get a location fix, we'll run it in in a new thread.
精彩评论