package com.example.modle;
import androidx.appcompat.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ZoomControls;
import com.supermap.data.Environment;
import com.supermap.data.Workspace;
import com.supermap.data.WorkspaceConnectionInfo;
import com.supermap.data.WorkspaceType;
import com.supermap.mapping.MapControl;
import com.supermap.mapping.MapView;
public class MainActivity extends Activity {
private MapControl m_mapcontrol = null;
private Workspace m_workspace;
private MapView m_mapView;
private ZoomControls m_zoom;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//设置一些系统需要用到的路径
String rootPath =
android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
String wksPath = rootPath + "/SuperMap/SampleData/CBD/CBD 场景.sxwu";
Workspace m_workspace = new Workspace();
WorkspaceConnectionInfo info = new WorkspaceConnectionInfo();
info.setServer(wksPath);
info.setType(WorkspaceType.SXWU);
if (m_workspace.open(info)) {
m_sceneControl.getScene().setWorkspace(m_workspace);
}
String sceneName = m_workspace.getScenes().get(0);
Boolean bOpened = m_sceneControl.getScene().open(sceneName);
}
}
这个直接这样用打开本地工作空间的范例代码可以吗,我把这段代码复制进去,然后就报错:cannot resolve symbol