[rosa-users] ROSA doesn't add button
René F. Viancos S.
rviancos at gmail.com
Tue Jun 6 21:00:14 EDT 2006
Hi Steffen, i think that the problem may be in the button declaration and
init parameters of the rosa applet:
function ProcessPoint()
{
AppletCoords = document.myform.APPLET_COORDS.value;
alert(AppletCoords);
document.form_name.submit(); // if you want :)
Init Parameters, in PHP
printf("\n");
printf("<APPLET NAME=\"RosaApplet\" ARCHIVE=\"./rosa/rosa.jar\"
CODE=\"Rosa2000\" WIDTH=\"%d\" HEIGHT=\"%d\" MAYSCRIPT>\n", $MapObj->width,
$MapObj->height);
printf("<PARAM NAME=\"TB_POSITION\" VALUE=\"up\">\n");
printf("<PARAM NAME=\"TB_ALIGN\" VALUE=\"right\">");
printf("<PARAM NAME=\"IMG_URL\" VALUE=\"%s\">",$url);
printf("<PARAM NAME=\"INP_FORM_NAME\" VALUE=\"form_name\">");
printf("<PARAM NAME=\"TB_BUTTONS\"
VALUE=\"zoomext|zoomin|zoomout|recentre|pquery|new_point\">\n");
printf("<PARAM NAME=\"INP_TYPE_NAME\" VALUE=\"APPLET_COORDS_TYPE
\">\n");
printf("<PARAM NAME=\"INP_COORD_NAME\" VALUE=\"APPLET_COORDS\">\n");
printf("<PARAM NAME=\"TB_SELECTED_BUTTON\"
VALUE=\"%s\">",$AppletButtonName); // preserves the selected button after
refresh)
and the declaration of the "new_point" button and parameters are:
printf("<PARAM NAME=\"TB_BUT_new_point_IMG\"
VALUE=\"./rosa/new_point_1.gif\">\n");
printf("<PARAM NAME=\"TB_BUT_new_point_IMG_PR\"
VALUE=\"./rosa/new_point_2.gif\">\n");
printf("<PARAM NAME=\"TB_BUT_new_point_HINT\" VALUE=\"Make a click
on the map in oder to geocode a new point\">\n");
printf("<PARAM NAME=\"TB_BUT_new_point_INPUT\"
VALUE=\"auto_point\">\n"); // auto submit or call to JSACTION function.
printf("<PARAM NAME=\"TB_BUT_new_point_NAME\" VALUE=\"CMD\">\n");
printf("<PARAM NAME=\"TB_BUT_new_point_VALUE\"
VALUE=\"NEW_POINT\">\n");
printf("<PARAM NAME=\"TB_BUT_new_point_JSACTION\"
VALUE=\"ProcessPoint()\">\n");
printf("<PARAM NAME=\"TB_BUT_new_point_CURSOR_TYPE\"
VALUE=\"CROSSHAIR\">\n");
Regards, and if you need more help, please feel free to contact me to
rviancos at gmail.com
--
René F. Viáncos S.
IT & Geomatics Manager
Unidad de Ambiente, Región Territorio y Espacio, UNARTE
Facultad de Ciencias
Universidad de Chile
Tel (56-2) 632 61 46
Cel (56 8) 489 94 35
rviancos at uchile.cl
rviancos at gmail.com
2006/6/6, Yewondwossen Assefa <assefa at dmsolutions.ca>:
>
> Stephen,
>
> One possible problem could be that the name used in the toolbar DIG_PT
> is diffrent from the one that is used in trhe setups DIGPT. The names
> should be the same.
>
> Later,
>
> Stephen H. Savage wrote:
> > Greetings,
> >
> > I'm trying to add a button to the ROSA toolbar that will pass back
> map
> > coordinates that I can use to add a point to a shapefile (for now, I
> just want
> > to echo back the Input_Coord value via the JavaScript; I already have
> the code
> > written to do the add to the shapefile). But the button doesn't appear
> in the
> > toolbar. But the button doesn't appear in the toolbar. The images are
> in the
> > correct folder; everything is set up correctly as far as I can
> tell. WHat's
> > wrong?
> >
> > Here's the temporary script:
> >
> > function ProcessPoint()
> > {
> > szCoord = document.forms[0].INPUT_COORD.value;
> > window.alert(szCoord);
> > } // end of ProcessPoint
> >
> > Here's the applet:
> >
> > <applet name="RosaApplet" archive="./rosa/rosa.jar" code="Rosa2000"
> width="400"
> > height="343" MAYSCRIPT>
> > <param name="TB_POSITION" value="right">
> > <param name="TB_ALIGN" value="top">
> > <param name="IMG_URL"
> > value="
> http://localhost/maplab_projects/gmf_apps/IraqTest/wrapper/drawmap.php?
> > gszMapName=/ms4w/apps///maplab-
> > 2.2.1/IraqTestMap//IraqTestMap.map&gszCurrentState=BBOX=38.5,28.498125
> ,49,37.501
> >
> 875|SRS=|MAPSIZE=400,343|LAYERS=0,1,2,3,4&map_session_mode=0&run_query=0&gszPHPM
> > apScriptModName=php_mapscript_46.dll&gszQueryCoords=">
> > <param name="INP_FORM_NAME" value="main">
> > <param name="TB_BUTTONS"
> > value="ZOOM_IN|ZOOM_OUT|ZOOM_FULL|RECENTRE|QUERY|DIG_PT">
> > <param name="INP_TYPE_NAME" value="INPUT_TYPE">
> > <param name="INP_COORD_NAME" value="INPUT_COORD">
> > <param name="TB_SELECTED_BUTTON" value="ZOOM_IN">
> > <param name="TB_BUT_DIGPT_IMG" value="./images/tool_digpt_1.gif">
> > <param name="TB_BUT_DIGPT_IMG_PR" value="./images/tool_digpt_2.gif">
> > <param name="TB_BUT_DIGPT_HINT" value="Digitize Pre-inventory Points">
> > <param name="TB_BUT_DIGPT_INPUT" value="auto_point">
> > <param name="TB_BUT_DIGPT_NAME" value="CMD">
> > <param name="TB_BUT_DIGPT_VALUE" value="DIGPT">
> > <param name="TB_BUT_DIGPT_JSACTION" value="ProcessPoint()">
> > <param name="TB_BUT_DIGPT_CURSOR_TYPE" value="CROSSHAIR">
> > </applet>
> >
> > Thanks,
> >
> > -Steve
> >
> > Stephen H. Savage, Affiliate Professor and Director
> > Geo-Archaeological Information Applications (GAIA) Lab
> > School of Human Evolution and Social Change
> > Box 872402
> > Arizona State University
> > Tempe, AZ 85287-2402
> >
> > shsavage at asu.edu
> >
> > http://gaialab.asu.edu/home - The GAIA Lab's home page
> > http://archaeology.asu.edu/Jordan - Personal home page
> > _______________________________________________
> > 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
> ----------------------------------------------------------------
>
>
> _______________________________________________
> ROSA-users mailing list
> ROSA-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/rosa-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/rosa-users/attachments/20060607/d3344af3/attachment.html
More information about the ROSA-users
mailing list