[OpenLayers-Users] 2.3RC2 problem?

Christopher Schmidt crschmidt at metacarta.com
Tue Jan 23 08:54:48 EST 2007


On Tue, Jan 23, 2007 at 02:04:08PM +0100, Bart van den Eijnden (OSGIS) wrote:
> Hi Christopher,
> 
> it happens in both Firefox and IE. It happens every time.
> 
> But not on the site you point out. My code is slightly different though (I
> construct the map object without the default controls):
> 
> map = new OpenLayers.Map( $('imgMapContainer'), { controls: [],
> 'projection': 'EPSG:28992', 'units':'m', 'maxExtent': new
> OpenLayers.Bounds(-80000, 300000, 370000, 615000) ,
> 'maxResolution':'auto'});
> 
> map.addControl(new OpenLayers.Control.PanZoomBar());
> map.addControl(new OpenLayers.Control.MouseDefaults());
> map.addControl(new OpenLayers.Control.MouseToolbar(new
> OpenLayers.Pixel(30,0), 'horizontal'));

Don't include the toolbar and the defaults. The Toolbar is a subclass of
the defaults: if you include one, you shouldn't include the other. I'll
document this on the wiki docs for MouseDefaults/Toolbar later today.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list