1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
private static MapView mapView = null;
private MapController mapController = null;
double latitude;
double longitude;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mapView =(MapView)findViewById(R.id.myGmap);
mapView.setBuiltInZoomControls(true);
mapController = mapView.getController();
mapController.setCenter(GeoTools.makeGeoPoint(latitude,longitude));
mapController.setZoom(15);
mapView.setSatellite(false);
mapView.setTraffic(true); |
Partager