[OpenLayers-Users] Problem displaying multiple wms layers in OpenLayers

Roger André randre at gmail.com
Tue May 13 01:21:28 EDT 2008


Thanks Chris, the []'s were the key I was missing.  Makes sense, it's an
array.  <sigh>  I feel like an idiot now, but I do appreciate the help.

Roger
--


On Mon, May 12, 2008 at 7:47 PM, Christopher Schmidt <
crschmidt at metacarta.com> wrote:

> On Mon, May 12, 2008 at 07:30:00PM -0700, Roger André wrote:
> > Hi Everyone,
> >
> > I'm having a problem that I suspect many of you has already dealt with.
>  I
> > can't seem to combine several of my MapServer wms layers into a single
> OL
> > map layer.  No matter how I structure the wms layer name array (in
> > single-quotes, or double-quotes), I never can turn two wms layers on at
> > once.  I'd like to take this wms request and make it into an open layers
> > layer:
>
> Layer.WMS("name", "url", {layers: ['wetlands', 'floodplain']})
>
> -- Chris
>
> > http://localhost/cgi-bin/mapserv.exe?map=../htdocs/520.map
> > &SERVICE=WMS
> > &VERSION=%221.1.1%22
> > &REQUEST=GetMap
> > &LAYERS=wetlands,floodplain
> > &STYLES=
> >
> &BBOX=775843.302946,602429.871045,848438.746010,635418.446144&WIDTH=600&HEIGHT=500&FORMAT=png&SRS=epsg:2286
> >
> > I currently have a single OL layer for "wetlands" that works fine.  When
> I
> > add "floodplain" to it, I either get a completely blank screen with no
> OL
> > controls (which tells me that the .js syntax is messed up), or I get the
> > OpenLayers canvas, but the layer in questions doesn't display any data.
>  Can
> > someone send what the correct syntax should be for getting both layers
> > called correctly from within OL?  Or tell me if there is a special trick
> > related to Mapserver WMS and multiple layer calls?
> >
> >
> > Thanks,
> >
> >
> > Roger
> > --
>
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
>
>
> --
> Christopher Schmidt
> MetaCarta
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080512/7d8d8a8c/attachment.html


More information about the Users mailing list