[OpenLayers-Users] please help us test OpenLayers 2.9RC1

Arnd Wippermann arnd.wippermann at web.de
Thu Apr 1 20:07:33 EDT 2010


Hi Bart,

I use the center parameter of the map options to store the center of my map.
After adding my layers to the map I use map.setCenter with this coordinate.

With the OpenLayers 2.9 RC1 library, this raise an error "maxExtent is
null", because if center is set in the options, this.setCenter is called at
the end of the initialize-function. But then I have not added any layer to
the map.

It seems, that this will only work, if the layers parameter is also set in
the map options.

http://gis.ibbeck.de/OLClient/examples/testMapCenter_29_RC1.html

I would suggest, that the setCenter in the init function should only be
called, if this.options.layers != null.

        // add any initial layers
        if (options && options.layers) {
            this.addLayers(options.layers);
        }
        
        // set center (and optionally zoom)
        if (options && options.layers && options.center) {
            // zoom can be undefined here
            this.setCenter(options.center, options.zoom);
        }


And I have noticed, that with exchange of the OpenLayers.js from 2.8 to 2.9,
also the style.css have to be taken fom 2.9 with the css for the
LayerSwitcher control.

Otherwise it seems, that 2.9 works like 2.8. A great job from the OpenLayers
developers.

Arnd


 

-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Bart van den Eijnden
Gesendet: Mittwoch, 31. März 2010 18:01
An: openlayers; users user
Betreff: [OpenLayers-Users] please help us test OpenLayers 2.9RC1

This is a reminder to everyone that OpenLayers 2.9 RC1 is out (since last
Friday), please help us test this release candidate by upgrading your
applications to 2.9RC1 and reporting any issues to us.

See also:
http://trac.openlayers.org/wiki/Release/2.9/Announce/RC1

Thanks in advance!

Best regards,
Bart
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list