laptop and a wrench

Erro

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

Última Publicação: August 25, 2014 No Product Found
Número de ID do Erro NIM074516
EnviadoOctober 24, 2011
Última ModificaçãoJune 5, 2024
Aplica-se àNo Product Found
Versão encontrada10.1
Versão FixaArcGIS.c
StatusFixed

Solução Provisória

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 });

Etapas para Reproduzir

ID do Erro: NIM074516

Software:

  • No Product Found

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download