Dhanraaj Sreenagesh
Dhanraaj Sreenagesh

Reputation: 61

Find the markers position in google map while moving camera positions

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

Upvotes: 6

Views: 665

Answers (1)

Madhu
Madhu

Reputation: 1800

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;
        }
    });

Upvotes: 2

Related Questions