Hi everyone,
I am using jQuery to load an external SVG (a map of France) and parse it into paths with raphaël.js the following code. But it is not doing anything in IE. Any ideas?
$(document).ready(function(){
var paper = Raphael("canvas", 450, 380);
var map = paper.set();
// load svgz map
$.ajax({
type: "GET",
url: "map-smllr.svgz",
dataType: "xml",
success: parseXml
});
// ... removed a few other variables
function parseXml(xml) {
var count = 0;
$(xml).find("g").children("path").each(function()
{
var deptNr = depts[count];
var path = $(this).attr("d");
var c = paper.path(path);
c.attr(attr).attr("title",deptNr);
map.push(c);
count++;
});
//startMap();
}
});
You can view a full source here: http://ngjulie.com/map/raphael.html
I have a funky caching issue in Chrome too, where a blank spot is shown until the user hovers over the canvas.
But the biggest problem is that this is not working in IE. The general examples on the RaphaelJS website work fine. So it must be something in my code.
Any ideas?
Cheers, Julie