<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><PRE id=line82><SPAN class=737033320-18122009>minScale and maxScale or minResolution and maxResolution should do the trick.</SPAN></PRE><PRE>        function layerGML_BW(title, url, projection)
        {
            var lyr = new OpenLayers.Layer.Vector(title , {
                minScale : 4000,
                maxScale : 50,
                projection: projection,
                strategies: [new OpenLayers.Strategy.Fixed()],
                protocol: new OpenLayers.Protocol.HTTP({
                    url: url,
                    format: new OpenLayers.Format.GML({
                        extractAttributes: true
                    })
                })
            });
            return(lyr);
        }
</PRE><PRE><SPAN class=737033320-18122009>from </SPAN><A href="http://gis.ibbeck.de/ginfo/apps/planwerk/planwerk_nordbahntrasse.asp">http://gis.ibbeck.de/ginfo/apps/planwerk/planwerk_nordbahntrasse.asp</A></PRE></DIV>
<DIV><SPAN class=737033320-18122009><FONT face=Arial color=#0000ff size=2>if you 
zoom into the small recangles, a layer with labels will show 
up.</FONT></SPAN></DIV>
<DIV><SPAN class=737033320-18122009><FONT face=Arial color=#0000ff 
size=2><BR>Arnd</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><BR>&nbsp;</DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> users-bounces@openlayers.org 
[mailto:users-bounces@openlayers.org] <B>Im Auftrag von </B>Lammie 
Jonson<BR><B>Gesendet:</B> Donnerstag, 17. Dezember 2009 22:33<BR><B>An:</B> 
users@openlayers.org<BR><B>Betreff:</B> [OpenLayers-Users] rendering WFS and 
vectors based on zoom levels<BR></FONT><BR></DIV>
<DIV></DIV><BR>&nbsp;I figured out how to render WFS from my website using a 
proxy. The browser will send a request like this<BR>to the server:<BR>&nbsp; 
Parameters: {"url"=&gt;"<A 
href="http://mysite.com?typename=topp%3Astates&amp;SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;SRS=EPSG%3A4326&amp;BBOX=-570.9375,-457.646484375,819.84375,380.478515625">http://mysite.com?typename=topp%3Astates&amp;SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;SRS=EPSG%3A4326&amp;BBOX=-570.9375,-457.646484375,819.84375,380.478515625</A>"}<BR><BR>&nbsp;Suppose 
I only want the content rendered through WFS to only be visible at lower zoom 
levels, is there a way to indicate this in openlayers in the constructor for the 
WFS layer ?<BR><BR>&nbsp;I would like to also be able to do that for any other 
vector data as well. I could do this in a variety of ways using session data 
through a cookie or by somehow checking the map zoom level whenever the map 
moves. In the case of WFS, maybe I could somehow figure out the zoom level from 
the bounding box, but if there is a more transparent way to do that I would like 
to do it that way or whatever is the preferred cleaner approach, etc. 
<BR><BR><BR></BODY></HTML>