alpha transparency and querymap
Jim White
jbw2003 at EARTHLINK.NET
Mon Dec 18 20:25:11 PST 2006
Steve,
I have used the first solution, and it does work using $map->draw() and
in rgba mode. Here is my code that uses filter.
if (isset($key_counties) && !empty($key_counties)){
$filter = "(ogc_fid = {$key_counties[0]})";
for($i=1; $i<count($key_counties); $i++){
$filter .= " or (ogc_fid = {$key_counties[$i]})";
}
$this_layer = $map->getLayerByName('counties_q');
$this_layer->setFilter($filter);
$this_layer->set('status', MS_ON);
}
Thanks a lot for the assistance.
Jim
Steve Lime wrote:
> How many search results are you seeing on average? There are a couple
> of
> work arounds:
>
> 1 - one would be to use the result set to craft a filter for the
> layer(s) in question
> so that only those features that match the filter get drawn
>
> 2 - another would be to add the features to the layer or a copy of the
> layer (e.g.
> use inline features instead of the datasource)
>
> In both cases you'd use $map->draw() instead of drawQuery() and would
> avoid
> the alpha blending problem. Option one would work nicely if you have
> relatively
> few (less than 20) features, while the other would work well in any
> case.
>
> Steve
>
>
--
Jim White
Biodiversity and Spatial Information Center
North Carolina State University
http://www.basic.ncsu.edu/
More information about the MapServer-users
mailing list