Find the markers position in google map while moving camera positions
Asked Answered
A

1

6

How to find the markers and markers positions (Lat,Lan) on Google map while moving the camera position.?

Ailina answered 14/12, 2015 at 4:35 Comment(1)
To create a marker, you must set its position, so you already have this information, don't you?Brython
L
2

Using oncamera change listener you can get latitude and longitude

map.setOnCameraChangeListener(new OnCameraChangeListener() {

        @Override
        public void onCameraChange(CameraPosition position) {
            LatLng latvalue = position.target;
            double lat = latvalue.latitude;
            double lng = latvalue.longitude;
        }
    });
Lukas answered 14/12, 2015 at 4:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.