Feature Layer not displayed in Android App

2660
0
08-21-2014 06:36 AM
PrakashChamarthy
New Contributor

Hello ...

1) I imported an existing offline basemap .. .tpk file into Arcmap 10.2.1 using Arccatalogue

2) I created a featureclass( with ploygon features) in Arcmap 10.2.1 over the basemap and created one feature layer which has polygon shaped field drawn on the basemap.

3) Then i generated the .geodatabase file for runtime sharing , so as to use it in my Android application.(as suggested in the webpage below)

http://resources.arcgis.com/en/help/main/10.2/index.html#//00660000045q000000

4) I copied the .tpk file and .geodatabase file and my code is as follwos in my android app..

 

mMapView.addLayer(new ArcGISLocalTiledLayer("Path to my existing .TPK file"));

Geodatabase localGdb = null;
try {

localGdb = new Geodatabase("PATH TO MY .geodatabase file"); 
} catch (FileNotFoundException e) {
e.printStackTrace();

for (GeodatabaseFeatureTable gdbFeatureTable : localGdb.getGeodatabaseTables()) {
if (gdbFeatureTable.hasGeometry())
mMapView.addLayer(new FeatureLayer(gdbFeatureTable));
}

I am unable to see the field i drawed using Arcmap in my android application when i use the basemap .TPK file.

I can only see my field(feature layer) drawn only when i am not including the basemap .TPK file.

Please help ...

Many thanks ...

0 Replies