Search code examples
androidmapsarcgis

Unable to read shape file in Android


I am trying to use ShapefileFeatureTable() to read shape file in android. No matter what path I give, it says, "File Not Found" exception.

try 
{
    ShapefileFeatureTable shpFileFeatTable = new ShapefileFeatureTable("/storage/sdcard/map.shp");
} 
catch (FileNotFoundException e) 
{
    e.printStackTrace();
} 
catch(Exception e)
{
    e.printStackTrace();
}

Can anyone help me?

Note: I am working on Android Emulator. Also I am using arcGIS library.


Solution

  • It turns out, it was displaying the shapefile. I had to blank the MapView to see it.

    <com.esri.android.map.MapView
        android:id="@+id/map"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >
    </com.esri.android.map.MapView>