So say I add features to the selection set then convert it into a feature reader ? firstly is this possible...?
And another little feature I've been working on is being able to select all features found when the search finishes and zoom the selection..... I've been trying to accomplish this by doing the following to the search.aspx steps are as follows. 1.create another MgFeatureReader with all features. 2.Convert to selection. 3.convert to string. 4.add XML Selection to vals so it can be read by the initdocument() function. 5.add new String xmlSel = %s; to end of declares 6.add ZoomSelection(); to InitDocument() 7.add functoin ZoomSelection().... the xml seems to come accross correctly however... i'm having trouble now getting it to convert back to a string ready to be used in the SetSelectionXML how do I get it to come across correctly? <?xml version="1.0" encoding="UTF-8"?><FeatureSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FeatureSet-1.0.0.xsd"> <Layer id="f5e21168-ffff-ffff-8000-005056853938"> <Class id="Default:cadFREE"> <ID>IwAAAA==</ID> <ID>KQAAAA==</ID> <ID>MQAAAA==</ID> </Class> </Layer></FeatureSet> //search.aspx MgFeatureReader features1 = featureSrvc.SelectFeatures(srcId, featureClassName, opts); MgSelection mySel = new MgSelection(map); mySel.AddFeatures(layer, features1, 0); String xmlSel = EscapeForHtml(mySel.ToXml()); //vals to be sent to search.templ String[] vals = { colCount.ToString(NumberFormatInfo.InvariantInfo), target.ToString(NumberFormatInfo.InvariantInfo), popup.ToString(NumberFormatInfo.InvariantInfo), xmlSel }; //search.templ String xmlSel = %s; function InitDocument() { document.onmousedown = OnMouseDown; ZoomSelection(); } function ZoomSelection() { GetParent().SetSelectionXML(xmlSel); } Dave Wilson-3 wrote: > > I think you are going to have to write code to loop through a list of > layers selected by the user and query each to get results building a query > against each independently. This would be a combination of the Select > Within code UI and the Address Search to provide the input and select the > layers. > > Dave > Dave Wilson-3 wrote: > > I think you are going to have to write code to loop through a list of > layers selected by the user and query each to get results building a query > against each independently. This would be a combination of the Select > Within code UI and the Address Search to provide the input and select the > layers. > > Dave > > -- View this message in context: http://www.nabble.com/Search-accross-multiple-layers-tp20314877p20333818.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
