using offline maps in android application

1088
1
04-29-2014 01:35 PM
alirezai
New Contributor
hi every one.
I want to use offline maps in my android apps. please help me.
thanks you in advance.....
0 Kudos
1 Reply
EdwardLin
New Contributor II
You have to prepare offline data yourself:
(1)If image data, you have to use ArcGIS desktop 10.1(or more)runtime tool to create Titled Layer(*.tpk).
    ArcGISLocalTiledLayer localTileLayer = new ArcGISLocalTiledLayer("tkp data path";);
    map.addLayer(localTileLayer);
(2)Else if vector data, you have to use ArcGIS desktop 10.2 runtime toool to create runtime content(*.geodatabse).
     Geodatabase localGdb = new Geodatabase(geodatabsePath);
    for (GeodatabaseFeatureTable gdbFeatureTable : localGdb.getGeodatabaseTables()) {
        if (gdbFeatureTable.hasGeometry())
          mMapView.addLayer(new FeatureLayer(gdbFeatureTable));
      }
0 Kudos