I'm having some trouble getting this to work in IE11 (It works perfectly in Firefox). I am getting an error that says "Error loading image for billboard: SecurityError". If I display the SVG directly in a <div> element on the same page, the image does display with no issues. Here is a tweaked sandcastle example that incorporates Scott's fix from above, and uses a base64 string instead:
var viewer = new Cesium.Viewer('cesiumContainer');
var billboards = new Cesium.BillboardCollection();
viewer.scene.primitives.add(billboards);
function drawImage(id) {
var svgpart = "<svg version='1.1' xmlns='
http://www.w3.org/2000/svg' height='10px' width='10px'><rect width='15' height='15' style='fill:red;' /></svg>";
var svg = "data:image/svg+xml;base64," + btoa(svgpart);
return Cesium.loadImage(svg);
}
var billboard = billboards.add({
show : true,
position : Cesium.Cartesian3.fromDegrees(-100, 35, 0)
});
//Error
billboard.setImage("test", drawImage);
On Wednesday, August 26, 2015 at 11:49:55 AM UTC-7, Scott Hunter wrote: