[mapserver-users] Using space in layer's name?

Steve Lime Steve.Lime at dnr.state.mn.us
Mon Aug 25 21:29:04 PDT 2008


Ah, bummer. I can't think of a workaround offhand then other than
altering the names.

Steve

>>> "kreshna_iceheart at yahoo.com" <kreshna_iceheart at yahoo.com> 08/25/08
11:09 PM >>>
Thanks, Steve.

Unfortunately I cannot use layer=layer1&layer=layer2&..., since I want
to pass the currently selected layers (the [layers] parameter). Guess
I'm gonna change all the spaces in the layer's name to underscores
instead.

-Kresh


--- On Mon, 8/25/08, Steve Lime <Steve.Lime at dnr.state.mn.us> wrote:

> From: Steve Lime <Steve.Lime at dnr.state.mn.us>
> Subject: Re: [mapserver-users] Using space in layer's name?
> To: "TC Haddad" <tchaddad at gmail.com>, kreshna_iceheart at yahoo.com
> Cc: mapserver-users at lists.osgeo.org
> Date: Monday, August 25, 2008, 11:30 AM
> You've hit a bug in the code. Since "layers"
> uses a space delimiter
> spaces in layer names will cause 
> problems. A work around would be to use
> layer=layer1&layer=layer2&...
> in your call. If you'd file
> a bug on this issue I'll address for 5.4, probably by
> supporting
> multiple delimiters like a comma and will
> check those before spaces...
> 
> Steve
> 
> >>> On 8/22/2008 at 1:21 AM, in message
> <718212.42459.qm at web56104.mail.re3.yahoo.com>,
> "kreshna_iceheart at yahoo.com"
> <kreshna_iceheart at yahoo.com> wrote:
> > Er, no. My layers do not contain capitals, only
> spaces. 
> > 
> > 
> > --- On Wed, 8/20/08, TC Haddad
> <tchaddad at gmail.com> wrote:
> > 
> >> From: TC Haddad <tchaddad at gmail.com>
> >> Subject: Re: [mapserver-users] Using space in
> layer's name?
> >> To: kreshna_iceheart at yahoo.com 
> >> Date: Wednesday, August 20, 2008, 9:55 AM
> >> It looks like you are using mapserver CGI .... if
> so I have
> >> noticed
> >> that passing layer names is sometimes case
> sensitive.
> >> 
> >> Is it possible that your layer with spaces in the
> name also
> >> has a
> >> capital letter in the name that you are not using
> in the
> >> URL string
> >> that you are passing?
> >> 
> >> Another idea is that you can insert a GROUP name
> for that
> >> layer that
> >> does not have a space, and then just call that
> layer in the
> >> URL using
> >> the GROUP name instead. That should avoid the
> problem
> >> altogether.
> >> (Also remember to use case sensitive for GROUP
> name).
> >> 
> >> Tanya
> >> 
> >> On Wed, Aug 20, 2008 at 12:00 AM,
> >> kreshna_iceheart at yahoo.com 
> >> <kreshna_iceheart at yahoo.com> wrote:
> >> > Er, nope. I'm not using WMS.
> >> >
> >> >
> >> > --- On Wed, 8/20/08, Rahkonen Jukka
> >> <Jukka.Rahkonen at mmmtike.fi> wrote:
> >> >
> >> >> From: Rahkonen Jukka
> >> <Jukka.Rahkonen at mmmtike.fi>
> >> >> Subject: Re: [mapserver-users] Using
> space in
> >> layer's name?
> >> >> To: kreshna_iceheart at yahoo.com,
> >> mapserver-users at lists.osgeo.org 
> >> >> Date: Wednesday, August 20, 2008, 2:46 AM
> >> >> Hi,
> >> >>
> >> >> Are you using WMS?In the document
> "WMS
> >> servers with
> >> >> MapServer"
> >> >>
> http://mapserver.gis.umn.edu/docs/howto/wms_server 
> >> >> reads:
> >> >> #
> >> >> Layer Name and wms_title metadata:
> >> >> Every individual layer needs its own
> unique name
> >> and title.
> >> >> Layer names are also used in GetMap and
> >> GetFeatureInfo
> >> >> requests to refer to layers that should
> be
> >> included in the
> >> >> map output and in the query. Layer names
> must
> >> start with a
> >> >> letter when setting up a WMS server
> (layer names
> >> should not
> >> >> start with a digit or have spaces in
> them).
> >> >>
> >> >> I believe that spaces in layer names are
> not
> >> allowed by WMS
> >> >> standard, but I may be wrong.  I do also
> believe
> >> that
> >> >> MapServer cgi supports them, at least I
> can find
> >> example map
> >> >> files with layers named like "my
> layer".
> >> >>
> >> >> -Jukka Rahkonen-
> >> >>
> >> >> > -----Alkuperäinen viesti-----
> >> >> > Lähettäjä:
> >> mapserver-users-bounces at lists.osgeo.org 
> >> >> >
> >> [mailto:mapserver-users-bounces at lists.osgeo.org] 
> >> >> mapserver-users at lists.osgeo.org 
> >> >> > Aihe: [mapserver-users] Using space
> in
> >> layer's
> >> >> name?
> >> >> >
> >> >> > I'm using MapServer 5.0.2.
> >> >> >
> >> >> > I have two layers: the first is
> named
> >> "jaringan
> >> >> ipal dan
> >> >> > iplt" (layer name contains
> space
> >> character),
> >> >> while the second
> >> >> > is named
> "jaringan_telepon" (does
> >> not
> >> >> contain space).
> >> >> >
> >> >> > I am using the [layers] parameter to
> >> dynamically pass
> >> >> my
> >> >> > layers to another template for
> printing
> >> purpose. Alas,
> >> >>
> >> >> > because one layer contains space,
> that
> >> particular
> >> >> layer is
> >> >> > not passed at all. Here is the
> contents of
> >> the
> >> >> [layers] parameter:
> >> >> >
> >> >> >
> >> >>
> >>
> &layers=jaringan%20ipal%20dan%20iplt%20jaringan_telepon
> >> >> >
> >> >> > The layer
> "jaringan_telepon" is
> >> displayed
> >> >> correctly, but the
> >> >> > layer "jaringan ipal dan
> iplt"
> >> fails to
> >> >> display, because
> >> >> > MapServer takes the space character
> (%20) as
> >> >> delimiter.
> >> >> >
> >> >> > I tried to use the parameter
> [layers_esc]
> >> instead, and
> >> >> here
> >> >> > is the contents of the [layers_esc]:
> >> >> >
> >> >> >
> >>
> &layers=jaringan+ipal+dan+iplt+jaringan%5Ftelepon
> >> >> >
> >> >> > Here, the layer "jaringan ipal
> dan
> >> iplt"
> >> >> still fails to
> >> >> > display, because MapServer replaces
> the space
> >> with
> >> >> "+" (plus
> >> >> > sign), which is also used as
> delimiter.
> >> >> >
> >> >> > Thus, not even [layers_esc] allows
> us to use
> >> space
> >> >> character
> >> >> > in layer's name. Is there any
> other way
> >> to use
> >> >> layer with
> >> >> > space character in its name, then?
> >> >> >
> >> >> > Thanks,
> >> >> > -Kresh
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> _______________________________________________
> >> >> > mapserver-users mailing list
> >> >> > mapserver-users at lists.osgeo.org 
> >> >> >
> >> >>
> >>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users 
> >> >> >
> >> >
> >> >
> >> >
> >> >
> _______________________________________________
> >> > mapserver-users mailing list
> >> > mapserver-users at lists.osgeo.org 
> >> >
> >>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users 
> >> >
> > 
> > 
> > 
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org 
> >
> http://lists.osgeo.org/mailman/listinfo/mapserver-users







More information about the MapServer-users mailing list