Code example for MapView

Methods: onSaveInstanceState

0
    } 
 
    @Override 
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        mapView.onSaveInstanceState(outState);
    } 
 
    private void setUpMapIfNeeded() { 
        if (map == null) {
            map = mapView.getMap();
            if (map != null) {
                setUpMap(); 
            } 
        } 
    } 
 
    private void setUpMap() { 
        map.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title("Marker"));
         
    }