Now the game is able to successfully show google map using MapView
[TheGame20100619.git] / LbgProject / src / com / xxl / LbgActivity.java
blob97a013ff78b0ded2d3aeadffc8f21ac811ba9cf7
1 package com.xxl;
3 import android.app.Activity;
4 import android.os.Bundle;
5 import com.google.android.maps.MapView;
6 import com.google.android.maps.MapActivity;
7 import com.google.android.maps.GeoPoint;
8 import com.google.android.maps.OverlayItem;
9 import com.google.android.maps.Overlay;
10 import android.graphics.drawable.Drawable;
12 import java.util.List;
14 // public class LbgActivity extends Activity
15 public class LbgActivity extends MapActivity
17 /** Called when the activity is first created. */
18 private LbgItemizedOverlay lbgOverlayItems;
20 public void onCreate(Bundle savedInstanceState)
22 MapView mapView;
23 GeoPoint malmo;
24 OverlayItem item;
25 List<Overlay> mapOverlays;
27 super.onCreate(savedInstanceState);
28 setContentView(R.layout.main);
30 mapView = (MapView) findViewById(R.id.mapview);
31 mapView.setBuiltInZoomControls(true);
33 mapOverlays = mapView.getOverlays();
34 Drawable drawable = this.getResources().getDrawable(R.drawable.androidmarker);
35 lbgOverlayItems = new LbgItemizedOverlay(drawable, this);
37 malmo = new GeoPoint(55704471, 13201071);
38 item = new OverlayItem(malmo, "Malmo", "malmo");
39 lbgOverlayItems.addOverlay(item);
40 mapOverlays.add(lbgOverlayItems);
43 protected boolean isRouteDisplayed()
45 return false;