...it appears the JS API is detecting the protocol (http vs https) of the host page and switching the bing maps request protocol automatically.
Was this fix implemented at 2.6? If so, how do I create an https bing maps layer at 2.6? I'm trying to find API documentation on it but can't.Further, can I create an https bing maps layer as an esri.dijit.BaseMapLayer type?
We'll put a fix in for this in the next version of the API (2.6).
esri.setRequestPreCallback(function(ioArgs) { if(ioArgs.url.search("serverapi.arcgisonline.com/veadaptor/") > 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:"); }); });
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.