Plotting a location using Google Maps and Android
xml layout:
{view class="com.google.android.maps.MapView"android:id="@+id/areamapview"android:layout_width="320px"android:layout_height="280px"/}
java code:
import these:
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.MapController;
import com.google.android.maps.Point;
creation:
areaMapView = (MapView)this.findViewById(R.id.areamapview);
areaMapView.toggleSatellite();
Point areaPoint = new Point((int)(41.832846978094*1000000),(int)(-87.83592939376831*1000000));
mc = areaMapView.getController();
mc.animateTo(areaPoint);
mc.zoomTo(16);
Monday, March 3, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment