Yandex Marker's Current Latlong values in Android

谁说胖子不能爱 提交于 2019-12-22 06:17:39

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/31739389/yandex-markers-current-latlong-values-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!