title: Android Google Maps v2: on click listener not responding
body: <p>I'm trying to put a marker when the user clicks on map. I'm using a <code>SupportMapFragment</code> inside an <code>ActionBarActivity</code>. But the map doesn't respond, furthermore, a <code>map.setMapType()</code> operation isn't working.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>private GoogleMap map;
  private Marker marker;
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
      ActionBarActivity activity = (ActionBarActivity) getActivity();
      activity.getSupportActionBar().setTitle(R.string.select_location);
      super.onCreateView(inflater, container, savedInstanceState);
      return inflater.inflate(R.layout.map, container, false);
  }
  
  @Override
  public void onViewCreated(View view, Bundle savedInstanceState) {
      super.onViewCreated(view, savedInstanceState);
      Log.d("Map","On view created");
      map = getMap();
              map.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
      map.setOnMapClickListener(new OnMapClickListener() {
  
          @Override
          public void onMapClick(LatLng point) {
              Log.d("Map","Map clicked");
              marker.remove();
              drawMarker(point);
          }
      });
  
           ...
           Location location = locationManager.getLastKnownLocation(provider);
  
          if(location!=null){
             //PLACE THE INITIAL MARKER              
             drawMarker(new LatLng(location.getLatitude(),location.getLongitude()));
          }
  }
  </code></pre>
  
  <p>Logcat is showing the "on view created" message and the map shows the current location with a marker, so the last part of the code is being executed. But the <code>onMapClickListener</code> is overrided or something because it doesn't work, and the map isn't a satellite.</p>
  
  <p>Can anybody help me?</p>