使用产品:SuperMap iMobile Lite 10i 操作系统:ubuntu16
var dinfo = DatasourceConnectionInfo()
dinfo.setServer("http://192.168.1.129:8080/geoserver/wms")
dinfo.setEngineType(EngineType.OGC)
dinfo.setDriver("WMS")
dinfo.setAlias("song")
dinfo.setWebVersion("1.1.1")
dinfo.setWebFormat("format");
dinfo.setWebVisibleLayers("songjian:song");
dinfo.setWebCoordinate("EPSG:4326")
val rect = Rectangle2D(73.441277,18.159829,135.08693,53.561771)
dinfo.setWebBBox(rect)
println(m_workSpace.datasources);
var dataSource : Datasource = m_workSpace.datasources.open(dinfo)
m_mapView = findViewById(R.id.Map_view)
m_mapControl = m_mapView!!.getMapControl()
m_mapControl!!.getMap().getLayers().add(dataSource.getDatasets().get(0),true)
这段代码运行报错
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sj.geoserverdemo/com.sj.geoserverdemo.MainActivity}: java.lang.IllegalStateException: m_workSpace.datasources.open(dinfo) must not be null