[Geomoose-users] Displaying each layer from a mapfile in a separate layer

James Klassen klassen.js at gmail.com
Tue Jun 11 09:00:15 PDT 2013


You might want to consider parsing the WMS GetCapabilities output instead
of the mapfile itself.

This sort of thing is why the GetMapbook.php stub is there. (And also to
potentially let different users see different mapbooks.)
On Jun 11, 2013 9:56 AM, "Robert R. Raiz" <raizrobert at gmail.com> wrote:

> Hello James,
>
> Yes, I tried using the map file name but what troubled me, was that I had
> all the layers under one check-box (either I had them all on, or all off);
> This is not the best thing as maybe I want to export a map with only a few
> of those layers.
>
> It is also possible that I did not apply the good params in the catalog
> section to have them all separately.
>
> My idea is to create a script that reads the map file and brings values in
> the .xml file. It should also read the STATUS param (ON/OFF) from the
> mapfile.
>
> eg: <layer name="city_labels" status="default/> (default = read the layer
> status from the mapfile)
>
> I still need to practice a bit.
>
>
> On Tue, Jun 11, 2013 at 5:21 PM, James Klassen <klassen.js at gmail.com>wrote:
>
>> If you want always want all the layers displayed you can use the map name
>> (as defined in the .map file) as your layer name in GeoMoose.
>>
>> If you want finer granularity,  set a GROUP on the layers in the mapfile
>> that you want to turn on together and then use that group as the layer name
>> in GeoMoose.
>>
>> (MapServer used to support an implicit GROUP name of "all" on every layer
>> but that was removed because it violated the WMS standard.)
>>
>> I am not sure how well these methods play with the PHP services (like
>> identify) but if the PHP service fails that is a bug in the PHP and should
>> be reported so it can get fixed.
>>  On Jun 10, 2013 1:27 PM, "Robert R. Raiz" <raizrobert at gmail.com> wrote:
>>
>>> Hello all,
>>>
>>> @Eli Adam: yes, that is the intended way. It works, I added each layer
>>> in the map-source with the "<layer name" param. Then,  all those again
>>> in the the catalog section, with <layer src. I did that from the first
>>> attempt and the result is ok, but I do not wish to do this manual process
>>> for each map file.
>>>
>>> The reason for my post was to learn if there is a more straightforward
>>> way (automatically).
>>>
>>> Because I have many map files with a lot of layers and I always need all
>>> of them displayed to choose the best layout. I guess a little script can
>>> read the map file and build that list for me, using a few variables.
>>>
>>> I am new to geomoose..  I've been using Chameleon for a long time and
>>> clearly its time is long due.
>>>
>>> I really appreciate the support, the great documentation out there and
>>> surely I will get back to the mailing list with more questions as I go
>>> forward with the migration.
>>>
>>> Kind regards,
>>>
>>>
>>> On Mon, Jun 10, 2013 at 8:01 PM, Eli Adam <eadam at co.lincoln.or.us>wrote:
>>>
>>>> On Fri, Jun 7, 2013 at 12:09 AM, Robert R. Raiz <raizrobert at gmail.com>
>>>> wrote:
>>>> > Hello all,
>>>> >
>>>> > Well, what I would like to do, is to have all the layers from a
>>>> mapfile on a
>>>> > separate row in the interface (all status = on, aka checked), to be
>>>> able to
>>>> > check and uncheck layers depending on what I want to see.
>>>> >
>>>> > I tried several options but I just did not find an easy way to
>>>> accomplish
>>>> > this without inserting each layer separately in the map-source.
>>>>
>>>> Does adding a map-source for each one work?  I think that is the
>>>> intended way.
>>>>
>>>> Eli
>>>>
>>>> >
>>>> > No matter which layers I add in the  catalog for this reference, I
>>>> still
>>>> > have them all nested under one checkbox;
>>>> >
>>>> > <map-source name="county" type="mapserver">
>>>> > <file>./test/parcels/parcels.map</file>
>>>> > <layer name="parcels" status="on"/>
>>>> > <param name="FORMAT" value="image/png;bits=8"/>
>>>> > </map-source>
>>>> >
>>>> > Is there a way to do this?
>>>> > --
>>>> > Raiz Roland Robert
>>>> >
>>>> >
>>>> >
>>>> > _______________________________________________
>>>> > Geomoose-users mailing list
>>>> > Geomoose-users at lists.osgeo.org
>>>> > http://lists.osgeo.org/mailman/listinfo/geomoose-users
>>>> >
>>>>
>>>
>>>
>>>
>>> --
>>> *Raiz Roland Robert*
>>>
>>>
>>>
>>> _______________________________________________
>>> Geomoose-users mailing list
>>> Geomoose-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>>>
>>>
>
>
> --
> *Raiz Roland Robert*
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20130611/04372cac/attachment-0001.html>


More information about the Geomoose-users mailing list