by keraisureshv » Sat Jul 12, 2008 8:49 am
hi
In Android to develop Map copy this XML com on layout\main.xml
Using xml Syntax Highlighting
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<view class="com.google.android.maps.MapView"
android:id="@+id/myMapView"
android:layout_width="306px"
android:layout_height="264px"
android:layout_x="10px"
android:layout_y="57px"
/>
</LinearLayout>
Parsed in 0.002 seconds, using
GeSHi 1.0.8.4
and in java file copy this code
Using java Syntax Highlighting
package info.tanguy;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.OverlayController;
import com.google.googlenav.DrivingDirection;
import android.app.Activity;
import android.os.Bundle;
public class mapDisplay extends MapActivity {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
MapView mapViewFromXML = (MapView)this.findViewById(R.id.myMapView);
/* Retrieve its OverlayController. */
OverlayController myOC = mapViewFromXML.createOverlayController();
/* Add a new instance of our fancy Overlay-Class to the MapView. */
}
}
Parsed in 0.033 seconds, using
GeSHi 1.0.8.4
Thank you
Suresh
I Develop Android Location Based System.