[UMN_MAPSERVER-USERS] How can I highlight more than one feature in QUERY mode?
Daniele Margotti
margottid at COMUNE.LUGO.RA.IT
Tue May 31 04:25:03 PDT 2005
>
>
>-----Original Message-----
>From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
On Behalf Of Richard Greenwood
>Sent: Sunday, May 22, 2005 3:27 PM
>To: MAPSERVER-USERS at LISTS.UMN.EDU
>Subject: Re: [UMN_MAPSERVER-USERS] [UMN_MAPSERVER-USERS] How can I
highlight more than one feature in QUERY mode?
>
>
>Daniele Margotti <margottid <at> COMUNE.LUGO.RA.IT> writes:
>
>> with CGI
>> mode=ITEMQUERYMAP I can produce a map with one highlighted feature
>> (defined using QITEM, QLAYER and QSTRING).
>>
>>
>> How can I highlight
>> more than one feature (within the same layer) using the same syntax
>> (QITEM + QLAYER + QSTRING)? Is there the
>> possibility to use an "OR condition" or a regular expression in
QSTRING
>> parameter?
>>
>>
>> Thank
>> you,
>> Daniele
>
>Make your querystring a regular expression like:
>
> qstring=/a|b|c/
>
>would highlite objects 'a', 'b', and 'c'. Also be sure to put your
template definition in the HEADER, not in the TEMPLATE. If
>you put it in TEMPLATE, you'll get three maps, but by putting it on
HEADER, all three objects will be highlited on the same
>map.
>
>Rich
>
Thank you for your answer, this "qstring" works very well (my map was
already in the FOOTER section of the query-template):
http://sit.comune.lugo.ra.it/cgi-bin/mapserv?mode=itemnquery&mapxy=17294
87.0255+4927174.2505&scale=2000&map=/dati/sit/Lugo_base.map&mapsize=&lay
er=CTR_5000&layer=Mappali&layer=Quadrocatasto&layer=Grafo_stradale&qlaye
r=Mappali&qitem=PARTKEY&qstring=/E730%20%20%2077%20%20427|E730%20%20%207
7%20%20428|E730%20%20%2077%20%20266/
But I have to specfiy "mapxy" and "scale" (as if I had "clicked" on the
map) to have querymap centered on my features; if I omit "mapxy" and
"scale" I obtain query centered on the entire extent:
http://sit.comune.lugo.ra.it/cgi-bin/mapserv?mode=itemnquery&map=/dati/s
it/Lugo_base.map&mapsize=&layer=CTR_5000&layer=Mappali&layer=Quadrocatas
to&layer=Grafo_stradale&qlayer=Mappali&qitem=PARTKEY&qstring=/E730%20%20
%2077%20%20427|E730%20%20%2077%20%20428|E730%20%20%2077%20%20266/
How can I center (and scale) my querymap without previously calculate a
mapxy point near the queried features?
Thanks,
Daniele
More information about the MapServer-users
mailing list