整个类就只有这一个方法,在 viewDidLoad里执行完最后一句,挂掉了
-(void)openMap
{
if (m_workspace == nil) {
// 初始化
m_workspace = [[Workspace alloc]init];
}
m_ConnectionInfo = [[DatasourceConnectionInfo alloc] init];
m_ConnectionInfo.server = @"http://supermapcloud.com";
m_ConnectionInfo.engineType = ET_SuperMapCloud;
m_ConnectionInfo.alias = @"SuperMapCloud";
Datasource *dsClond = [m_workspace.datasources open:m_ConnectionInfo];
[_m_mapcontrol mapControlInit];
_m_mapcontrol.map.workspace = m_workspace;
if (dsClond) {
DebugLog(@"共计:%zi",dsClond.datasets.count);
Dataset *ds = [dsClond.datasets get:0];
[_m_mapcontrol.map close];
[_m_mapcontrol.map.layers addDataset:ds ToHead:YES];
}
_m_mapcontrol.map.scale = 0.1f/5000;
//获取地图坐标系
PrjCoordSys *prjCoordSys = _m_mapcontrol.map.prjCoordSys;
//坐标系转换
Point2Ds *point2ds = [[Point2Ds alloc] init];
//默认成都地址
[point2ds add:[[Point2D alloc] initWithX:106.06 Y:30.04]];
BOOL isOk= [CoordSysTranslator forward:point2ds PrjCoordSys:prjCoordSys];
if (isOk) {
}
if (point2ds.getCount > 0) {
Point2D *point2d=[point2ds getItem:0];
_m_mapcontrol.map.center = point2d;
}
[_m_mapcontrol.map refresh];
[_m_mapcontrol setAction:PAN];
// [_m_mapcontrol.map viewEntire];
报错:
/Users/imobile/Documents/SourceCode/fabu/jni/Src/GraphicsMem/UGFreeTypeLib.cpp:147: OGDCASSERT(error == 0) failed.
/Users/imobile/Documents/SourceCode/fabu/jni/Src/GraphicsMem/UGFreeTypeLib.cpp:620: OGDCASSERT(error == 0) failed.
libc++abi.dylib:
(lldb) bt
* thread #1: tid = 0x1cc839, 0x1e2e3ad4 libsystem_kernel.dylib`__pthread_kill + 8, queue = 'com.apple.main-thread', stop reason = signal SIGABRT