[mapserver-users] perl - zooming, panning, and such

Puneet Kishor pkishor at GeoAnalytics.com
Fri Apr 19 14:23:01 EDT 2002


Kent,

here's my conceptual $0.02.


> > second, i need guidance on getting a pan-and-zoom interface 
> to work.  i've
> > toyed with porting the php example from the online docs to 
> perl and also
> > with a recent post from lowell, but to no avail.  methinks 
> most of my
> > problem is because i don't really understand extents and what they
> > represent well enough to manipulate them the way i need

1. everytime you draw the map, you need to set the mapextent. 

2. if you are doing this for the very first time, you would usually start
with the maximum extent of your map. otherwise, you would start with the
current extent of the map.

3. so, let's reiterate... the first time is easy because you start with the
maxextents. at that point in time, you send the current extent (which
happens to be maxextents right now) to the client. you usually do that as
hidden form fields.

4. now the map is sitting on the client. the user chooses to zoomin. the act
of zooming in sends back to the server the point-of-click of zoomin, a
(usually) preset zoomfactor, and the current extents that were in the hidden
fields.

5. back at the server, you now start with these current extents and apply
the zoomfactor to get the new current extents. and the process in #1 above
restarts.

did this make sense?

pk/



More information about the mapserver-users mailing list