问题描述
我不能够得到Yandex的默认标记当前的经纬度值在Android中。我真正感兴趣的是从Android手机和Yandex的地图标记的位置捕获当前的经纬度值,这正是我所需要的。有没有人使用Yandex的地图来获取当前用户的位置?能否请你帮忙。
更新1
虽然这个与谷歌和Yandex的经纬度问题研究,我碰到一个链接,GPS定位的应用程序从 http://gpsfix.android.informer.com/ 。在Android设备上安装这个程序,并执行开始修复,现在Yandex的SDK在我的自定义应用程序中提供的经纬度值后,现在已接近该标记的的。但是,仍然有一些点,显示在公路旁的建筑物(我可以调整,从目前来看)。我相信,GPS定位应用程序做somekind的刷新GPS缓存???不知道是否有这样的事情。我还在等待一个干净的解决方案,工程没有其他应用程序的支持。
谢谢,与Hemant
您可以尝试做水木清华这样的
<$p$p><$c$c>yandexMap.getMapController().getOverlayManager().getMyLocation().addMyLocationListener(new OnMyLocationListener(){ @覆盖 公共无效onMyLocationChange(MyLocationItem myLocationItem){ GeoPoint对象的GeoPoint = myLocationItem.getGeoPoint(); } });的GeoPoint可以转换为谷歌经纬度
I 'm not able to get the Yandex default Marker's current Latlong values in Android. What I'm really interested is to capture the current latlong values from the android mobile and yandex map marker's position is exactly what I need. Has anyone used yandex maps to get the current user location? Can you please help.
Update 1
While researching on this latlong issue with Google and Yandex, I came across a link for "GPS Fix" app from http://gpsfix.android.informer.com/. After installing this App on the Android device and performing "Start Fixing", the latlong values now provided by Yandex SDK in my custom App is now closer to that of marker's. But still some points show over the buildings beside road (I can adjust that for now). I believe "GPS fix" app does somekind of flushing the GPS cache??? not sure if there is such a thing. I 'm still waiting for a clean solution that works without support from other app.
Thanks,Hemant
You can try to do smth like this
yandexMap.getMapController().getOverlayManager().getMyLocation().addMyLocationListener(new OnMyLocationListener() {
@Override
public void onMyLocationChange(MyLocationItem myLocationItem) {
GeoPoint geoPoint = myLocationItem.getGeoPoint();
}
});
GeoPoint can be converted to Google LatLng
这篇关于在Android的Yandex的标记当前的经纬度值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!