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

Puneet Kishor pkishor at GeoAnalytics.com
Sun Sep 29 23:50:57 EDT 2002


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