[mapserver-dev] zoom box in JavaScript (not Java)

Steve Lime steve.lime at dnr.state.mn.us
Mon Sep 30 15:30:28 EDT 2002

See http://www.dnr.state.mn.us/maps/landview_dhtml.html for a javascript
zoombox. Since it's based on a cross browser DHTML library it's really
pretty portable (even works on a Mac with IE6). This implementation is
also not limited by some of the design constraints you normally see with
DHTML such as using frames or putting the image in the UL corner of your
page. I can put the map wherever I'd like. 

Still needs a little work. Works perfectly in IE but the animation is
sluggish in Mozilla.


Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155

>>> Alex Rice <alex_rice at arc.to> 09/28/02 12:18PM >>>

On Friday, September 27, 2002, at 12:39  PM, Brent Fraser wrote:

> Hey,
>   Does anyone know how http://kei.kodak.com/HTMLMap.asp can use 
> JavaScript to do a zoom box?
> I thought JavaScript was too limited draw lines on an image and we 
> were stuck using Java.
> I'm jealous.

Nope, javascript can be used. However it's heavy on the CSS and DHTML 
stuff-- you might run into browser compatibility issues. No more so 
than trying to run a Java applet though.

I've been playing around with some free Javascript I found at esri.com.

But  haven't been able to make it do exactly what I want it to do. It 
seems to want to be in a frameset with all drawing starting at 0,0. It

would be great if mapserver came with some HTML templates and 
javascript helper functions like this!

Here is the readme


What is it?
This is a sample of the ZoomBox used in the ArcIMS HTML Viewer.
This sample contains the functions used to create and manipulate
the "rubberband" box on the map display. Some of these functions
have been stripped of any additional routines or variables not
needed for demonstrating the ZoomBox capabilities.

How to start it:
Load ZoomBox.htm in a browser (version 4 or newer). Press down on
the left mouse button and drag (move the mouse with the button
pressed). The ZoomBox should appear and the box coordinates will
display in the Status Bar. Let up on the button and the ZoomBox
will disappear.""

See HTML ZoomBox Demo  @

Alex Rice, Software Developer
Architectural Research Consultants, Inc.
alrice at swcp.com 
alex_rice at arc.to 

More information about the mapserver-dev mailing list