<div>Hi Tamas,</div>
<div>&nbsp;</div>
<div>thank you very much&nbsp;for your solution, this works well.</div>
<div>&nbsp;</div>
<div>Cheers</div>
<div>&nbsp;</div>
<div>Zhonghai<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 8/22/06, <b class="gmail_sendername">Tamas Szekeres</b> &lt;<a href="mailto:szekerest@gmail.com">szekerest@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Zhonghai,<br><br>I suggest the following steps to be implemented.<br><br>1. Obtain the bounding rectangle of the resulted shape (
shapeObj.bounds)<br>2. Transform the rectangle from the layer coordinates to the map<br>coordinates (shapeObj.project)<br>3. Apply a linear transformation to transform the rectangangle into<br>the image coordinates.<br>4. 
mapObj.zoomRectangle<br><br>Tamas<br><br><br>2006/8/22, Zhonghai Wang &lt;<a href="mailto:zhonghaiw@gmail.com">zhonghaiw@gmail.com</a>&gt;:<br>&gt;<br>&gt; Hi guys,<br>&gt;<br>&gt; I have one case here to select a polygon per mouse click, I just wonder if
<br>&gt; someone has ever done something like this. The Situation is:<br>&gt;<br>&gt; I have one layer, which contains several polygons, for example, a map layer<br>&gt; contains all the states of a country, if the user click one of the polygon
<br>&gt; region, the map will be zoomed to this polygon region with a proper map<br>&gt; scale, it means that this region will be highlighted and be zoomed to the<br>&gt; whole map window.<br>&gt;<br>&gt; Is it possible?<br>
&gt;<br>&gt; I've tried with queryByPoint, but it's not possible to set the buffer, since<br>&gt; the size of each polygon region differs.<br>&gt;<br>&gt; thanks for any information.<br>&gt;<br>&gt;<br>&gt; Zhonghai<br></blockquote>
</div><br>