[OpenLayers-Users] Problem with maxZoomLevel, WFS land Google layers

Pedrazzi Gelsomini pedrazzi.gelsomini at gmail.com
Fri Jan 19 14:42:14 EST 2007


Hi everyone,

I have a problem with the "maxZoomLevel" attribute.
I need to have a maxZoomLevel bigger than 16 for my "Google Satellite"
layer.
So I tried to set the 'maxZoomLevel' at 17 (or more).
The problem is that I can zoom-in the Google map layer until 17, but after
16 my markers disappear.
I added my marker from mapserver like a WFS layer.
What is the trouble?

This is a piece of my code:
______________________________________________________________________________________________________________________

        map = new OpenLayers.Map('map', {controls: [], 'numZoomLevels':17,
unix:'meters', projection: 'EPSG:4326'});

        var satellite = new OpenLayers.Layer.Google( "Google Satellite" ,
{type: G_SATELLITE_MAP, 'maxZoomLevel':17} );
        var hybrid = new OpenLayers.Layer.Google( "Google Hybrid" , {type:
G_HYBRID_MAP, 'maxZoomLevel':17});
        var normal = new OpenLayers.Layer.Google( "Google Map" , {type:
G_NORMAL_MAP, 'maxZoomLevel':17});


        var wfs = new OpenLayers.Layer.WFS( "Points WFS",
                "
http://localhost/cgi-bin/mapserv?map=/var/www/mysite/mapserver/config/my_points.map&",

        {typename: "points", maxfeatures: 100, maxZoomLevel : 17, 'layers':
'points'},
                { featureClass: OpenLayers.Feature.WFS},
        {isBaseLayer: false});
______________________________________________________________________________________________________________________

I read a comment (
http://openlayers.org/pipermail/users/2006-November/000108.html) about a
similar problem, but with a WMS layer and not a WFS layer.
The answer was:

" This problem is probably related to the fact that numZoomLevels for the
WMS layer is by default less than that for the Google layer, so you can zoom
in farther for Google, and the WMS layer turns off.
I'm not sure though, so if you can't figure out how to resolve it, it
probably makes sense to open a ticket in Trac. "

Do you think that it is the same problem that I have?
Any suggestions?

Thanks so much!
Francesca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070119/5b1d1b39/attachment.html


More information about the Users mailing list