[OpenLayers-Users] IE 8 this.size.w is null or not an object
-OL 2.9
Dash
jimlug at co.clackamas.or.us
Tue May 18 15:03:28 EDT 2010
Well, after many hours of struggling and the process of elimination I figured
it out . I'll share my results for anyone else struggling like me .
Previously, I was using a getFullSRequestString with a OpenLayers.loadURL to
return an Ajax object that contained my GML information. Then, I converted
the response into and XML format for parsing.
xmlFormat = new OpenLayers.Format.XML().read(response.responseText);
>From the XML, I needed to obtain some tag information. I've placed a field
("feature") in my data that describes the title of the layer. I used this
to identify which layer I'm working with.
featureType = xmlFormat.getElementsByTagName("feature")[0]; // This is the
part that did not work in IE but every other browser
lyrName = featureType.textContent; // Provided me with layer name that was
stored in feature field
Since I'm rather new to DOM and XML parsing I had to dig a little deeper and
this is what I found.
featureType = xmlFormat.getElementsByTagName("feature")[0].firstChild.data;
The above statement worked in all browsers: IE, Safari, Opera and Firefox.
I hope this helps.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/IE-8-this-size-w-is-null-or-not-an-object-OL-2-9-tp5006221p5071576.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list