I’m trying to lock the camera so that the users can’t move the map. Is there any method available for that? I tried to find it, but untill now I haven’t found it yet. I also tried to find any related question for this.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
mapFragment.getMap().getUiSettings().setScrollGesturesEnabled(false);to forbid map scrolling.
You can also use
setAllGesturesEnabled(false);(there are also rotate and tilt gestures…) For more methods see docs: https://developers.google.com/android/reference/com/google/android/gms/maps/UiSettings