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

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


See http://www.dnr.state.mn.us/maps/landview_dhtml.html for an example.
Uses the same interface as the old mapplet applet so if you can build an
app with mapplet (now called jbox) then you can build one with DHTML.

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Puneet Kishor <pkishor at GeoAnalytics.com> 09/29/02 10:50PM >>>
I replied to this earlier, and accidently posted it to the mapserver 
dev list. First, here is the original reply from me...

===
Javascript works fine... it doesn't really draw, it reveals and hides 
different layers.

I have had this working for a while now, but have only recently been 
able to obtain permission from the client to open it up for list 
consumption. I will be posting the url early next week for list folks 
to see the application (have to obfuscate some of the client-specific 
data for privacy reasons ;-) ), and slowly after that I will start 
posting snippets from the application itself.

just a few days more.

thanks.

pk/

ps. the only downside is the zoombox in its current incarnation works 
reliably only in IE (both on Macs and Win). It also does work in 
Chimera and in Mozilla, but not reliably. I would need to do some work

to make it compatible, but no time.

Hopefully, once I post the code, someone else can make it work with 
other browsers and post it back.
===

second, here is a temp url showing this kind of functionality.

http://209.83.8.226/bims/index.pl 

This is a simple, perl mapscript driven prototype. Only zoomin, 
zoomout, and zoomall are functional, but enough to show the zoombox 
working in a non-frames page.

Sometime later this week I will post the url for a more elaborate 
application in php mapscript that does some of the same tricks.

keep in mind... the above will work only with IE (on any platform) at 
this time.

pk/




> At 11:18 AM 9/28/2002 -0600, Alex Rice wrote:
>> [reposting on mapserver-users, -dev is for mapserver internals 
>> discussion -- alex]
>>
>> 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!




More information about the mapserver-users mailing list