【发布时间】:2016-11-29 10:10:21
【问题描述】:
我已尝试使用以下代码从我的 SD 卡读取和显示 shapefile
ShapefileFeatureTable shapefileFeatureTable = null;
try {
shapefileFeatureTable = new ShapefileFeatureTable(Environment.getExternalStorageDirectory().getAbsolutePath()+"/India_SHP/INDIA.shp");
featureLayer = new FeatureLayer(shapefileFeatureTable);
featureLayer.setRenderer(new SimpleRenderer(new SimpleMarkerSymbol(
getResources().getColor(android.R.color.holo_blue_bright),
28, SimpleMarkerSymbol.STYLE.CIRCLE)));
mMapView.addLayer(featureLayer);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
这是我的应用程序 build.gradle 文件详细信息
dependencies {
repositories {
jcenter()
// Add the Esri public Bintray Maven repository
maven {
url 'https://esri.bintray.com/arcgis'
}
}
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.1'
testCompile 'junit:junit:4.12'
compile 'com.esri.arcgis.android:arcgis-android:10.2.5'
}
最后我得到了空白的黑屏
有人可以帮我解决这个问题吗?我正在尝试过去三天的这个例子
【问题讨论】:
标签: android google-maps shapefile