[OpenLayers-Users] How can we add diffrent feature sets into a single layer?

Eric Lemoine eric.c2c at gmail.com
Sun Nov 23 10:19:36 EST 2008


On Fri, Nov 21, 2008 at 8:53 AM, S.Reena <reena at indiamail.com> wrote:
>
> Is it that you want all the three point,polygon and point as a layer ?? If
> yes then a commas separated list will do as:
>
> var layer = new OpenLayers.Layer.WMS.Untiled(
>          "Natural Resources", "http://gis.rtbi-iitm.in/cgi-bin/mapserv?",
>
> {map:'/var/www/html/customisation/mapfile/customNR.map',transparent:true},{layers:'NR_point,NR_polygon,NR_line'},{'displayInLayerSwitcher':false},
>          {isBaseLayer:false});

This should be:

 var layer = new OpenLayers.Layer.WMS.Untiled(
    "Natural Resources", "http://gis.rtbi-iitm.in/cgi-bin/mapserv?",
    {map: "/customNR.map", transparent: true, layers:
"NR_point,NR_polygon,NR_line"},
    {displayInLayerSwitcher: false, isBaseLayer: false}
);

layers are set in the params, and displayInLayerSwitcher and
isBaseLayer are set in the config object (one single config object!)

--
Eric



More information about the Users mailing list