[mapguide-users] Search Widget Highlights but layer is still off

GordonL gordon.luckett at arrowgeomatics.com
Fri Sep 25 08:50:48 PDT 2015

Hi All,
it always bugged me that the Search widget highlights the "off" layer after
a search.  

A code tweak to ensure the layer is turned on and all parent Folders it
might be in.

In the /fusion/widgets/search/ folder, the Search.php around line 84:
/if($layer->GetName() == $layerName)

/if($layer->GetName() == $layerName)
				$currentGroup = $layer->GetGroup();
				while ($currentGroup)
					$currentGroup = $currentGroup->GetGroup();

Now when you use the search widget, the layer turns on and all the groups it
might be in turn on too.

Next Fix:  Since the MapMenu widget can put a map in that does not have the
Search widgets layer definition, you will get an error.  
So, since the widget knows the path of the layer, why not add it to the top
of the legend in the session so the Search Widget works without erroring
out... I'll work on that soon.

View this message in context: http://osgeo-org.1560.x6.nabble.com/Search-Widget-Highlights-but-layer-is-still-off-tp5226168.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

More information about the mapguide-users mailing list