[Mapserver-users] Showing a single point from a DBF file
Richard Greenwood
rich at greenwoodmap.com
Sun Aug 10 20:35:50 PDT 2003
--=======15303795=======
Content-Type: text/plain; x-avg-checked=avg-ok-3B1A4A8; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit
>
>Now I want to go the other way -- from a given page in our project, say
>"Seals Stadium" and bring up our map of San Francisco with that point
>(only) highlighted. I can do this by manually tweaking the map file:
> CLASSITEM "ID"
> LABELCACHE ON
> CLASS
> NAME "SSF Map Points"
> EXPRESSION "2"
>
>...
No real magic required to do this, and no server side scripting required,
either. But the syntax between 3.6 and 4.0 is slightly different (so get
with 4.0).
In 3.6 your query string should look like:
map=mymap
mode=itemquery
qlayer=stadiums
mapext=shapes
id=2 # form variable passing value for Seals Stadium
Or in 4.0:
map=mymap
mode=itemquery
qlayer=stadiums
mapext=shapes
qietm=id # name of db field
qstring=2 # form variable passing value for Seals Stadium
And your map file would have a layer like:
Layer
NAME "stadiums"
TYPE polygon
DATA "stauiums"
STATUS default
FILTERITEM id
Filter "%id%"
CLASS
TEMPLATE mymap.html # Use to display map
OUTLINECOLOR 255 255 0
SYMBOL 'solid' SIZE 6
END # CLASS
END
Rich
Richard W. Greenwood, PLS
(307) 733-0203
Rich at GreenwoodMap.com
www.GreenwoodMap.com
--=======15303795=======--
More information about the MapServer-users
mailing list