[OpenLayers-Users] wrong PX-Coordinates in IE as result of
getMousePosition?
Marc Jansen
jansen.marc at gmx.de
Wed Jan 21 05:03:21 EST 2009
Hi list,
I experienced differences in the returned values from getMousePosition
in IE 6 compaired to FF 3. I am not 100% sure but it might be related to
this bug:
http://trac.openlayers.org/ticket/1268
My setup is as follows: a map without border, margin or text-align
specified (but with regular changes in width). The x and y coordinates
gathered by the trigger function below seem wrong in IE:
/**
* Feature Info
*/
OpenLayers.Control.FeatureInfoClick = OpenLayers.Class(OpenLayers.Control, {
defaultHandlerOptions: {
'single': true,
'double': false,
'pixelTolerance': 3,
'stopSingle': false,
'stopDouble': false
},
initialize: function(options)
{
this.handlerOptions = OpenLayers.Util.extend( {}, this.defaultHandlerOptions );
OpenLayers.Control.prototype.initialize.apply( this, arguments );
this.handler = new OpenLayers.Handler.Click( this, {
'click': this.trigger
}, this.handlerOptions );
},
trigger: function(e)
{
// humpty is a WMS layer
var url = humpty.getFullRequestString({
REQUEST: "GetFeatureInfo",
EXCEPTIONS: "application/vnd.ogc.se_xml",
BBOX: humpty.map.getExtent().toBBOX(),
X: e.xy.x,
Y: e.xy.y,
INFO_FORMAT: 'text/html',
QUERY_LAYERS: humpty.params.LAYERS + "," + dumpty.params.LAYERS,
WIDTH: humpty.map.size.w,
HEIGHT: humpty.map.size.h});
OpenLayers.loadURL(url, '', this, setHTML);
}
});
Can anyone confirm my observed error is due to
http://trac.openlayers.org/ticket/1268?
Is there another (better) way of doing the above?
Thanks in advance,
Marc
()
More information about the Users
mailing list