[OpenLayers-Users] GMap layers become disabled

Brett Wilton bdwilton at gmail.com
Wed May 2 22:24:18 EDT 2007


Hello,
I have OpenLayers 2.3 stable installed and have a standard google map
displayed with some WMS overlays. What I have found is that when
minZoomLevel is set the WMS overlays become disabled as I zoom in.

>From reading other posts I take it this is a bug, can someone tell me has
this been fixed in 2.4 or is there any other solution to this problem ?

I have tried changing the Google.js to have maxZoomLevel:20 and added the
appropriate resolutions. This means I can zoom in a couple of extra zoom
levels but as this happens the WMS overlays get disabled, this still doesnt
solve the problem with having a minZoomLevel, if that is set the overlays
get disabled earlier.

my code is similar to the following:-

                        var options = {
                                controls: [],
                                numZoomLevels: 20,
                                minZoomLevel: 5
                        };
                        OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
                        map = new OpenLayers.Map('map', options);

                        var baseOptions = {isBaseLayer: true};
                        googleMap = new OpenLayers.Layer.Google
(\"GoogleMap\",
                                            {type: G_NORMAL_MAP}
                                            );
                        googleMap.addOptions(baseOptions);

                        googleHyb = new OpenLayers.Layer.Google
(\"GoogleHyb\",
                                            {type: G_HYBRID_MAP}
                                            );
                        googleHyb.addOptions(baseOptions);

                        var layerOptions = {isBaseLayer: false, visibility:
false};
                        wms_nz = new OpenLayers.Layer.WMS(\"WMS NZ Coast\",
                                            \"
http://localhost:8080/geoserver/wms?service=wms\",
                                            {layers: 'bimaris:nzcoast',
format: 'image/png', transparent: true}
                                    );
                        wms_nz.addOptions(layerOptions);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070503/276f75e1/attachment.html


More information about the Users mailing list