Code example for GoogleMap

Methods: clear, setInfoWindowAdapter

0
		} 
	}; 
 
	private void addMarkersToMap(boolean resetZoomWhenDone) {
		// clear the map 
		mMap.clear();
		mMarkers.clear();
		 
		// Create a marker for each photo 
		FlickrPhoto photo;
		for (int i = 0; i < mPhotos.size(); i++) {
			photo = mPhotos.get(i);
			LatLng point = new LatLng(photo.getLatE6() / 1E6,
					photo.getLonE6() / 1E6);
			Marker marker = mMap.addMarker(new MarkerOptions()
					.position(point)
					.title(photo.getTitle())
					.icon(BitmapDescriptorFactory 
							.fromResource(R.drawable.photo_marker)));
			mMarkers.add(marker);
			mMarkerPhotos.put(marker, photo);
			mBitmaps.put(marker, null);			
		} 
 
		// Set up the marker adapter 
		infoWindowAdapter = new CustomInfoWindowAdapter(this, mMarkerPhotos);
		mMap.setInfoWindowAdapter(infoWindowAdapter);
 
		if (mProgressDialog != null && mProgressDialog.isShowing()) {
			mProgressDialog.hide();
		} 
	}