Thanks to Patrick and Kevin, I now have my satellites mapped to ECF coordinates; thanks guys!
I sometimes do development when on transit. I’m trying to figure out how to make the CentralBody.dayTileProvider detect if it can’t pull from Bing, and use the SingleTileProvider instead.
When I spec my Bing provider, I set ‘onerror’ but never see it invoked:
var bing = new Cesium.BingMapsTileProvider({
onerror : function () { console.log("ZOMG, a Bing error"); },
server : 'dev.virtualearth.net',
mapStyle : Cesium.BingMapsStyle.AERIAL
});
var cb = new Cesium.CentralBody(ellipsoid);
cb.dayTileProvider = bing;
I do see the GET fail in Chrome’s Javascript console:
-
GET http://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?key=AquXz3981-1ND5jGs8qQn7R7YUP8qkWi77yZSVM7o3nIvzb-Mg0W2Ta57xuUyywX&jsonp=jsonp973179 cesium.js:55519
-
jsonpcesium.js:55519
-
BingMapsTileProvider._requestTemplatecesium.js:56014
-
BingMapsTileProvidercesium.js:55930
-
(anonymous function)index.js:45
-
(anonymous function)
Is there a different way I should be detecting this? I was hoping to be able to do something like the following but if onerror’s not called, I don’t know how to hook the 404.
var bin = new Cesium.BingMapsTileProvider({
onerror : function () { bing = new CesiumSingleTileProvider(‘Images/NE2_50M_SR_W_4096.jpg’);},
…
Thanks.