title: How to reset Google map in android with zoom state
body: <p>I am using Google map for android in my app. I want to reset my Google map with remove previously added Marker and zoom level.When I am clicking on button, previously added marker's were reset and added newly which I added.</p>
  
  <blockquote>
    <p>But My problem is that I am not getting my map in default state(without zoom).I am
    getting updated map with zoom-in state which i previously zoomed.I want to get map with default state</p>
  </blockquote>
  
  <p>I am refer <a href="https://stackoverflow.com/questions/15663793/clear-markers-from-google-map-in-android">Clear markers from Google Map in Android</a> to reset my map.</p>
  
  <p><strong>My code is as below:</strong></p>
  
  <pre><code>//set zoom in and zoom out on map navigation button click
  private void moveToCurrentLocation(LatLng currentLocation) {
      if (map != null) {
  
          if (forZoomInZoomOut) {//if true map will zoomin to currentlocation                
          map.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLocation, 15));
              // Zoom in, animating the camera.
              map.animateCamera(CameraUpdateFactory.zoomIn());
              // Zoom out to zoom level 10, animating with a duration of 2 seconds.
              map.animateCamera(CameraUpdateFactory.zoomTo(15), 2000, null);
          } else if (!forZoomInZoomOut){//if false map will reset
              map.clear();//clear map to add new marker's
              setMapMarker();//add markers here
          }
      }
  
  }
  </code></pre>