<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Arial'; COLOR: #000000; FONT-SIZE: 10pt">
<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>I would kindly request some help because I have been struggling with an
issue occurring only in IE8 with my code.</DIV>
<DIV>You can take a look at a demo page that illustrates the problem at <A
href="http://www.europeontrack.com/test.html">http://www.europeontrack.com/test.html</A>.
As you’ll notice, it works fine Firefox, Chrome, Safari, but in IE8, it triggers
the Javascript Error “Invalid Argument” in openlayers.js line 684, character
178.</DIV>
<DIV> </DIV>
<DIV>This page begins by initializing an openlayers map object and declaring an
empty cityLayer vector layer which we’ll use later to draw points.</DIV>
<DIV>A link “show city list” asynchronously calls <A
href="http://www.europeontrack.com/cityList.html">http://www.europeontrack.com/cityList.html</A>
and inserts it in the DOM.</DIV>
<DIV>cityList.html declares an array where the names, latitudes and longitudes
of a few cities are stored.</DIV>
<DIV>This array is then passed as argument to the showCities() function which is
declared in test.html as follows:</DIV>
<DIV> </DIV>
<DIV>function showCities(cities,layer) {<BR>var pointFeatures = [] ;<BR>for ( i
= 0 ; i < cities.length ; i++)
{<BR>
pointFeatures[i] = new OpenLayers.Feature.Vector(new
OpenLayers.Geometry.Point(cities[i]['long'],
cities[i]['lat']).transform(map.displayProjection,map.baseLayer.projection));<BR>
pointFeatures[i].attributes = { label: cities[i]['label']
};<BR>}<BR> cityLayer.addFeatures(pointFeatures);<BR>return
false ;<BR>}</DIV>
<DIV> </DIV>
<DIV>In IE8, only the first city contained in the ‘cities’ array is drawn and
then the browser throws the “Invalid Argument” error.</DIV>
<DIV>You can take a look at my source code. I think I’ve stripped it down to the
minimum. I’m stuck at this point trying to troubleshoot this issue.</DIV>
<DIV>Thank you in advance for your help.</DIV>
<DIV> </DIV>
<DIV>Lothaire</DIV></DIV></DIV></BODY></HTML>