laptop and a wrench

漏洞

Add support for https to VE (Virtual Earth) tiled layer.

上次发布: August 25, 2014 No Product Found
漏洞 ID 编号 NIM074516
已提交October 24, 2011
上次修改时间June 5, 2024
适用范围No Product Found
找到的版本10.1
修正版本ArcGIS.c
状态Fixed

解决办法

Use esri.setRequestPreCallback() to modify requests for Bing tiles to use https or modify the VETiledLayer prototype.Using setRequestPreCallback: esri.setRequestPreCallback(function(ioArgs) { if(ioArgs.url.search("<a href="http://serverapi.arcgisonline.com/veadaptor/" target="_blank">serverapi.arcgisonline.com/veadaptor/</a>") > 0) { ioArgs.url = ioArgs.url.replace("http:", "https:"); } return ioArgs; }); //Creates the Virtual Earth layer to add to the map veTileLayer = new esri.virtualearth.VETiledLayer({ bingMapsKey: 'Ah29HpXlpKwqVbjHzm6mlwMwgw69CYjaMIiW_YOdfTEMFvMr5SNiltLpYAcIocsi', mapStyle: esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL }); dojo.connect(veTileLayer, "onLoad", function(veTileLayer) { veTileLayer.tileServers = dojo.map(veTileLayer.tileServers, function(tileServer) { return tileServer.replace("http:", "https:"); }); });Modifying the prototype: var ve_gti = esri.virtualearth.VETiledLayer.prototype._getTileInfo; esri.virtualearth.VETiledLayer.prototype._getTileInfo = function () { this.url = "<a href="https://serverapi.arcgisonline.com/veadaptor/production/services/imagery/getmetadata" target="_blank">https://serverapi.arcgisonline.com/veadaptor/production/services/imagery/getmetadata</a>"; this._url = esri.urlToObject(this.url); return ve_gti.apply(this, arguments); }; var ve_il = esri.virtualearth.VETiledLayer.prototype._initLayer; esri.virtualearth.VETiledLayer.prototype._initLayer = function (response) { if (response) { response.imageUri = response.imageUri.replace("http:", "https:"); } return ve_il.apply(this, arguments); }; var veTileLayer = new esri.virtualearth.VETiledLayer({ bingMapsKey: '<key>', mapStyle: esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL });

重现步骤

漏洞 ID: NIM074516

软件:

  • No Product Found

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项