mapserver map file - hilite style in querymap
Ken Boss
Ken.Boss at DNR.STATE.MN.US
Fri Jan 14 08:53:37 PST 2005
I've done this sort of thing by using a separate layer for displaying
selected features in the querymap. My query is run against my "normal"
polygon map layer, but in my query template, instead of using a
[queymap] (or [indexquerymap] in my case)template to display the
querymap, I've got an img tag like:
<img
src="http://[host]/cgi-bin/mapserv43?map=[map]&layers=landsat+roads+pls&mapxy=[shpmidx]+[shpmidy]&scale=50000&mapext=shapes&tileindex=[tileidx]&shapeindex=[shpidx]&qlayer=hiliter&mode=indexquerymap">
The querymap and "hiliter" layers in my mapfile are like:
QUERYMAP
SIZE 300 300
STATUS off
STYLE selected
END
LAYER
NAME hiliter
TYPE line
STATUS off
MAXSCALE 150000
TILEINDEX drs/metadata/mapserver/for_dofarea
TILEITEM "location"
CLASS
SYMBOL 'circle'
SIZE 2
COLOR 255 255 0
TEMPLATE "dummy"
END
END
Note that the "hiliter" layer uses the same TILEINDEX/TILEITEM (or
DATA) specs as the originally queried polygon layer, and the TEMPLATE
spec is just a dummy spec to make the layer queryable (though it's not
actually queried, just displayed in the querymap).
HTH,
--Ken Boss
MN DNR Forestry Resource Assessment
>>> John Spotten <John.Spotten at CAPETOWN.GOV.ZA> 1/14/2005 9:10:20 AM
>>>
Hi,
Is it possible to specify a thicker hilite style for selected objects
i.e. more than 1 pixel, in a map file?
and if so how?
thanks
john
John Spotten
Transport Modeller/GIS Developer
Directorate of Transport, Roads and Stormwater
City of Cape Town
Tel : +27 21 4067325
Fax : +27 21 4186989
Cell : +27 846678901
Email : john.spotten at capetown.gov.za
Web : www.capetown.gov.za
<<John Spotten.vcf>>
More information about the MapServer-users
mailing list