[mapserver-users] Another Rosa applet question with CGI

Obe, Regina DND\MIS Regina.Obe.PFD at ci.boston.ma.us
Fri Dec 28 07:15:57 EST 2001


Thanks Frank - that example was very handy.  For some reason - the recenter
and zoom in boxing didn't work properly with my version of mapserv35 and the
rosa applet I was using so I had to modify those sections a bit replacing
them with javascript calls (I've only tested on IE 5.5. and NS 4.75).  I'm
posting this in case others ran into similar problems.  I also added
map-resize capabilities too to the adapted version.  If anyone is interested
I can post this version too - I should have an external app running soon for
people to look at that will use the CGI rosa applet.

Below are the javascript lines I had to add and revision to the center and
zoom out applet params

<SCRIPT LANGUAGE="JavaScript">

function zoomin(){
   var inputtype
   var aForm = document.forms[0]
   var boundary = aForm.INPUT_COORD.value.replace(";", " ");
   boundary = boundary.replace(",", " ");
   boundary = boundary.replace(",", " ");
   inputtype = aForm.INPUT_TYPE.value 
   aForm.imgbox.value = boundary
   aForm.imgbox.disabled = false
   aForm.submit()
}

function recenter(){
   var inputtype
   var aForm = document.forms[0]
   var boundary = aForm.INPUT_COORD.value.replace(",", " ");
   boundary = boundary.replace(",", " ");
   boundary = boundary.replace(",", " ");
   inputtype = aForm.INPUT_TYPE.value 
   aForm.imgxy.value = boundary
   aForm.submit()
}

</SCRIPT>

To the form had to add additional hidden field

<input type="hidden" name="imgbox" value="" disabled="true">


To applet params - had to revise recenter and zoomin to use js functions
instead

<!-- Recenter -->
<param name="TB_BUT_recentre_IMG" value="/images/tool_recentre_1.gif">
<param name="TB_BUT_recentre_IMG_PR" value="/images/tool_recentre_2.gif">
<param name="TB_BUT_recentre_CURSOR_TYPE" value="MOVE">
<param name="TB_BUT_recentre_INPUT" value="auto_point">
<param name="TB_BUT_recentre_NAME" value="zoomdir">
<param name="TB_BUT_recentre_VALUE" value="0">
<param name="TB_BUT_recentre_JSACTION" value="recenter()">
<param name="TB_BUT_recentre_HINT" value="Recenter">  

<!-- Zoom In -->
<param name="TB_BUT_zoomin_IMG" value="/images/tool_zoomin_1.gif">
<param name="TB_BUT_zoomin_IMG_PR" value="/images/tool_zoomin_2.gif">
<param name="TB_BUT_zoomin_CURSOR_TYPE" value="CROSSHAIR">
<param name="TB_BUT_zoomin_INPUT" value="auto_rect">
<param name="TB_BUT_zoomin_NAME" value="zoomdir">
<param name="TB_BUT_zoomin_JSACTION" value="zoomin()">
<param name="TB_BUT_zoomin_VALUE" value="1">
<param name="TB_BUT_zoomin_HINT" value="Zoom In">





-----Original Message-----
From: Frank Koormann [mailto:frank.koormann at intevation.de]
Sent: Thursday, December 20, 2001 11:13 AM
To: mapserver-users at lists.gis.umn.edu
Subject: Re: [mapserver-users] Another Rosa applet question with CGI


Dear all,

* Bart van Heijningen (bart at atsence.nl) [011219 20:30]:
> Hi all,
> You were right about the errors.
> 
[...]
> 
> I cannot find examples for the ROSA which can be generally applied, as is
> the case with the Mapplet which allows you to have a working setup
fromwhich
> you can work.
> 
> I would like to know what variables in the template file I should use to
> pass to the CGI and a simple submit function.
> 

I already sent the attachment to Bart personally, but he encouraged me
to post it to the list.

So, whoever interested in, find below a sample html template using the 
rosa applet. Unfortunately I can't cite a site based on this.

Regards,

        Frank

-- 
Frank Koormann                             <frank.koormann at intevation.de>
 Professional Service around Free Software       (http://intevation.net/)
 FreeGIS Project                                 (http://freegis.org/)



More information about the mapserver-users mailing list