MapTools.org

[Chameleon] Querying Layers

Bart van den Eijnden bartvde@xs4all.nl
Tue, 16 Mar 2004 16:34:46 +0100
Hi Paul, Darren,

is this not because the layer NAME is used for the XML element, and XML 
elements can't contain spaces? For local data which would go through 
text/html output this would probably work, but not for WMS layers which go 
through gml output.

Best regards,
Bart

On Tue, 16 Mar 2004 10:22:59 -0500, <Darren.Cope@statcan.ca> wrote:

> Hi Paul,
>
> Yes, the layer names are in quotes.  In the mapfile, it looks like the
> following (currently with underscore, as this works):
>
>   LAYER # Start of Mailout Area
>     NAME "Mailout_Area"
>     STATUS DEFAULT
>     DUMP TRUE
>     DATA mailout
>     TYPE POLYGON
>     TEMPLATE "ttt" # this isn't used, but needs to be here for queries
>     TOLERANCE 10
>     TOLERANCEUNITS PIXELS
>     CLASS
>       NAME "Mailout Area"
>       COLOR 198 199 140
>       OUTLINECOLOR -1 -1 -1
>     END # Class
>     MAXSCALE 4500000
>     METADATA # Start of Metadata
>       WMS_TITLE "Mailout Area"
>       WMS_ABSTRACT "Mailout Area"
>       WMS_SRS "EPSG:42304"
>     END # End of Metadata
>   END # End of Mailout Area
>
> In the context file, I have the following:
>
>   <Layer queryable="1" hidden="0">
>        <Server service="WMS" version="1.1.0" title="Mailout_Area">
>         <OnlineResource xlink:type="simple"
> xlink:href="http://c137861.statcan.ca/cgi-bin/mapserv.exe?map=wms.map&"/>
>       </Server>
>       <Name>Mailout_Area</Name>
>       <Title>Mailout Area</Title>
>       <SRS>EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326 EPSG:42304</SRS>
>       <FormatList>
>         <Format current="1">image/png</Format>
>         <Format>image/gif</Format>
>         <Format>image/jpeg</Format>
>         <Format>image/wbmp</Format>
>       </FormatList>
>       <StyleList>
>       </StyleList>
>   </Layer>
>
> If I use this exactly as shown, everything works as expected. If I put
> double quotes around the Name in the context file, I get an error (the
> images don't load at all...)  So, this is possibly a bug in Chameleon, 
> or do
> you see something else wrong with what I am doing?
>
> Thanks,
>
> Darren
>
> -----Original Message-----
> From: Paul Spencer [mailto:pagameba@magma.ca]
> Sent: March 16, 2004 8:56 AM
> To: Darren.Cope@statcan.ca
> Cc: thowlett@whistlermuseum.org; chameleon@lists.maptools.org
> Subject: Re: [Chameleon] Querying Layers
>
>
> Darren,
>
> Did you try putting the layer name in quotes?
>
> NAME "provincial boundary"
>
> I don't think that mapserver has any particular problems with this, but
> perhaps there is a problem in chameleon and I would like to know.
>
> Cheers,
>
> Paul
>
> Darren.Cope@statcan.ca wrote:
>
>> Hello Tracy,
>>
>> Thanks for the help!  I finally got the query to work, after ensuring
>> that the DUMP, and TOLERANCE lines where set, and that each layer had
>> a TEMPLATE. However, it is also necessary, as I found out eventually,
>> that the LAYER NAME not have a space in it, as this will cause the
>> queries to not work. Even though I had everything right, and your
>> "park" example worked fine for me, my "provincial boundary" layer did
>> not.  Replacing the space with an underscore solved the problem
>> though! Hopefully this will help out others who may be having this
>> problem.
>>
>> Any way I can still use a space in the name (with an escape character
>> of some sort?)
>>
>> Thanks!
>>
>> Darren
>>
>> -----Original Message-----
>> From: Tracy Howlett [mailto:thowlett@whistlermuseum.org]
>> Sent: March 15, 2004 4:47 PM
>> To: Darren.Cope@statcan.ca
>> Cc: chameleon@lists.maptools.org
>> Subject: RE: [Chameleon] Querying Layers
>>
>>
>> Hi Darren,
>>
>> I had a similar problem..make sure you've got your tolerance units set
>> as well.
>>
>> This is an example of one of my query layers.
>>
>> LAYER
>>   NAME "Park"
>>   TYPE POLYGON
>>   DUMP TRUE
>>   TEMPLATE "blank.html"
>>   TOLERANCE 10
>>   TOLERANCEUNITS PIXELS
>>   STATUS ON
>>   GROUP "Municipal Park"
>>   DATA "Park"
>>   CLASS
>>   COLOR 150 231 138
>>   END
>>   METADATA
>>      WMS_TITLE "Park"
>>      WMS_ABSTRACT "Park"
>>   END
>> END
>>
>> I've been trying to modify the output of the query results myself.
>> Right now each record returns the Shape and ID items as well as the
>> useful attribute data.  I'm trying to suppress these fields.  If you
>> happen to figure it out would you mind letting me know!
>>
>> Thanks,
>>
>> Tracy
>>
>> -----Original Message-----
>> From: chameleon-admin@lists.maptools.org
>> [mailto:chameleon-admin@lists.maptools.org] On Behalf Of
>> Darren.Cope@statcan.ca
>> Sent: Monday, March 15, 2004 9:00 AM
>> To: eric@gomoos.org; Darren.Cope@statcan.ca
>> Cc: chameleon@lists.maptools.org
>> Subject: RE: [Chameleon] Querying Layers
>>
>> Thanks for the suggestion Eric.  However, this does not seem to solve
>> my problem.
>>
>> Darren
>>
>> -----Original Message-----
>> From: Eric Bridger [mailto:eric@gomoos.org]
>> Sent: March 15, 2004 11:04 AM
>> To: Darren.Cope@statcan.ca
>> Cc: chameleon@lists.maptools.org
>> Subject: Re: [Chameleon] Querying Layers
>>
>>
>> I'm new to this too, but I happen to have a guess.
>> You also need DUMP TRUE in your layer.
>>
>> On Mon, 2004-03-15 at 08:38, Darren.Cope@statcan.ca wrote:
>>
>>> Hi all,
>>>
>>> I am currently setting up the Chameleon "CWC2 Demo Template" to work
>>> with some of our own data.  Using MapServer as a WMS, I am able to
>>> view the data. However, I am unable to get it to query any of the
>>> layers properly.  I get the pop-up which says "no results for this
>>> layer."  I do have a "template" line set in the .map file, but this
>>> does not seem to help (i.e. I get the same message without the line).
>>> I am sure I am missing something obvious, as I am new to this!
>>>
>>> Thanks for any suggestions,
>>>
>>> Darren Cope
>>> Statistics Canada/Statistique Canada
>>> Geography Division/Division de la géographie
>>> Jean Talon 3D5
>>> Ottawa, Canada
>>> (613) 951-6461
>>>
>>
>>
>>
>> _______________________________________________
>> Chameleon mailing list
>> Chameleon@lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>
>>
>>
>> _______________________________________________
>> Chameleon mailing list
>> Chameleon@lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>
>> _______________________________________________
>> Chameleon mailing list
>> Chameleon@lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>
>



-- 
  


This archive was generated by Pipermail.