I'm creating an Android application to display shapefiles. I'm using this code that I found on the Internet:
try {
ShapefileFeatureTable shapefileFeatureTable = new ShapefileFeatureTable("file:///mnt/sdcard/ShapeFile/LVA_water_lines_dcw.shp");
FeatureLayer featureLayer = new FeatureLayer(shapefileFeatureTable);
featureLayer.setRenderer(new SimpleRenderer(new SimpleFillSymbol(
getResources().getColor(android.R.color.holo_blue_bright),
SimpleFillSymbol.STYLE.SOLID)));
map.addLayer(featureLayer);
} catch (FileNotFoundException ex) {
//Toast.makeText(this, R.string.shapefile_not_found, Toast.LENGTH_LONG).show();
ex.printStackTrace();
return;
}
But it gives me the error:
ShapefileFeatureTable cannot be converted to FeatureTable