Hi,
I've build simple app on android and would like to test
MyLocationOverlay, but overlay is not displayed. Here is the code:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
linearLayout = (LinearLayout) findViewById(R.id.zoomview);
mapView = (MapView) findViewById(R.id.mapview);
mapController = mapView.getController();
mapOverlays = mapView.getOverlays();
mapView.setBuiltInZoomControls(true);
myLocation = new MyLocationOverlay(this, mapView);
myLocation.enableMyLocation();
mapOverlays.add(myLocation);
//myLocation.enableCompass();
myLocation.runOnFirstFix(new Runnable() {
public void run() {
mapController.animateTo(myLocation.getMyLocation());
}
});
Is something wrong with it? Sorry for such a lame question but I can't
figure it out (seems like some stupid mistake).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---