![]() |
||||
|
|
||||
[rosa-users] JavaScripts for Zoomout, FullExtent and Query?Yewondwossen Assefa assefa@dmsolutions.caTue, 04 Mar 2003 10:35:40 -0500
|
||||
This is a multi-part message in MIME format.
--------------9EBDE2B93248BBAB1BC3871F
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Hi There,
Attached is a template with rosa/mapserver cgi functionnalities for zooming. Note
the use of :
<PARAM NAME="TB_BUT_zoomin_NAME" VALUE="zoomdir">
<PARAM NAME="TB_BUT_zoomin_VALUE" VALUE="1">.
Later,
PS : there are tests codes in it, so please ignore those.
Daniel Wagner wrote:
> Hi!
>
> I try to build a mapserver-application with an integrated rosa-applet. The
> installation was successful. But when I hit the buttons, nothing happens. I
> think I must write JavaScripts for the functions. But I'm a totally dummy at
> Java, so please can You help me with this or send me some working functions.
>
> I need ZoomOut, FullExtent and Query.
>
> Some snippets of my code (instead of posting all):
>
> <head>
> <title>TLUG - MapServer Interface</title>
> <script language="JavaScript" type="text/javascript">
> function Rosa2000_apply(name, minx, miny, maxx, maxy, redraw) {
> document.mapserv.imgbox.value = minx + " " + miny + " "
> + maxx + " " + maxy;
> document.mapserv.imgxy.value = minx + " " + miny;
> }
>
> function Rosa2000_error(message) {
> alert(message);
> }
>
> <form name="mapserv" id="mapserv" method="GET" action="[program]">
> <input type="hidden" name="imgxy" value="299.5 299.5" />
> <input type="hidden" name="imgbox" value="-1 -1 -1 -1" />
> <input type="hidden" name="layer" value="basis" />
>
> <td colspan="2">
> <applet code="Rosa2000.class"
> codebase="http://jena.geogr.uni-jena.de/tlugmap/rosa/" archive="rosa_png.jar"
> width="600"
> height="600" name="rosa"
> MAYSCRIPT>
> <PARAM NAME="IMG_URL"
> VALUE="[img]">
> <PARAM NAME="INP_FORM_NAME"
> VALUE="mapserv">
> <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="right">
> <PARAM NAME="TB_BUTTONS"
> VALUE="info|space_05|recentre|space_05|zoomin|space_05|zoomout|space_05|fullexte
> nt">
> <!-- <PARAM
> NAME="TB_SELECTED_BUTTON" VALUE="zoomin"> -->
> <PARAM
> NAME="TB_SELECTED_BUTTON" VALUE="[lezterBT]">
> <PARAM NAME="TB_BUT_info_IMG"
> VALUE="http://jena.geogr.uni-
> jena.de/tlugmap/rosa/userdoc/images/icon_info_1.gif">
> <PARAM
> NAME="TB_BUT_info_IMG_PR" VALUE="http://jena.geogr.uni-
> jena.de/tlugmap/rosa/userdoc/images/icon_info_2.gif">
> <PARAM
> NAME="TB_BUT_info_BORDER" VALUE="1">
> <PARAM NAME="TB_BUT_info_HINT"
> VALUE="Informationen">
> <PARAM NAME="TB_BUT_info_INPUT"
> VALUE="auto_point">
> <PARAM NAME="TB_BUT_info_NAME"
> VALUE="CMD">
> <PARAM NAME="TB_BUT_info_VALUE"
> VALUE="QUERY">
> <PARAM
> NAME="TB_BUT_recentre_IMG" VALUE="http://jena.geogr.uni-
> jena.de/tlugmap/rosa/userdoc/images/icon_recentre_1.gif">
> <PARAM
> NAME="TB_BUT_recentre_IMG_PR" VALUE="http://jena.geogr.uni-
> jena.de/tlugmap/rosa/userdoc/images/icon_recentre_2.gif">
> <PARAM
> NAME="TB_BUT_recentre_BORDER" VALUE="1">
> <PARAM
> NAME="TB_BUT_recentre_HINT" VALUE="Bewegen">
> <PARAM
> NAME="TB_BUT_recentre_INPUT" VALUE="auto_point">
> <PARAM
> NAME="TB_BUT_recentre_NAME" VALUE="CMD">
> <PARAM
> NAME="TB_BUT_recentre_VALUE" VALUE="RECENTER">
> <PARAM NAME="TB_BUT_zoomin_IMG"
> VALUE="http://jena.geogr.uni-
> jena.de/tlugmap/rosa/userdoc/images/icon_zoomin_1.gif">
> <PARAM
> NAME="TB_BUT_zoomin_IMG_PR" VALUE="http://jena.geogr.uni-
> jena.de/tlugmap/rosa/userdoc/images/icon_zoomin_2.gif">
> <PARAM
> NAME="TB_BUT_zoomin_BORDER" VALUE="1">
> <PARAM
> NAME="TB_BUT_zoomin_HINT" VALUE="Vergrößern">
> <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">
> <PARAM
> NAME="TB_BUT_zoomin_INPUT" VALUE="auto_point">
> <PARAM
> NAME="TB_BUT_zoomin_NAME" VALUE="CMD">
> <PARAM
> NAME="TB_BUT_zoomin_VALUE" VALUE="ZOOM_IN">
> <!-- <PARAM
> NAME="TB_BUT_zoomin_JSACTION" VALUE="lastButtonSelected"> -->
> <PARAM
> NAME="TB_BUT_zoomin_CURSOR_TYPE" VALUE="CROSSHAIR">
> <PARAM
> NAME="TB_BUT_zoomout_IMG" VALUE="http://jena.geogr.uni-
> jena.de/tlugmap/rosa/userdoc/images/icon_zoomout_1.gif">
> <PARAM
> NAME="TB_BUT_zoomout_IMG_PR" VALUE="http://jena.geogr.uni-
> jena.de/tlugmap/rosa/userdoc/images/icon_zoomout_2.gif">
> <PARAM
> NAME="TB_BUT_zoomout_BORDER" VALUE="1">
> <PARAM
> NAME="TB_BUT_zoomout_HINT" VALUE="Verkleinern">
> <PARAM
> NAME="TB_BUT_zoomout_INPUT" VALUE="submit">
> <PARAM
> NAME="TB_BUT_zoomout_NAME" VALUE="CMD">
> <PARAM
> NAME="TB_BUT_zoomout_VALUE" VALUE="toolzoomout()">
> <!-- <PARAM
> NAME="TB_BUT_zoomout_JSACTION" VALUE="zoomin()"> -->
> <!-- <PARAM
> NAME="TB_BUT_zoomout_CURSOR_TYPE" VALUE="CROSSHAIR"> -->
> <PARAM
> NAME="TB_BUT_fullextent_IMG" VALUE="http://jena.geogr.uni-
> jena.de/tlugmap/rosa/userdoc/images/icon_fullextent_1.gif">
> <PARAM
> NAME="TB_BUT_fullextent_IMG_PR" VALUE="http://jena.geogr.uni-
> jena.de/tlugmap/rosa/userdoc/images/icon_fullextent_2.gif">
> <PARAM
> NAME="TB_BUT_fullextent_BORDER" VALUE="1">
> <PARAM
> NAME="TB_BUT_fullextent_HINT" VALUE="Ausgangskarte">
> <PARAM
> NAME="TB_BUT_fullextent_INPUT" VALUE="submit">
> <PARAM
> NAME="TB_BUT_fullextent_NAME" VALUE="CMD">
> <PARAM
> NAME="TB_BUT_fullextent_VALUE" VALUE="FULL_EXTENT">
> </applet>
> <input type="HIDDEN" name="letzterBt"
> value="" />
> <input type="HIDDEN" name="CMD"
> value="" />
> <input type="HIDDEN" name="INPUT_TYPE"
> value="" />
> <input type="HIDDEN" name="INPUT_COORD"
> value="" />
> <input type="HIDDEN" name="zommdir"
> value="[zoomdir]">
>
> Thanks in advance!!!
>
> Bye.
>
> Daniel Wagner
>
> -----------------------------------------------------
> This mail was sent through http://webmail.uni-jena.de
>
> _______________________________________________
> ROSA-users mailing list
> ROSA-users@dmsolutions.ca
> http://lists.dmsolutions.ca/mailman/listinfo/rosa-users
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa@dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
--------------9EBDE2B93248BBAB1BC3871F
Content-Type: text/html; charset=us-ascii;
name="demo_rosa.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="demo_rosa.html"
<html>
<head><title>MapServer Demo Interface</title></head>
<SCRIPT LANGUAGE="JavaScript">
function querycheck()
{
alert("querycheck");
document.forms[0].submit();
}
function Load()
{
//dfPixelSize = ([maxx] - [minx])/400;
//window.alert(dfPixelSize);
//document.RosaApplet.SetPixelSize(dfPixelSize);
}
</SCRIPT>
<body bgcolor=#FFFFFF onLoad="javascript:Load()">
<center><h1>MapServer Demo Interface</h1></center>
<hr>
<form name="mainmap" method=GET action="[program]" >
<table>
<tr>
<td>
<!--<input type="submit" name="Submit" value="Submit">-->
</td>
<td>
<APPLET NAME="RosaApplet" ARCHIVE="/msapps/itasca/rosa/rosa_png.jar" CODE="Rosa2000" WIDTH=400 HEIGHT=300 MAYSCRIPT>
<PARAM NAME="LOADING_MSG" VALUE="maps take a few seconds to draw ...">
<PARAM NAME="IMG_XY" VALUE="0,0">
<PARAM NAME="INP_FORM_NAME" VALUE="mainmap">
<PARAM NAME="TB_POSITION" VALUE="right">
<PARAM NAME="TB_ALIGN" VALUE="top">
<!--<PARAM NAME="IMG_URL" VALUE="/cgi-bin/mapserv_36.exe?map=[map]&mode=map&imgext=[minx]+[miny]+[maxx]+[maxy]&mapsize=400+300"> -->
<PARAM NAME="IMG_URL" VALUE="[img]">
<PARAM NAME="TB_BUTTONS" VALUE="zoomin|zoomout|test|query">
<PARAM NAME="INP_TYPE_NAME" VALUE="INPUT_TYPE">
<PARAM NAME="INP_COORD_NAME" VALUE="INPUT_COORD">
<PARAM NAME="PIXEL_SIZE" VALUE="">
<PARAM NAME="DIST_MSG" VALUE="Approximative distance: %s miles">
<PARAM NAME="TB_BUT_zoomin_IMG" VALUE="/msapps/itasca/images/tool_zoomin_1.gif">
<PARAM NAME="TB_BUT_zoomin_IMG_PR" VALUE="/msapps/itasca/images/tool_zoomin_2.gif">
<PARAM NAME="TB_BUT_zoomin_HINT" VALUE="Zoom in: drag a box to zoom in">
<PARAM NAME="TB_BUT_zoomin_INPUT" VALUE="auto_rect">
<PARAM NAME="TB_BUT_zoomin_NAME" VALUE="zoomdir">
<PARAM NAME="TB_BUT_zoomin_VALUE" VALUE="1">
<PARAM NAME="TB_BUT_zoomin_CURSOR_TYPE" VALUE="CROSSHAIR">
<PARAM NAME="TB_BUT_zoomout_IMG" VALUE="/msapps/itasca/images/tool_zoomout_1.gif">
<PARAM NAME="TB_BUT_zoomout_IMG_PR" VALUE="/msapps/itasca/images/tool_zoomout_2.gif">
<PARAM NAME="TB_BUT_zoomout_HINT" VALUE="Zoom out: Click to zoom out">
<PARAM NAME="TB_BUT_zoomout_INPUT" VALUE="submit">
<PARAM NAME="TB_BUT_zoomout_NAME" VALUE="zoomdir">
<PARAM NAME="TB_BUT_zoomout_VALUE" VALUE="-1">
<!--<PARAM NAME="TB_BUT_zoomout_JSACTION" VALUE="querycheck()">-->
<PARAM NAME="TB_BUT_zoomout_CURSOR_TYPE" VALUE="CROSSHAIR">
<PARAM NAME="TB_BUT_test_IMG" VALUE="/msapps/itasca/images/tool_ruler_1.gif">
<PARAM NAME="TB_BUT_test_IMG_PR" VALUE="/msapps/itasca/images/tool_ruler_2.gif">
<PARAM NAME="TB_BUT_test_HINT" VALUE="Draw lines on the map">
<PARAM NAME="TB_BUT_test_INPUT" VALUE="dist">
<PARAM NAME="TB_BUT_test_NAME" VALUE="CMD">
<PARAM NAME="TB_BUT_test_VALUE" VALUE="ruler">
<PARAM NAME="TB_BUT_query_IMG" VALUE="/msapps/itasca/images/tool_zoomin_1.gif">
<PARAM NAME="TB_BUT_query_IMG_PR" VALUE="/msapps/itasca/images/tool_zoomin_2.gif">
<PARAM NAME="TB_BUT_query_HINT" VALUE="Draw lines on the map">
<PARAM NAME="TB_BUT_query_NAME" VALUE="zoomdir">
<PARAM NAME="TB_BUT_query_VALUE" VALUE="0">
<PARAM NAME="TB_BUT_query_INPUT" VALUE="auto_point">
<PARAM NAME="TB_BUT_query_JSACTION" VALUE="querycheck()">
</APPLET>
</td>
</tr>
<tr>
<td>
<img SRC="/images/keymap.gif">
</td>
</tr>
<tr>
<td>
<img SRC="[scalebar]">
</td>
</tr>
<tr>
<td>
<img SRC="[legend]">
</td>
</tr>
<tr>
<td>
<img SRC="[ref]">
</td>
</tr>
</table>
<input type="hidden" name="INPUT_TYPE" value="">
<input type="hidden" name="INPUT_COORD" value="">
<input type="hidden" name="zoomdir" value="">
<input type="hidden" name="zoom" value="">
<input type="hidden" name="zoomsize" value="2">
<input type="hidden" name="imgxy" value="200.0 150.0">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="map" value="[map]">
<input type="hidden" name="savequery" value="true">
<input type="hidden" name="program" value="[program]">
<input type="hidden" name="map_web_imagepath" value="[map_web_imagepath]">
<input type="hidden" name="map_web_imageurl" value="[map_web_imageurl]">
</form>
</body></html>
--------------9EBDE2B93248BBAB1BC3871F--
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |