Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yandex Marker's Current Latlong values in Android

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

like image 866
Hemant Avatar asked Jul 31 '15 06:07

Hemant


1 Answers

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

like image 61
akarimova Avatar answered Nov 08 '22 18:11

akarimova