[mapserver-users] GetCapabilities for a specific layer, not the entire mapfile?
Armin Burger
armin.burger at gmx.net
Thu Apr 17 00:36:57 PDT 2008
John
I don't know if it is an option for you, but it would be quite easy doing this with Mapscript, using the functionality of OWSrequest. Either using an 'empty' map file and adding to it the desired layer from the main map file with Mapscript 'addLayer()' method. This works with all types of Mapscript. Or using the main map file and deleting all layers but the requested one with 'removeLayer()'. This does not work with PHP Mapscript since this method does not exist there.
Using Apache rewrite rules one can also create nicer URLS, like
http://host/wms/layer1 or
http://host/wms/layer2
I have not noticed so far big differences in speed between Mapscript and CGI, maybe under higher load this could change slightly.
Armin
-------- Original-Nachricht --------
> Datum: Wed, 16 Apr 2008 23:10:48 +0100
> Von: John Maurer <maurerj at nsidc.org>
> An: mapserver-users at lists.osgeo.org
> Betreff: [mapserver-users] GetCapabilities for a specific layer, not the entire mapfile?
> Hi mapserver-users,
> What is the best way to provide a generic/flexible WMS-related URL for a
> specific layer within my MapServer mapfile? I want to include this kind
> of thing in our DIF & FGDC metadata so that users know about a WMS for a
> given data set. If I provide a GetCapabilities request, this advertises
> *all* of the layers in my mapfile, which represent a collection of
> multiple data sets, most of which will be unrelated to the data set in
> the metadata. On the other hand, if I provide a GetMap request this
> allows me to specify the layer intended for a particular data set, but
> it limits the output possibilities to a specific srs, format, width,
> height, and bbox. A GetCapabilities for a specific layer would be akin
> to what I need, but I don't think that's how it works. This is my
> quandary and I'm hoping somebody has a solution to this kind of thing??
> Thanks!
> Cheers,
> John Maurer
>
> --
> John Maurer
> Web/Database Applications Engineer
> National Snow and Ice Data Center (NSIDC)
> University of Colorado at Boulder
> http://cires.colorado.edu/~maurerj
> ------------------------------------
> "Without geography, you're nowhere!"
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
More information about the MapServer-users
mailing list