-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainActivity.java
More file actions
executable file
·36 lines (26 loc) · 884 Bytes
/
MainActivity.java
File metadata and controls
executable file
·36 lines (26 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package net.learn2develop.maps;
import android.os.Bundle;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
public class MainActivity extends MapActivity {
MapView mapView;
MapController mc;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mapView = (MapView) findViewById(R.id.mapView);
mapView.setBuiltInZoomControls(true);
mc = mapView.getController();
GeoPoint p = new GeoPoint(37423021,-122083739);
mc.animateTo(p);
mc.setZoom(13);
mapView.invalidate();
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
}