[mapserver-users] zoom box in JavaScript (not Java)
Andrew Haigh
lists.ahaigh at dsl.pipex.com
Sun Sep 29 11:17:24 PDT 2002
I'm not sure if this will work or not but try something this:
1. Place the map image tag in a <div id="mapdiv" etc>. (Make the dive
the same size as the image)
2. Modify the ESRI code, so it doesn't use frames (although it might be
easier to rewrite it - I think).
3. Get the user to draw the drag box, when the user has finished, you've
got the mouse start and end co-ordinates.
4. Get the location of the div "mapdiv" using the getElementByID
javascript function, to get a handle on the div and then read its X and
Y values.
I'll give it a try, when I get a chance.
Let me know how you get on if you try it.
This code will only work for IE6+ and NN6+ (I think) although I've lost
my JavaScript book!
Andrew
On Sun, 2002-09-29 at 16:34, Alex Rice wrote:
>
> On Saturday, September 28, 2002, at 03:37 PM, Dan Barron wrote:
>
> > The javascript to do this is really pretty straight forward. In a
> > nutshell this is all you should need to know.
> >
>
> This is something different- I think the question was about how to draw
> a zoombox, also called "rubber band" box. Where you click and drag to
> create the new extent you want to zoom to.
>
>
> Alex Rice, Software Developer
> Architectural Research Consultants, Inc.
> alrice at swcp.com
> alex_rice at arc.to
>
--
--
"Imagination is more important than knowledge."
More information about the MapServer-users
mailing list