PHP Highlight list of Parcels Passed In
Abe Gillespie
agillesp at VT.EDU
Sat Jan 22 16:04:32 PST 2005
For the red you need to setup the QUERYMAP. For the PHP it will be
something like this:
$target = use_appropriate_string_func_to_conver_semi_to_pipe($parcels);
// $target should look like "1|2|3|4" ... where the numbers are the IDs.
$layer = $map->getLayerByName("parcels");
$layer->queryByAttributes("parcel_id_field", "/".$target."/",
MS_MULTIPLE);
Also, don't forget to add the TEMPLATE "x" tag in your LAYER definition.
I'm not a RegEx expert, so someone please put me in check if I'm
leading Steven astray.
-Abe
On Jan 22, 2005, at 6:37 PM, Steve Lehr wrote:
> I'm trying to write some PHP that I can send extents and list of
> parcels to
> get it to highlight the parcels.
>
> I'd like to highlight all the found parcels in RED.
>
> My php gets a variable by post called parcels and contains at this
> time a
> semi colon delimited list of ids in the attribute column QPID of the
> parcels.dbf.
>
> LAYER
> NAME "selected_parcels"
> DATA parcels
> STATUS DEFAULT
> TYPE POLYGON
> CLASSITEM QPID
> CLASS
> EXPRESSION "/%parcels%/"
> COLOR 255 0 0
> END
> END
>
>
> I've got my extents. I've got the list of parcels. Now I want to
> highlight
> the list of parcels with something like the below. But I have to do
> something in php to take that ; delimited list and the turn on all the
> matching attributes. (I belive its a QUERYMAP with MULTIPLE_SELECT)
> but I'm
> having trouble getting my brain around what I need to code - might
> someone
> have a sample.
>
> Thanks
>
> Steven Lehr
> Assistant Professor
> Freshmen Program
> College of Engineering
> Embry-Riddle Aeronautical University (LB159)
> 600 S. Clyde Morris Blvd.
> Daytona Beach, FL 32114-3900
> 386-226-7740
>
More information about the MapServer-users
mailing list