For some days i´m battling with this issue: i´m using Jquery to extract data from a XML and place it on Google Maps V3 as markers, but it doesnt place any marker on Chrome and Opera, after some debugging i found out the problem is in this lines:
var lat = $(this).find("geo\\:lat").text();
var lng = $(this).find("geo\\:long").text();
In the XML is , i need to remove the “:”.
While in FF and IE the “\” to remove “:” works perfectly, on Chrome and Opera doesnt work..but if i go to the XML and remove the “:” from that field and run the code using this lines, it works perfectly.
var lat = $(this).find("geolat").text();
var lng = $(this).find("geolong").text();
This is a simplified version that replicates the error on Chrome and Opera
http://dl.dropbox.com/u/15802004/teste.zip
To replicate the error, this is the comment/uncomment lines.
//url: "teste1.xml",
url: "teste2.xml",
(and...)
//var lat = $(this).find("geo\\:lat").text();
//var lng = $(this).find("geo\\:long").text();
var lat = $(this).find("geolat").text();
var lng = $(this).find("geolong").text();
I appreciate any help
This is a known, but still unfixed bug.
You may use
getElementsByTagNameNS()instead(works in FF,Chrome & Opera) and$.find()as a fallback for IE.Example for
geo:lat: