QueryByRect problem in PHPmapscript

Steve Lime Steve.Lime at DNR.STATE.MN.US
Thu Nov 1 08:08:07 PDT 2007


Keeping the SWIG and PHP versions of MapScript sync'd has always been a challenge so it's possible
it didn't get added until 4.10.1 or later. At 4.10.0 you should have getShape which works the same
as getFeature (they wrap the same C code) but with getShape you must pass a tile index in addition
to the shape index. Usually it's just:

  $shape = $layer->getShape(-1, $shpindex);

Steve

>>> Bill Thoen <bthoen at gisnet.com> 10/31/07 5:48 PM >>>
getFeature doesn't seem to be defined in version 4.10.0. When I try to 
use it I get an error message that says it's undefined. Is this a recent 
change, or should it be there?

Steve Lime wrote:
> getFeature is the method to use to retreive a feature from a layer. It is a layer method and
> exists for both PHP and the SWIG-based bindings. It replaces the getShape method which
> I created with stupid parameter orderings that made it impossible to not pass a tile index.
>
> I see that it is missing from the PHP/MapScript docs but is present in the Swig docs. I'll file
> a ticket on that one... There's already a note at the bottom of the page but it hasn't been
> noticed.
>   



More information about the MapServer-users mailing list