代码如下
m_workspace=[[Workspace alloc]init];
DatasourceConnectionInfo *info=[[DatasourceConnectionInfo alloc]init];
info.driver=@"WMTS";
info.engineType=ET_BAIDU;
//info.server=@"
http://map.baidu.com";
info.server = @"
http://map.tianditu.com";
[m_workspace.datasources open:info];
m_mapControl=[[MapControl alloc]initWithFrame:[[UIScreen mainScreen]bounds]];
[self.view addSubview:m_mapControl];
[m_mapControl mapControlInit];
[m_mapControl.map setWorkspace:m_workspace];