Closed GoogleCodeExporter closed 9 years ago
This ia also occuring with IE8 under Windows 7. It also causes the map window
to jump
out to zoom 3 and show the whole world regardless of the centre and zoom
options the
map was created with.
Another example of the problem:
http://vk5hz.com/sagrn/map/
http://vk5hz.com/sagrn/map/?nogeo
Original comment by daemond...@gmail.com
on 18 Feb 2010 at 12:45
Declare a global variable
var xhrText;
Down in the http GET section below // Returned successfully assign xhrText
xhrText = xhrFetcher.responseText;
Up in the render section, after groundNodes is assigned, test it
if(groundNodes.length === 0)
{
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.loadXML(xhrText);
groundNodes = xmlDoc.getElementsByTagName('GroundOverlay');
}
That should take care of it.
John Huddleston
Original comment by jhuddles...@hughes.net
on 9 Mar 2010 at 1:01
Hi,
still no success, you only get js error in Firefox:
ActiveXObject is not defined :-(
Original comment by pavelka....@gmail.com
on 10 Mar 2010 at 6:37
I got the same problem ,how can i do?
Original comment by snam...@gmail.com
on 16 Apr 2010 at 12:34
Use the line:
var xmlDoc = getXmlDomObject();
Use the function defined here:
function getXmlDomObject()
{
if (window.ActiveXObject)
{
var axVersions=
["MSXML2.DOMDocument.6.0","MSXML2.DOMDocument.5.0","MSXML2.DOMDocument.4.0","MSX
ML2.D
OMDocument.3.0","MSXML2.DOMDocument","Microsoft.XMLDOM"];
for(var i=0,imax=axVersions.length;i<imax;i++)
try{
var xmldomdoc=new ActiveXObject(axVersions[i]);
return xmldomdoc;
}
catch(ex){/* Do nothing */}
}
else {
try{
var xmldomdoc = new DOMParser();
return xmldomdoc;
}
catch(ex){/* Do nothing */}
}
return null;
}
Original comment by jhuddles...@hughes.net
on 22 Apr 2010 at 5:27
Here is another way by adding the tagName
var styleNodes = theDomParser('Style',responseXML);
var placemarkNodes = theDomParser('Placemark',responseXML);
var groundNodes = theDomParser('GroundOverlay',responseXML);
where the code for theDomparser is:
theDomParser = function(tagName,responseXML) {
var domNodes = responseXML.getElementsByTagName(tagName);
if (domNodes.length === 0) {
if (window.DOMParser) {
var dParser = new DOMParser();
xmlDoc = dParser.parseFromString(xhrText, "text/xml");
domNodes = xmlDoc.getElementsByTagName(tagName);
}
else {
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.loadXML(xhrText);
domNodes = xmlDoc.getElementsByTagName(tagName);
}
return domNodes;
}
}
If you still have trouble with a browser not in theDomParser, see my last post.
John Huddleston
Original comment by jhuddles...@hughes.net
on 22 Apr 2010 at 6:16
Where exactly should I put this code? Inside of the geoxml3.js file? If so, do
I need to alter my geoxml.parse('file.kml'); code at all? Thanks.
Original comment by stephenr...@gmail.com
on 29 Jun 2010 at 12:10
Hi, sorry I don't understand comment 2,5,6 Is this a solution for working
geoxml3 in IE. I am trying it and still get the same output - nothing in IE :-(
Original comment by pavelka....@gmail.com
on 21 Jul 2010 at 10:53
fixed in network_link branch.
Original comment by geocodezip
on 22 Sep 2010 at 5:44
[deleted comment]
Hi, I don't follow comments 2,5,6 where should this codes be placed?
Original comment by raphca...@gmail.com
on 26 May 2015 at 6:28
Original issue reported on code.google.com by
pavelka....@gmail.com
on 16 Feb 2010 at 1:31