<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=IT link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>If you use jbox, you don’t
have to use an Image Button. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Jbox has a function,
which you have to implement, which is triggered on mouse relased.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>For my case it’s so
implemented:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>function
setbox_handler(name, minx, miny, maxx, maxy) {<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'> //alert("Set
handler: name: " + name + " minx: " + minx + " miny:
" + miny);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>
document.mapserv.imgbox.value = minx + " " + miny + " " +
maxx + " " + maxy;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>
document.mapserv.imgxy.value = minx + " " + miny;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'> doAction(mode);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'> }<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Also, as explained in
jbox (and dbox) tutorial you have to implement also:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>seterror_handler<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>reset_handler<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>..<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>..<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>You can leave the
functions body empty, if you don’t use them, but at least setbox_handler
must be implemented.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Also there are some
hidden variables to write in the aspx page (again read jbox docs).<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>What I do in
doAction(mode) is to make a query to Mapserver cgi (as I don’t use C#
bindings to mapserver) with javascript The javascript call is done to a C#
function via Ajax, the C# function make the query to the cgi with
HttpWebRequest method, and the results is parsed. In the result I have the URL
of the new created image. This url is send back to the aspx page where, with
javascript, I change the url of the displayed image:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'>This is quite complicated
round trip, if you want to implement it in few hours (or days…), but then
it works fine. What you can do, to simplify things, is to implement doAction to
make a post to the aspx page which contains the jbox applet, and then in code
behind of the page, make the query to Mapserver (cgi or using C# bindings). Then
in code-behind you have to change the url of the image in the applet (maybe you
can’t do it dynamically server side, as jbox is not a server control,
however you can set the new image url in a hidden server control, then via
javascriot take that value and change the image url of the applet).<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'>Cheers<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'> Piero</span></font><font
size=2 color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;
font-family:Arial;color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
yatendra jaiswal [mailto:yatendra.jaiswal@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> mercoledì 21 maggio 2008
07:29<br>
<b><span style='font-weight:bold'>To:</span></b> Cavalieri Piero<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [MAPSERVER-USERS] How
to implement jBox in asp.netusing C# or VB.....</span></font><span lang=EN-US><o:p></o:p></span></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Dear Cavalieri,<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Thanks for immediate response.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I have tried as you explained. But i am not getting any possitive
result. <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I am using image button. How to implement jbox on image button?<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Please if possible explain in brief.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Thanks regards...<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br>
<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 5/20/08, <b><span style='font-weight:bold'>Cavalieri
Piero</span></b> <<a href="mailto:Piero.Cavalieri@heidi.it" target="_blank">Piero.Cavalieri@heidi.it</a>>
wrote:</span></font></span> <o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>You use it exatly the same as with other languages (jbox is an applet):<br>
<br>
In aspx:<br>
<br>
<APPLET codebase="java" code="jBox.class" archive="jBox.jar"<br>
width="<%=mapwidth%>"
height="<%=mapheight%>" name="jbox" MAYSCRIPT><br>
<PARAM name="image"
value="http://<%=host%><%=img%>"><br>
<PARAM name="box" value="true"><br>
<PARAM name="thickness" value="2"><br>
<PARAM name="color" value="red"><br>
<PARAM name="jitter" value="2"><br>
<PARAM name="verbose" value="true"><br>
</APPLET><br>
<br>
Values inside <%=...%> are setted here in the code behind of the page,
for the first request (if(!IsPostBack)), then I use ajax to build appropriate
requests and to swap the old image with the new returned ones
(document.jbox.setimage(newImage.src));<br>
<br>
Be sure to read jbox tutorials (you need setbox_handler ecc. as indicated in
the tutorial).<br>
<br>
Cheers<br>
Piero<br>
<br>
<br>
<br>
> -----Original Message-----<br>
> From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org"
target="_blank">mapserver-users-bounces@lists.osgeo.org</a> [mailto:<a
href="mailto:mapserver-users-" target="_blank">mapserver-users-</a><br>
> <a href="mailto:bounces@lists.osgeo.org" target="_blank">bounces@lists.osgeo.org</a>]
On Behalf Of yatendra<br>
> Sent: martedì 20 maggio 2008 15:06<br>
> To: <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
> Subject: [MAPSERVER-USERS] How to implement jBox in asp.netusing C# or<br>
> VB.....<br>
><br>
><br>
> Hi Friends,<br>
> i need some help to create rubberband zoom in funtionality.....<br>
> Can any one know hoe to use jBox functionality <a href="http://asp.net/"
target="_blank">asp.net</a>.<br>
> or How to create zoom in funtionality using rubberband?<br>
> Please explain..<br>
> Thanks Regards<br>
> --<br>
> View this message in context: <a
href="http://www.nabble.com/How-to-implement-jBox-" target="_blank">http://www.nabble.com/How-to-implement-jBox-</a><br>
> in-asp.netusing-C--or-VB.....-tp17339858p17339858.html<br>
> Sent from the Mapserver - User mailing list archive at Nabble.com.<br>
><br>
> _______________________________________________<br>
> mapserver-users mailing list<br>
> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br clear=all>
<br>
-- <br>
Yatendra Jaiswal<br>
<a href="mailto:yatendra.jaiswal@gmail.com" target="_blank">yatendra.jaiswal@gmail.com</a><br>
+91-9423344396 <o:p></o:p></span></font></p>
</div>
</div>
</body>
</html>