Zoom & Pan
Milo van der Linden
mlinden at ZEELANDNET.NL
Thu Feb 7 08:55:36 PST 2008
Hello Clinton!
Zoom and Pan is Clientside functionality. For this an application needs
to be enhanced with Javascript. As an example:
- When you drag a box, your browser needs to respond to the MouseDown
and MouseUp and even MouseMove events. Then it has to store temporary
variables telling it where you are zooming. When the MouseDown event is
fired, you connect to the server and fire mapserv to pass a new image.
If this sounds to complex, you might consider looking at available
dynamic client software for mapserver. Take a look at the following:
www.openlayers.org - Good javascript library to have dynamic
mapfunctions, but needs mapserver to be installed as a WMS server
www.cartoweb.org - reasonably documented if your requirements are
straight forward.
http://ka-map.maptools.org/ - not a lot development going on there, but
it might fit your needs.
Remember, mapserver is mostly an excellent SERVER, if you want more from
clients then the old fashioned request - response stream where browsers
react on a single click; take a look at one of the clients mentioned above.
Good luck!
Clinton Olsen schreef:
> Hello,
>
> I would like to know how I can take the application I created from the tutorial,
> and add zoom windows, so I can click on the viewer and drag a window across
> a certain area to zoom in or out. And I need to know if there is a way I can
> make my application pan by using the click and drag method. For reference
> my application can be found at the internet address below.
>
> http://www.emerycounty.com:90/cgi-bin/mapserv.exe?
> map=/emerycounty/ms4w/apps/tutorial/htdocs/lawcem-
> maps/lawcem.map&layer=emeryroads&layer=emeryborder&layer=living&layer=bu
> riedother&layer=plots&layer=fences&layer=gravemarkers&layer=cemlabels&zoom
> =0&mode=browse&root=/tutorial&program=/cgi-
> bin/mapserv.exe&map_web_imageurl=/ms_tmp/&map_web_imagepath=/emeryco
> unty/ms4w/tmp/ms_tmp/&map_web_template=index.html&mapext=1357154+65
> 19737+2340584+7175357
>
> Please let me know what all you need in order to give me some ideas.
>
> Thanks.
>
>
More information about the MapServer-users
mailing list