incorporating Rosa into my mapscript app

Piero Cavalieri piero.cavalieri at HEIDI.IT
Thu Jun 16 04:02:30 EDT 2005


Rosa set some hidden variables which are used by the cgi to generate image.
INPUT_COORD should be equivalent to IMGBOX, which is used instead by DHTML
interfaces and JBox (I don't know why was added INPUT_COORD, which has a
format different from the equivalent IMGBOX...)

I use MapServer in cgi mode in .NET environment, so for example, with
zoomin and a custom JavaScript action:

<APPLET NAME="RosaApplet" ARCHIVE="./rosa/rosa.jar" CODE="Rosa2000"
WIDTH="<%=mapwidth%>" HEIGHT="<%=mapheight%>" MAYSCRIPT>

<PARAM NAME="IMG_URL" VALUE="<%=img%>">
<PARAM NAME="INP_FORM_NAME" VALUE="mapserv">
<PARAM NAME="TB_BUTTONS" VALUE="zoomin|fullView">
<PARAM NAME="INP_TYPE_NAME" VALUE="INPUT_TYPE">
<PARAM NAME="INP_COORD_NAME" VALUE="INPUT_COORD">

<!-- Zoom In -->
<PARAM NAME="TB_BUT_zoomin_IMG" VALUE="./images/tool_zoomin_1.gif">
<PARAM NAME="TB_BUT_zoomin_INPUT" VALUE="auto_rect">
<PARAM NAME="TB_BUT_zoomin_NAME" VALUE="mode">
<PARAM NAME="TB_BUT_zoomin_VALUE" VALUE="+2">

<!-- Full View -->
<PARAM NAME="TB_BUT_fullView_IMG" VALUE="./images/tool_fullView_1.gif">
<PARAM NAME="TB_BUT_fullView_INPUT" VALUE="submit">
<PARAM NAME="TB_BUT_fullView_NAME" VALUE="mode">
<PARAM NAME="TB_BUT_fullView_VALUE" VALUE="0">
<PARAM NAME="TB_BUT_fullView_JSACTION" VALUE="FullView()">

</APPLET>

at the end of the code:

<INPUT TYPE="HIDDEN" NAME="INPUT_TYPE" VALUE="">
<INPUT TYPE="HIDDEN" NAME="INPUT_COORD" VALUE="">
<INPUT TYPE="HIDDEN" NAME="mode" VALUE="">
(and many others, such as imgext, mapwidth, mapheight ecc..)

and in the <HEAD>, for the custom JavaScript action:

function FullView() {
  document.mapserv.refreshed.value= "1";
  document.mapserv.imgext.value = "1609350 5056766 1731630 5159006";
  document.mapserv.submit();
}


GMap application, from DM solutions has exmaple in PHP/MapScript
environment. Look at GMapDrawMap() funct in GMap75.inc.php. Simply, instead
of my variables from code-behind (<%=img%> ecc..) you wolud have variables
from PHP/MapScript ($url, where $url=$img->saveWebImage
(parameter1,param2,...);

Piero.



On 6/15/05, Jeff Portwine <jdport at veritime.com> wrote:

>>
>> Hello,
>>
>> Was just wondering if any of you ROSA users could point me in the
direction
>> of an example or a document that can get me started... I want to
incorporate
>> it into my php/mapscript application and I can't find any basic getting
>> started information.   The web site has information on the Applet
Parameters
>> which is good but I'm not to that point yet  :)
>>
>> Thanks!
>>
>> -Jeff
>>



More information about the mapserver-users mailing list