Hi, there.<br><br>I'm experiencing some troubles with the new release of MapServer. You may take a quick look at the excerpt of code bellow:<br><br><br><div style="margin-left: 40px;">if (ret == (int)MS_RETURN_VALUE.MS_SUCCESS)<br>
{<br> resultCacheObj results = layer.getResults();<br></div><br><div style="margin-left: 40px;"> for (int i = 0; i < results.numresults; i++)<br> {<br> int shpidx = results.getResult(i).shapeindex;<br>
<br>
layer.open();<br> shapeObj shape = layer.getFeature(shpidx, -1);<br> layer.close();<br> ...<br></div><br>But I got the following while debugging that (Visual Studio IDE):<br><br><div style="margin-left: 40px;">
<span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">results.</span>getResult(0)</span><br>{OSGeo.MapServer.resultCacheMemberObj}<br> classindex: 0<br> <span style="color: rgb(255, 0, 0);">shapeindex: 1</span><br>
tileindex: -1<br>results.<span style="color: rgb(255, 0, 0);">getResult(1)</span><br>{OSGeo.MapServer.resultCacheMemberObj}<br> classindex: 1<br> <span style="color: rgb(255, 0, 0);">shapeindex: 1</span><br> tileindex: -1<br>
results.<span style="color: rgb(255, 0, 0);">getResult(2)</span><br>{OSGeo.MapServer.resultCacheMemberObj}<br> classindex: 0<br> <span style="color: rgb(255, 0, 0);">shapeindex: 1</span><br> tileindex: -1<br></div>
<br>The new version of MapServer auto-increments the index property of
a feature as soon as it's added to a layer (unlike older releases). I
know there's a couple of shape.setValue() and shape.getValue()
functions one may use to store and recover values, but I'm not able to
get the actual index value (unlike this, my classindex values are
correct).<br>
<br>am I missing or doing something wrong? It used to work fine before
the last release (namely, the auto-incremented shape.index property).<br><br>I've posted a little bit more detailed investigations of the above <a href="http://cubicpurunga.blogspot.com/2009/07/shapeobjindex-round-two-fight.html" target="_blank">here</a> and <a href="http://cubicpurunga.blogspot.com/2009/07/shapeobjindex-in-ms-5x.html" target="_blank">here</a> in my blog.<br>
<br>I'd really appreciate if anyone could spend some time to help me with that. If you need more details, just let me know.<br><br>Thank you very much. Best regards,<br><font color="#888888"><br style="color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0);">Vagner Sousa</span><br style="color: rgb(0, 0, 0);"><a style="color: rgb(0, 0, 0);" href="http://www.agx.com.br/" target="_blank">AGX Tecnologia</a></font>