Is it possible to change the zoom level for myLocation with the new Google Maps API v2?
If you set GoogleMap.setEnableMyLocation(true);
, you get a button on the map to find your location.
If you click on it, then the map will bring you to your location and zoom it in to some level. Can I change this zoom to be less or more?
You can change the zoom level of the map using simple steps. Step 1 Go to Add or Edit Map page . Step 2 Select 'Default zoom level' in the 'Map Information section'. Step 3 click save map and see the changes.
Setting up the minimum or maximum Zoom value for Google Maps can be done by adding the shortcode attribute with Store Locator Shortcode. Furthermore, the maximum value of Google Maps Zoom level is 22. Therefore, the defined maximum value must be below or equal to 22, which is the default.
Zoom in the mapDouble tap a spot on the map, and then: Drag down to zoom in. Drag up to zoom out.
First of all, search for a place on Google Maps. After you get the result, switch to the Satellite view by clicking the square icon (with “Satellite” as its caption) on the bottom-left of the map screen. Now zoom in using the + (plus) button present on the right-bottom of the map screen.
It's doubtful you can change it on click with the default myLocation Marker. However, if you would like the app to automatically zoom in on your location once it is found, I would check out my answer to this question
Note that the answer I provided does not zoom in, but if you modify the onLocationChanged method to be like the one below, you can choose whatever zoom level you like:
@Override
public void onLocationChanged(Location location) {
if( mListener != null ) {
mListener.onLocationChanged( location );
//Move the camera to the user's location and zoom in!
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 12.0f));
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With