Feature layer not displayed in Android application

3192
1
08-20-2014 07:38 AM
Highlighted
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 ...

Reply
0 Kudos
1 Reply
Highlighted
Occasional Contributor

This can be a spatial reference issue. Please check if the .tpk has the same spatial reference with the feature layer.