I&#39;m using this one for C# which is working fairly well.<br><br>public void ZoomRectangle(double minx, double miny, double maxx, double maxy)<br>        {<br>            if (map != null &amp;&amp; (maxx - minx) &gt; 2 &amp;&amp; (maxy-miny) &gt; 2)<br>
            {<br>                using (rectObj imgrect = new rectObj(minx, miny, maxx, maxy, 0))<br>                {<br>                    // mapscript requires this hack<br>                    imgrect.miny = maxy;<br>
                    imgrect.maxy = miny;<br><br>                    map.zoomRectangle(imgrect, map.width, map.height, map.extent, null);<br>                    this.RefreshView();<br>                    return;<br>                }<br>
            }<br>        }<br><br><br>I guess the same would work for java as well.<br><br>Best regards,<br><br>Tamas<br><br><br><div class="gmail_quote">2009/3/6 Ahmet Temiz <span dir="ltr">&lt;<a href="mailto:temiz@deprem.gov.tr">temiz@deprem.gov.tr</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div bgcolor="#ffffff">

<font size="2"><b>hi,
<br>thank you
<br>
<br>I had tried two ways you mentioned as 1 and 2
<br>
<br>&quot;1&quot; is </b></font><font size="2">rectObj(10,10,100,100,0)</font>
<br><font size="2"><b>&quot;2&quot; is </b></font><font size="2">rectObj(10,100,100,10,0)
<br>
<br>both resulted exception.
<br>
<br>what I want to know is that if </font><font size="2">I can create any image box providing keeping the same size.
<br>
<br>I mean </font><font size="2">rectOb(</font><font size="2">11,11,101,101) and </font><font size="2">rectOb(</font><font size="2">12,12,102,102) and so on have same effect
<br>on </font><font size="2">zoomRectangle.
<br>
<br>regards
<br></font><font size="2"><b>
<br>On Fri, 6 Mar 2009 16:42:45 +0100, Tamas Szekeres wrote</b>
<br><div><div></div><div class="h5">&gt; 
Hi,
<br>&gt; 
<br>&gt; I guess you&#39;ve run into  the problem reported 
in
<br>&gt; <a href="http://trac.osgeo.org/mapserver/ticket/1988" target="_blank">http://trac.osgeo.org/mapserver/ticket/1988</a>
<br>&gt; 
<a href="http://trac.osgeo.org/mapserver/ticket/1817" target="_blank">http://trac.osgeo.org/mapserver/ticket/1817</a>
<br>&gt; 

<br>&gt; and some other related tickets.
<br>&gt; 
<br>&gt; I&#39;m not sure why 
this issue haven&#39;t been addressed yet, seem you have to swap the miny and 
maxy values in the rectangle before passing to zoomRectangle right now.
<br>&gt; 

<br>&gt; 

Best regards,
<br>&gt; 
<br>&gt; Tamas
<br>&gt; 
<br>&gt; 2009/3/6 Ahmet Temiz <span dir="ltr">&lt;<a href="mailto:temiz@deprem.gov.tr" target="_blank">temiz@deprem.gov.tr</a>&gt;</span>
<br>&gt; 
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
hello
<br>&gt; 
<br>&gt; 

I am using mapserver-java-mapscript.
<br>&gt; 
<br>&gt; 

I am very confused about using zoomRectangle.
<br>&gt; 
<br>&gt; 

I tried zoomRectangle in two ways. But I still have exception.
<br>&gt; 
<br>&gt; 

here is the java code I tried and related exception results:
<br>&gt; 
<br>&gt; 

1..
<br>&gt; 
<br>&gt; 

rectObj imgrect =new rectObj(10,10,100,100,0);
<br>&gt; 

                map0.zoomRectangle(imgrect, 500, 500, map0.getExtent(), 
null);
<br>&gt; 
<br>&gt; 

SEVERE: java.lang.UnknownError: mapscript::mapObj::zoomRectangle():
<br>&gt; 

General error message. image rectangle maxy &gt;= miny
<br>&gt; 

javax.faces.el.EvaluationException: java.lang.UnknownError:
<br>&gt; 

mapscript::mapObj::zoomRectangle():
<br>&gt; 

General error message. image rectangle maxy &gt;= miny
<br>&gt; 
<br>&gt; 

~~~~~~~~~~~~~~~~
<br>&gt; 

2..
<br>&gt; 
<br>&gt; 

rectObj imgrect =new rectObj(10,100,100,10,0);
<br>&gt; 

map0.zoomRectangle(imgrect, 500, 500, map0.getExtent(), null);
<br>&gt; 
<br>&gt; 

SEVERE: java.lang.UnknownError: rectObj():
<br>&gt; 

Invalid rectangle. { &#39;minx&#39;: 10.000000 , &#39;miny&#39;: 100.000000 , 
&#39;maxx&#39;:
<br>&gt; 

100.000000 , &#39;maxy&#39;: 10.000000 }
<br>&gt; 

javax.faces.el.EvaluationException: java.lang.UnknownError: rectObj():
<br>&gt; 

Invalid rectangle. { &#39;minx&#39;: 10.000000 , &#39;miny&#39;: 100.000000 , 
&#39;maxx&#39;:
<br>&gt; 

100.000000 , &#39;maxy&#39;: 10.000000 }
<br>&gt; 

~~~~~~~~~~~~~~~~
<br>&gt; 
<br>&gt; 

I will appreciate, if you give your sense.
<br>&gt; 
<br>&gt; 

regards
<br>&gt; 

--
<br>&gt; 

Open WebMail Project (<a href="http://openwebmail.org/" target="_blank">http://openwebmail.org</a>)
<br>&gt; 
<br>&gt; 

--
<br>&gt; 

This message has been scanned for viruses and
<br>&gt; 

dangerous content by MailScanner, and is
<br>&gt; 

believed to be clean.
<br>&gt; 
<br>&gt; 

_______________________________________________
<br>&gt; 

mapserver-users mailing list
<br>&gt; 

<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>
<br>&gt; 

<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
<br>&gt; 

</blockquote>
<br>&gt; 
<br></div></div>&gt; -- 

<br><div class="im">&gt; This message has been scanned for viruses 
and

<br>&gt; dangerous content 
by
<a href="http://www.mailscanner.info/" target="_blank"><b>MailScanner</b></a>, and 
is

<br>&gt; believed to be 
clean.

<br>
<br>
<br></div>-- 

<br><div class="im">
Open WebMail Project (<a href="http://openwebmail.org/" target="_blank">http://openwebmail.org</a>) 

<br>

<br>
</div></font>
</div><div><div></div><div class="h5">
<br>-- 
<br>This message has been scanned for viruses and
<br>dangerous content by
<a href="http://www.mailscanner.info/" target="_blank"><b>MailScanner</b></a>, and is
<br>believed to be clean.


</div></div></blockquote></div><br>