<div>Hi Tamas,</div>
<div>&nbsp;</div>
<div>thank you very much for the important hint to solve my problem, I thought the value 1 means MS_SUCCESS, now I've changed the condition. Also this time I've changed the query rectangle to map unit -- meters. All these changes help me to get the shape objects successfully. Thanks again.
</div>
<div>&nbsp;</div>
<div>But I still have one question:</div>
<div>&nbsp;</div>
<div>it seems that the the query by rectangle returns more than one shape object, should I loop through the query results and store the shape objects in an shapeObj type array?</div>
<div>&nbsp;</div>
<div>BTW: I create an Inline Fearure layer for the shape object.</div>
<div>&nbsp;</div>
<div>thanks a lot</div>
<div>&nbsp;</div>
<div>zhonghai<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 8/14/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>&gt;<br>&gt; the intQuery value is 1, means that the query is successful, but the intOpen
<br>&gt; is always 0, seems that the layer can not be opened for getFeature function.<br>&gt; The layer queried is a memory layer created with a function on the fly, I<br>&gt; don't know if this is a problem for the getFeature function.
<br>&gt;<br><br>Both of the functions should return MS_RETURN_VALUE.MS_SUCCESS (value<br>0) on the successful completion so i guess querybyrect was the<br>problem.<br><br>&gt; the scenario of this function in my application is:
<br>&gt;<br>&gt; a new layer is created on the fly with the data from the Oracle Spatial<br>&gt; database when the first user request comes in, and this layer will be always<br>&gt; the same through out a user session, so I am trying to get the shape objects
<br>&gt; from the layer and store them into a data table, so that I can create a new<br>&gt; layer with these shape objects without connection with the oracle spatial<br>&gt; database any more, and this may improve the mapserver performance, since I
<br>&gt; do not need to access the database anymore every time when a new map image<br>&gt; is needed to be rendered.<br>&gt;<br>&gt; and the shape object in the queried layer may be a point or a polygon.<br>&gt;<br>&gt; BTW: the map extent unit of the map object is meter, but the queried layer
<br>&gt; has decimal degree (WGS84 layer) as map unit, but the values of the query<br>&gt; rectangle is also in degree unit, I don't know if this will cause the<br>&gt; getFeature problem. Just for info.<br>&gt;<br>The query rect should be in the same projection as the map. The rect
<br>will be transformed into the layer projection internally.<br>It would be useful to describe how the layer is created or making a<br>sample project for the expected operation.<br><br>Best Regards,<br><br>Tamas Szekeres
<br></blockquote></div><br>