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

Christopher Schmidt crschmidt at metacarta.com
Tue Jun 9 11:19:48 EDT 2009


On Tue, Jun 09, 2009 at 11:12:37AM -0400, Steve.Toutant at inspq.qc.ca wrote:
> 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?

You put visibility in the third argument to the Vector layer. Vector
layers don't take three arguments.

-- Chris

> 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
>  

> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users


-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list