[Mapserver-users] Help with simple(?) app
Richard Greenwood
Rich at GreenwoodMap.com
Fri Aug 8 13:38:22 PDT 2003
At 09:47 AM 8/8/2003 -0700, you wrote:
>I need to create a simple application that displays a
>map of the US, then allows the user to click on a
>state to get a zoomed-in view of just the one state
>(without seeing bordering states).
>
>I am able to display the US map with mapserver/cgi
>without a problem, but how do I:
>
>1. Display the zoomed-in state w/o bordering states?
>
>2. Program the "direct to state" zoom in capability?
Using just CGI I would use mode=itemquery. The map file should look
something like:
QUERYMAP
STATUS ON
STYLE SELECTED
END
And make two layers:
Layer
NAME "STATE" # displays only one state
TYPE polygon
DATA states
STATUS default
FILTERITEM ID
Filter "%ID%"
CLASS
TEMPLATE mymap.html # Use to display map
OUTLINECOLOR 255 255 0 # Yellow
SYMBOL 'solid' SIZE 6
END
END
LAYER
NAME "STATES" # displays all states
STATUS ON
TYPE Polygon
DATA "states"
CLASS
TEMPLATE "mymap.html" # Use to display attribute data
SYMBOL "Solid"
OUTLINECOLOR 0 0 0
SIZE 2
END # CLASS
END
Both layers use same data.
Rich
Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich <at> GreenwoodMap <dot> com
(307) 733-0203
http://www.GreenwoodMap.com
More information about the MapServer-users
mailing list