...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:"); }); });
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.