[mapserver-users] perl - zooming, panning, and such
Steve Lime
steve.lime at dnr.state.mn.us
Fri Apr 19 11:36:55 PDT 2002
Here's a 3.5 version of the mapquakes.pl script. It shows how to do a perl-based pan/zoom interface. Hope it helps.
Steve
Stephen Lime
Data & Applications Manager
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Puneet Kishor <pkishor at GeoAnalytics.com> 04/19/02 01:23PM >>>
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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mapquakes.pl
Type: application/octet-stream
Size: 6468 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20020419/414cfb13/attachment.obj>
More information about the MapServer-users
mailing list