[Mapserver-users] Help with simple(?) app
Vinko Vrsalovic
vinko at cprsig.cl
Fri Aug 8 10:34:50 PDT 2003
On Fri, Aug 08, 2003 at 09:47:49AM -0700, Hobbes Zatow 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?
I don't know if with plain CGI mapserver you can do it, but with
MapScript it can be done rather easily.
For 1, you could set up two classes, one to show the state, and other to
hide all the other states (by setting its status to MS_OFF), and using
class expression to choose which state is the one you want rendered.
For 2, you grab the polygon defining the state, and then obtain its
extent iterating through the points, or just do an array/hash/whatever
for all the extents.
--
Vinko Vrsalovic <el[|- at -|]vinko.cl>
http://www.cprsig.cl
More information about the MapServer-users
mailing list