Display A Specific Area On The Google Maps
Can you please tell if there is a way using the Google Maps API for Android to display only a specific country / city instead of the whole map?
Solution 1:
Check: https://developers.google.com/maps/documentation/android-api/views#restrict-panning
That will restrict the camera to a region
You can use:
private GoogleMap mGoogleMap;
// Create a LatLngBounds that includes Australia.privateLatLngBoundsYOUR_CITY_OR_COUNTRY=newLatLngBounds(
newLatLng(-23, -66), newLatLng(-43, -68));
// Set the camera to the greatest possible zoom level that includes the// bounds
mGoogleMap.setLatLngBoundsForCameraTarget(YOUR_CITY_OR_COUNTRY);
Post a Comment for "Display A Specific Area On The Google Maps"