Mapping with Google APIs in Android

Figure 1: Initial map centered on a specified position
Panning, Zooming, and Toggling Map Modes
As was mentioned before, MapController is used to pan and zoom a map. You need to associate each button with a click listener. One example is as follows:
// Set up the button for "Pan East"
mPanE = (Button)findViewById(R.id.pane);
mPanE.setOnClickListener(new OnClickListener(){
// @Override
public void onClick(View arg0) {
panEast();
}
});
The panEast() function is implemented to pan a quarter of the current screen size. Other panning functionalities are done in a similar fashion. Actually, the map itself is already draggable if the device is equipped with a touch screen LCD. For non-touch-screen devices, you use these buttons or the arrow keys of the rocker pad to pan the map.
public void panEast() {
Point pt = new Point(
mMapView.getMapCenter().getLatitudeE6(),
mMapView.getMapCenter().getLongitudeE6()
+ mMapView.getLongitudeSpan() / 4);
mMapView.getController().centerMapTo(pt, true);
}
Zooming is done simply by increasing or decreasing the current zoom level through the controller.
public void zoomIn() {
mMapView.getController().zoomTo(mMapView.getZoomLevel() + 1);
}
To toggle the map display for viewing satellite imagery or traffic, you can enable it directly from MapView. The results are shown in Figures 2 and 3.
public void toggleSatellite() {
mMapView.toggleSatellite();
}
public void toggleTraffic() {
mMapView.toggleTraffic();
}

Figure 2: Satellite imagery



Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.