This project has moved and is read-only. For the latest updates, please go here.

openlayers problem in IE6

Topics: General Topics, SharpMap v0.9 / v1.x
Oct 15, 2008 at 7:29 AM
Edited Oct 15, 2008 at 7:43 AM
I use more than one openlayers vector layer to overlay the map. every layer has its event. in IE6, the upper layer covers completely the lower layer. so, the other vector layer event can not be triggered. in IE7 or firefox, there's no this issue.
I try to render the vector layer div border, and find the div fill the entire map. in IE7 or firefox, the border shrinks to the top left corner. so the layer don't cover the lower layer.
how to solve this problem ? or how to put this question on Openlayers offical website?
thanks. :-)
Oct 15, 2008 at 10:32 AM
Hi cdgrain, I am not familiar with this issue, but I have seen special ie6 style handling in the latest version of openlayers (currently 2.7 at the time of writing) upgrading may help. OpenLayers trouble tickets can be opened here hth jd
Oct 24, 2008 at 9:12 AM
Edited Oct 24, 2008 at 9:29 AM
hi, JohnDiss

I'v put forward this issue on OpenLayers mail list. and some one try to resolve this problem. but he said there's no solution to this issue possibly. his name is Eric Lemoine, i don't know if he is a OpenLayers developement member.

I paste code here, and can you try to analysis it? thanks.

first, add <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
""> to the page. If not, IE7 will not work too.

var map = new OpenLayers.Map('map');
           var layer = new OpenLayers.Layer.WMS("OpenLayers WMS",
                   "", { layers: 'basic' });
           map.addControl(new OpenLayers.Control.LayerSwitcher());

           var lineLayer1 = new OpenLayers.Layer.Vector("Line Layer1");
           var pts = [];
           pts.push(new OpenLayers.Geometry.Point(0, 1));
           pts.push(new OpenLayers.Geometry.Point(12, 50));
           var line = new OpenLayers.Feature.Vector(new
OpenLayers.Geometry.LineString(pts), null,['default']);
 "mouseover", lineLayer1, function(e) {
      = "pointer";
               var feature = this.getFeatureFromEvent(e);
               if (feature)
           var lineLayer2 = new OpenLayers.Layer.Vector("LineLayer2");
           var pts = [];
           pts.push(new OpenLayers.Geometry.Point(-70, -10));
           pts.push(new OpenLayers.Geometry.Point(12, 50));
           var line = new OpenLayers.Feature.Vector(new
OpenLayers.Geometry.LineString(pts), null,['default']);
 "mouseover", lineLayer2, function(e) {
      = "pointer";
               var feature = this.getFeatureFromEvent(e);
               if (feature)

           map.setCenter(new OpenLayers.LonLat(0, 0));

IE6, FF only alert "LineLayer2". IE7 can alert "LineLayer1" and "LineLayer2".
I don't know which browser behave right.

I find dean.edwards do a good work on IE6 patch to make it respect to W3C standard.
but, it still can not solve this problem.
Oct 24, 2008 at 10:23 AM
Hi cdgrain, this sounds like your problem it seems to have been resolved and then reopened. I think Eric Lemoine is an OpenLayers dev.. I am not sure which browser is right, but most useful would be if you register for an event you get it regardless of whether it is topmost or not.. cheers jd
Oct 30, 2008 at 2:23 AM
hi, John
this ticket still not resolve the problem.
the demo website will not work in IE6 but work in FF3.
I think my problem is a hard work.