[OpenLayers-Users] Visibility: false, WFS cluster strategy

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Tue Jun 9 11:12:37 EDT 2009


Hi,
This vector layer is automatically checked in the layer switcher (and the 
data visible) when the map is rendered even if visibility is set to false.
Does visibility still a good param when we create the vector layer with a 
cluster strategy?
Thanks
Steve

 var createWFSclusterStrategy = function(name, url, mapFileLayerName)
    {
        wfsStrategy = new OpenLayers.Layer.Vector(name,
        {
          strategies: [
          //     new OpenLayers.Strategy.Fixed(),
                           new OpenLayers.Strategy.BBOX(),
               new OpenLayers.Strategy.Cluster() 
          ],
          protocol: new OpenLayers.Protocol.HTTP({
               url: url,
               params: {
                    format: "WFS",
                    service: "WFS",
                    request: "GetFeature",
                    srs: "EPSG:900913",
                    VERSION : "1.0.0",
                    typename :mapFileLayerName,
               },
               format: new OpenLayers.Format.GML()
          }),
          styleMap:new OpenLayers.StyleMap({
               "default": WFSstyle,
               "select": {
                    fillColor: "#8aeeef",
                    strokeColor: "#32a8a9"
               }
          })
     },
     {
          extractAttributes:true,
         visibility: false
     });//fin du new vector
        };
 
 

Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3 
Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant at inspq.qc.ca
http://www.inspq.qc.ca
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090609/68312a05/attachment.html


More information about the Users mailing list