使用产品:iserver 10 version 10.0.0 操作系统:win10
使用产品:iclient_android_8.1.0.jar 操作系统:Android9
无法使用mbtile离线地图
代码
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
requestPermissions();
mapView = (MapView) this.findViewById(R.id.mapview);
//存放离线缓存位置
// String offlinePath = RootPath + "/SuperMap/data/normal_-1107073655_256X256_PNG.mbtiles";
String offlinePath = "SuperMap/data/normal_-1107073655_256X256_PNG.mbtiles";
System.out.println("offlinePath : " + offlinePath);
MBTilesLayerView layerView = new MBTilesLayerView(this, offlinePath);
// mapView.getController().setZoom(1);
mapView.addLayer(layerView);
mapView.setBuiltInZoomControls(true);
System.out.println("ok");
}
xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<com.supermap.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:enabled="true"
android:background="@color/colorPrimary"/>
</LinearLayout>
控制台能偶打印sql, 并由查询结果