安卓:myLocationOverlay.runOnFirstFix太慢 [英] Android: myLocationOverlay.runOnFirstFix Too Slow
问题描述
是否有人在加速的过程中设置为谷歌地图的初始点,围绕你的当前位置的任何想法。这必须是可能的正常工作,在本地谷歌地图应用程序,但在这里我使用的是明显的延迟在我的自定义应用程序:
myLocationOverlay.runOnFirstFix(新的Runnable(){
公共无效的run(){
找我();
}
});
在这里找到我,包括:
如果(myLocationOverlay.getMyLocation()!= NULL){
。mapView.getController()animateTo(myLocationOverlay.getMyLocation());
}
?如果您要求基于网络位置的当前位置,并接受一个小的过时的值(一个小时也许?),你应该几乎立刻得到用户的位置。
Does anybody have any ideas in speeding up the process for setting the initial point for Google Maps, centering on your current location. This must be possible as it works fine in the native Google Maps app but has a noticeable delay in my custom application where I am using:
myLocationOverlay.runOnFirstFix(new Runnable() {
public void run() {
findMe();
}
});
where find me includes:
if(myLocationOverlay.getMyLocation() != null){
mapView.getController().animateTo(myLocationOverlay.getMyLocation());
}
Are you using only GPS location? If you request the current location based on the network location and accept a little stale values (up to an hour maybe?), you should get the user's location practically immediately.
这篇关于安卓:myLocationOverlay.runOnFirstFix太慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!