[OpenLayers-Users] How do you represent multiple layers in a MapServer Query

David H. McCoy davidhmccoy at COX.NET
Tue Feb 12 16:54:07 EST 2008


A variation on your theme worked. I put the multiple layers in the URL

this 
http://localhost:8085/cgi-bin/mapserv.exe?map=/ms4w/apps/app/test.map&layer=states_poly&layer=states_line&mode=map

seems to equal this

var loadedMap = new OpenLayers.Layer.MapServer( "OpenLayers WMS",
"http://localhost:8085/cgi-bin/mapserv.exe?layer=states_poly&layer=states_line",
{map: '/ms4w/apps/app/test.map', mode:'map', format: 'png',
transparent:'false'},
 {layers: 'basic'},
{gutter: 15});

Thanks!


Linda_Rawson wrote:
> 
> I think you need to change it to something like this:
> 
> var loadedMap = new OpenLayers.Layer.MapServer( "OpenLayers WMS",
> "http://localhost:8085/cgi-bin/mapserv?map=/ms4w/apps/app/test.map",
> {layers: states_poly,states_line},
> {buffer: 0});
> 
> Linda
> On Feb 12, 2008 12:54 PM, David H. McCoy <davidhmccoy at cox.net> wrote:
> 
>>
>> I have this
>>
>> map=/ms4w/apps/app/test.map&layer=states_poly&layer=states_line&mode=map
>>
>> And I want this
>>
>> var loadedMap = new OpenLayers.Layer.MapServer( "OpenLayers WMS",
>> "http://localhost:8085/cgi-bin/mapserv.exe",
>> {map: '/ms4w/apps/app/test.map, layer:'states_poly,states_line',
>> mode:'map',
>> format: 'png', transparent:'false'},
>> {layers: 'basic'},
>> {gutter: 15});
>>
>>
>>
>> But it doesn't display. If you want to have multiple occurrances of the
>> same
>> param, but different values, how is this represented?
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-do-you-represent-multiple-layers-in-a-MapServer-Query-tp15441564p15441564.html
>> Sent from the OpenLayers Users mailing list archive at
>> Nabble.com<http://nabble.com/>
>> .
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
> 
> 
> 
> -- 
> Linda Rawson
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://www.nabble.com/How-do-you-represent-multiple-layers-in-a-MapServer-Query-tp15441564p15444101.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list