how to restrict maps to only one country using google maps api for android

前端 未结 5 1345
深忆病人
深忆病人 2021-01-20 01:29

I am totally new to google\'s maps api for android and I was wondering if it is possible to restrict the area the map is showing to one country only. I mean my target users

5条回答
  •  误落风尘
    2021-01-20 02:03

    If you are still interested, now it's possible to restrict the user's panning to a given area using the setLatLngBoundsForCameraTarget method.

    You will need to update the dependencies for your Play Services:

    dependencies {
        compile 'com.google.android.gms:play-services:9.6.1'
    }
    

提交回复
热议问题