[rosa-users] Trouble getting started with Rosa

Yewondwossen Assefa assefa at dmsolutions.ca
Tue Jun 28 10:29:36 EDT 2005


 From what I can see you are missing a couple of hidden form parameters :

<INPUT TYPE="HIDDEN" NAME="INPUT_TYPE" VALUE="">
<INPUT TYPE="HIDDEN" NAME="INPUT_COORD" VALUE="">

You should add those just after the <input type="hidden" name="action" 
value="">

  Here is a valid set of definitions as example for auto submit using a 
rectangle. Note that in this example the form variable CMD is used (in 
your case it is action).

Later,



<APPLET NAME="RosaApplet" ARCHIVE="./rosa/rosa_png.jar" CODE="Rosa2000" 
WIDTH="400" HEIGHT="300" MAYSCRIPT>
<PARAM NAME="TB_POSITION" VALUE="right">
<PARAM NAME="TB_ALIGN" VALUE="top">
<PARAM NAME="IMG_URL" VALUE="/ms_tmp/111996835517401.jpg">
<PARAM NAME="INP_FORM_NAME" VALUE="myform"><PARAM NAME="TB_BUTTONS" 
VALUE="zoomin|zoomout|recentre|pquery">

<PARAM NAME="INP_TYPE_NAME" VALUE="INPUT_TYPE">
<PARAM NAME="INP_COORD_NAME" VALUE="INPUT_COORD">

<PARAM NAME="TB_SELECTED_BUTTON" VALUE="zoomin">


<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_HINT" VALUE="Zoom in: Click the button|and 
the map will zoom in">
<PARAM NAME="TB_BUT_zoomin_INPUT" VALUE="auto_rect">
<PARAM NAME="TB_BUT_zoomin_NAME" VALUE="CMD">
<PARAM NAME="TB_BUT_zoomin_VALUE" VALUE="ZOOM_IN">
....
</APPLET>

<INPUT TYPE="HIDDEN" NAME="CMD" VALUE="">
<INPUT TYPE="HIDDEN" NAME="INPUT_TYPE" VALUE="">
<INPUT TYPE="HIDDEN" NAME="INPUT_COORD" VALUE="">

Jeff Portwine wrote:
> Hello,
>  
> I haven't seen much traffic on this list since joining so i'm not sure 
> how active it is but I am having trouble getting started with Rosa and 
> was hoping to get a nudge in the right direction.
>  
> I have a php/mapscript application that I would eventually like to 
> enhance with rosa, but i'm having trouble right from the get-go.  It may 
> be my ignorance in working with java applets, but this is what I have so 
> far:
>  
> This is a very basic starting point obviously.. it just displays a map 
> with basic navigation buttons.  The problem I have right now is that I 
> don't know how to start coding for the buttons... for example when I 
> make a zoom-in rectangle or click a point for a query it doesn't 
> actually submit the form, even though I have them as type auto_rect. 
> auto_point, etc.    I've been looking a bit at the gmap75 demo but I 
> can't seem to find the missing piece that makes this all make sense.
>  
> Thanks a lot,
> Jeff
>  
> --- code below --
>  
> <html>
> <head>
> <Title> Rosa Test </title>
> </head>
> <body>
> <?PHP
> if (PHP_OS=="WINNT" || PHP_OS=="WIN32")
>   $dlext="dll";
> else $dlext="so";
>  
> if (!extension_loaded("MapScript"))
>   dl("php_mapscript.$dlext");
>  
> $map=ms_newMapObj("us.map");
> $map->imagecolor->setRGB(81,170,255);
>  
> $img=$map->draw();
> $url=$img->saveWebImage();
>  
> //////////////////////////
> ?>
> <APPLET NAME="RosaApplet" ARCHIVE="../rosa/rosa_png.jar" CODE="Rosa2000"
>         WIDTH="600" HEIGHT="400" MAYSCRIPT>
> <PARAM NAME="IMG_URL" VALUE="$url">
> <PARAM NAME="INP_FORM_NAME" VALUE="mapform">
> <PARAM NAME="INP_TYPE_NAME" VALUE="INPUT_TYPE">
> <PARAM NAME="INP_COORD_NAME" VALUE="INPUT_COORD">
>  
> <PARAM NAME="TB_POSITION" VALUE="TOP">
> <PARAM NAME="TB_ALIGN" VALUE="CENTER">
> <PARAM NAME="TB_BUTTONS" VALUE="query|full|zoomin|zoomout">
> <PARAM NAME="TB_SELECTED_BUTTON" VALUE="query">
> <PARAM NAME="TB_BUT_query_IMG" VALUE="graphics/tool_info_1.gif">
> <PARAM NAME="TB_BUT_full_IMG" VALUE="graphics/tool_recenter_1.gif">
> <PARAM NAME="TB_BUT_zoomin_IMG" VALUE="graphics/tool_zoomin_1.gif">
> <PARAM NAME="TB_BUT_zoomout_IMG" VALUE="graphics/tool_zoomout_1.gif">
> <PARAM NAME="TB_BUT_query_IMG_PR" VALUE="graphics/tool_info_2.gif">
> <PARAM NAME="TB_BUT_full_IMG_PR" VALUE="graphics/tool_recenter_2.gif">
> <PARAM NAME="TB_BUT_zoomin_IMG_PR" VALUE="graphics/tool_zoomin_2.gif">
> <PARAM NAME="TB_BUT_zoomout_IMG_PR" VALUE="graphics/tool_zoomout_2.gif">
>  
> <PARAM NAME="TB_BUT_query_HINT" VALUE="Query Map Point">
> <PARAM NAME="TB_BUT_query_INPUT" VALUE="auto_point">
> <PARAM NAME="TB_BUT_query_NAME" VALUE="action">
> <PARAM NAME="TB_BUT_query_VALUE" VALUE="query">
>  
> <PARAM NAME="TB_BUT_full_HINT" VALUE="Zoom to Full Extents">
> <PARAM NAME="TB_BUT_full_INPUT" VALUE="submit">
> <PARAM NAME="TB_BUT_full_NAME" VALUE="action">
> <PARAM NAME="TB_BUT_full_VALUE" VALUE="full">
>  
> <PARAM NAME="TB_BUT_zoomin_HINT" VALUE="Zoom In">
> <PARAM NAME="TB_BUT_zoomin_INPUT" VALUE="auto_rect">
> <PARAM NAME="TB_BUT_zoomin_NAME" VALUE="action">
> <PARAM NAME="TB_BUT_zoomin_VALUE" VALUE="zoomin">
>  
> <PARAM NAME="TB_BUT_zoomout_HINT" VALUE="Zoom Out">
> <PARAM NAME="TB_BUT_zoomout_INPUT" VALUE="auto_point">
> <PARAM NAME="TB_BUT_zoomout_NAME" VALUE="action">
> <PARAM NAME="TB_BUT_zoomout_VALUE" VALUE="zoomout">
> </APPLET>
>  
> <form method="GET" name="mapform">
> <input type="hidden" name="action" value="">
> </form>
>  
> </body>
> </html>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ROSA-users mailing list
> ROSA-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/rosa-users

-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------




More information about the ROSA-users mailing list