【发布时间】:2023-03-09 09:22:01
【问题描述】:
我正在开发 iOS 应用程序,该应用程序使用 AGSRuntime Environment API for iOS 通过名为 "proxy.ashx" 的 .Net 代理加载地图图层(动态和要素图层)。如以下代码行:
NSString *MAPServiceURL = @"https://myDomain/sourceCodePath/proxy.ashx?http://my_ArcGis_Server/arcgis/rest/services/MapService/MapServer/"
NSString *FeatureLayerURL = @"https://myDomain/sourceCodePath/proxy.ashx?http://my_ArcGis_Server/arcgis/rest/services/MapService/MapServer/0"
self.dynamicLayer = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL:[NSURL URLWithString:MAPServiceURL]];
self.featureLayer = [[AGSFeatureLayer alloc] initWithURL:[NSURL URLWithString:FeatureLayerURL] mode:AGSFeatureLayerModeSnapshot];
我的问题是动态层没有出现。并且在 iOS 应用端没有发生错误。
在 proxy.ashx 端,它重定向请求并将响应(OK 200)作为 HTML 页面返回。
注意:在 Web 应用程序中成功加载的同一张地图通过相同的“proxy.ashx”使用适用于 JavaScript 的 AGSRuntime Environment API。
那么,我的错误是什么?
【问题讨论】:
标签: ios dictionary proxy arcgis