what the highlight does is create dynamically a new layer and add all 
the features with the id's from the queried layer to this new layer. For 
polygon layers it uses a LINE highlight layer, but you can easily change 
this in map.php in function 'pmap_addResultLayer' by uncommenting

##$newResLayer->set("type", $qlayType);

and commenting out the 4 lines before.

This dynamic highlight layer has to be created/added all the time the 
map is created/refreshed.


So after adding the resultlayers to the session you just need to refresh 
the map. The map creation in map.php looks if it finds the session var 
resultlayers (or the passed var via GET) and then adds these features in 
a new dynamic layer to the map. This is done for all further map 
creations until the session var is unset.

just use a javascript function to initiate the map refresh like

function refreshMap() {
     showloading();
     var mapurl = map.phtml?'+SID+'&zoom_type=zoompoint';
     parent.mapFrame.location = mapurl;
}

to remove the resululayers via javascript modify the 2nd line to

var mapurl = 'map.phtml?'+SID+'&zoom_type=zoompoint&resultlayer=remove';

armin


Gail Long wrote:
> Armin,
> 
> Thank you for the quick response.  Please forgive me but I don't 
> entirely understand what to do.
> 
> I've cleared the resultlayers session variable and added the new values 
> in what I believe is the correct structure:
> 
> array(1) { ["adapar"]=>  array(31) { [991740]=>  int(-1) [991511]=>  
> int(-1) [991538]=>  int(-1) [991549]=>  int(-1) [991550]=>  int(-1) 
> [991554]=>  int(-1) [991564]=>  int(-1) [991565]=>  int(-1) [991571]=>  
> int(-1) [991573]=>  int(-1) [991574]=>  int(-1) [991577]=>  int(-1) 
> [991587]=>  int(-1) [991603]=>  int(-1) [991617]=>  int(-1) [991618]=>  
> int(-1) [991619]=>  int(-1) [991622]=>  int(-1) [991635]=>  int(-1) 
> [991639]=>  int(-1) [991640]=>  int(-1) [991655]=>  int(-1) [991656]=>  
> int(-1) [991657]=>  int(-1) [991704]=>  int(-1) [991706]=>  int(-1) 
> [991707]=>  int(-1) [991716]=>  int(-1) [991735]=>  int(-1) [991768]=>  
> int(-1) [991775]=>  int(-1) } }
> 
> These are the oids from the resultset and all are correct.  The output 
> above is a var_dump of $_SESSION['resultlayers'];
> 
> I suppose what I need to know more specifically is do I use javascript 
> to contruct a call to map.phtml for the mapframe?  And if so, what how 
> would I construct the url string for my results to call the highlighting 
> functions?
> 
> I don't understand how the entire query/highlight code chain works.  
> Your programming skills are definately above mine.  I've tried a few 
> variations of the url strings that I've found in mapserver.js.
> 
> Because I'm not using query,squery, or map.php to run a query perhaps I 
> would instantiate map.php and enter at a different point than from the url?
> 

Reply via email to