iOS 3D数据叠加
ArcGIS Runtime SDK for iOS 100.4,slpk数据采用投影坐标wkid=3857。请问这种能叠加到底图成功吗,或者如何展示slpk数据?代码如下,展示失败。
//Scene
_scene = [AGSScene sceneWithBasemapType:AGSBasemapTypeImagery];
NSString *docPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).lastObject;
NSString *slpkPath = [docPath stringByAppendingPathComponent:@"jzproject3857.slpk"];
NSURL *url = [NSURL fileURLWithPath:slpkPath];
AGSArcGISSceneLayer *layer = [AGSArcGISSceneLayer ArcGISSceneLayerWithURL:url];
[layer loadWithCompletion:^(NSError * _Nullable error) {
NSLog(@"layer full Extent= %@", layer.fullExtent);
NSLog(@"加载scene错误 = %@", error.localizedDescription);
}];
[_scene.operationalLayers addObject:layer];
//SceneView
_sceneView = [[AGSSceneView alloc] initWithFrame:self.view.bounds];
_sceneView.backgroundColor = [UIColor whiteColor];
_sceneView.attributionTextVisible = NO;
AGSCamera *camera = [AGSCamera cameraWithLatitude:33.3029778 longitude:120.0920637 altitude:20 heading:0 pitch:-20 roll:0];
[_sceneView setViewpointCamera:camera];
_sceneView.scene = self.scene;
//Scene
_scene = [AGSScene sceneWithBasemapType:AGSBasemapTypeImagery];
NSString *docPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).lastObject;
NSString *slpkPath = [docPath stringByAppendingPathComponent:@"jzproject3857.slpk"];
NSURL *url = [NSURL fileURLWithPath:slpkPath];
AGSArcGISSceneLayer *layer = [AGSArcGISSceneLayer ArcGISSceneLayerWithURL:url];
[layer loadWithCompletion:^(NSError * _Nullable error) {
NSLog(@"layer full Extent= %@", layer.fullExtent);
NSLog(@"加载scene错误 = %@", error.localizedDescription);
}];
[_scene.operationalLayers addObject:layer];
//SceneView
_sceneView = [[AGSSceneView alloc] initWithFrame:self.view.bounds];
_sceneView.backgroundColor = [UIColor whiteColor];
_sceneView.attributionTextVisible = NO;
AGSCamera *camera = [AGSCamera cameraWithLatitude:33.3029778 longitude:120.0920637 altitude:20 heading:0 pitch:-20 roll:0];
[_sceneView setViewpointCamera:camera];
_sceneView.scene = self.scene;
2 个回复
GIS小菜鸟
赞同来自:
这个数据能在arcgis pro中打开吗? 如果可以打开,可否分享一下数据?
回复
TTmrxb
赞同来自:
要回复问题请先登录或注册
发起人
相关问题
问题状态
—— 扫技术支持中心微信服务号!
—— 让GIS知乎问答随时随地!