Java – how to use Google Maps API for Android to limit maps to one country / Region
•
Android
I am completely unfamiliar with Android's Google Maps API. I want to know if it is possible to limit the area displayed in the map to only one country / region. I mean that my target users are only in my own country / region, and it is useless and illogical to show them the whole world when the application logic is only displayed in that country / region
Any ideas?
PS: if it is not possible in Google's API, can it be used with another API through another source that provides mapping services?
resolvent:
If you are still interested, you can now set it to restrict the user's panning to a given area using the setlatlngboundsforcameratarget method
You will need to update the dependencies of the play service:
dependencies {
compile 'com.google.android.gms:play-services:9.6.1'
}
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码