[OpenLayers-Users] Polygon doesn't align with baselayer with IE8
Jessica Lapointe
jlapointe at mapgears.com
Mon Mar 12 15:59:27 EDT 2012
Hi everyone,
I display some wfs features over a baselayer. It looks great in all
browsers but Internet Explorer, in which my country polygons are off
by a few pixels. (Here's a screenshot: http://i.imgur.com/zPvq9.png )
The error is more or less important depending on the zoom level, but
it's never perfectly aligned as it is in chrome, firefox & safari.
I use OpenLayers 2.11 and mapserver 6.0.1. I didn't try with other
versions of IE.
Below are my map and layers definitions.
I have no idea how to fix this, so any clue would be appreciated.
Thanks a lot,
Jessica Lapointe
var myextent = new OpenLayers.Bounds(-180, -90, 180, 90);
var options = { minScale: 150000000,
units: "degrees",
restrictedExtent: myextent,
numZoomLevels: 6,
controls: [new OpenLayers.Control.Navigation(), new
OpenLayers.Control.ArgParser()]
};
map = new OpenLayers.Map('map', options);
//WMS Background world map layer
var worldLayer = new OpenLayers.Layer.WMS("countries",
host+"phac.map&service=WMS",
{layers:
'countries,countrieslabels'},{'isBaseLayer':true, 'singleTile': false}
);
map.addLayer(worldLayer);
worldLayer.events.on({
"loadend":onWorldLoaded
});
//WFS feature layer
//Colored countries
countriesLayer = new OpenLayers.Layer.Vector("Countries", {
styleMap: styleMapCountries,
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url:host+"phac.map&service=WFS",
featureType: "projectcountries",
featureNS: "http://mapserver.gis.umn.edu/mapserver"
}),
visibility: true
});
countriesLayer.events.on({
"loadend":onCountriesLoaded
});
More information about the Users
mailing list