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

前端 未结 5 1343
深忆病人
深忆病人 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 01:49

    out of the box this is not possible. However what you could theoretically do it find the max bounding box that shows the country in question then everytime the camera moves check to make sure the bounding box is inside the max one. If it is not set it to the max. that would restrict them to a certain spot

提交回复
热议问题