Develop ArcGIS Android Mobile GIS and GPS Apps : Display a Basemap

preview_player
Показать описание

Develop ArcGIS Android Mobile GIS and GPS Apps
Create your app with 2D, 3D features for both 2D and 3D maps in an easy way with ArcGIS Runtime SDK for Anroid v.100.x
Рекомендации по теме
Комментарии
Автор

1 Add ArcGIS maven online repository to gradle Project file
//add ArcGIS repository
maven {
}
2 Add ArcGIS dependency to gradle module file
compile
3 Add four permissions for popuplar GIS apps to project manifest file (Not all permissions are used in our demo project, such as the is used in GPS project.)
<uses-permission I>
<uses-permission I>
<uses-permission 1>
<uses-feature android:required="true" i'>
4 Add code for MapView., to activity_main.xml inside

android:id="@+id/mapl"
android :layout_width="match_parent"





5 Declare MapView variable (import rvlapViev. class if necessary)
6 Add code to method: onCreate for displaying a basemap (import ArcGISMap and other classes if necessary)
mv =
ArcGISMap map = new 37.7531.-122.4479.11);
mv.setMap(map);
7 Add margins for mapView to activity_main.xml

android:id="@+id/map1"
android
android layout_height="match_parent"








8 Add 2 lifecycle callback methods: onPause and onResume to avoid app crushing or losing the users progress.
@Override
protected void onPause(){
super.onPause();
mv.pause();
}
@Override
protected void onResume(){
super.onResume();
mv.resume();
}

morshedmukul