Eclipse Mobile Mousw Guía de instalación Pagina 36

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 59
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 35
36
{
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (IOException e)
{
e.printStackTrace();
}//end of sending updated latitude and longitude to the server
}
}
Appendix-2
public class MainActivity extends Activity
{
private MapController mapController;
private MapView mapView;
public GeoPoint point;
double Lon = 0;
double Lat = 0;
String strUrl = "http://213.103.201.82:8080/zr/trafficweb";
URL url = null;
String username ="";
String password ="";
private LocationManager mlocManager;
private LocationListener mlocListener = new MyLocationListener();
private MyOverlay myOverlay = new MyOverlay(null);
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.osmmap);
/*
*The followings are all the necessary setting for rendering OSM.
* */
mapView = (MapView) this.findViewById(R.id.mapview);
mapView.setTileSource(TileSourceFactory.MAPNIK);
mapView.setBuiltInZoomControls(true);
mapView.setMultiTouchControls(true);
mapController = mapView.getController();
mapController.setZoom(15);
point = new GeoPoint(59351756, 18057822);
mapController.setCenter(point);
username = "groupx";
Vista de pagina 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 ... 58 59

Comentarios a estos manuales

Sin comentarios