hi all, I use mapguide open source 2.0.2 on Windows XP and IIS I have to select an object after the extraction, but I tried in three different alternative ways but doesn't work I use the following code. Anyone can help me? My work is stopped! thanks Alba
//************************************ var mapWidgetId = 'Map'; var Fusion = window.top.Fusion; var mapWidget = Fusion.getWidgetById(mapWidgetId); function SelectFeature(){ .............................. ............................. selectionXml = reqHandler.responseText; sel=TrimString(selectionXml); //-- first mode----------- var map = GetParent().Fusion.getMapByName(mapName); map.setSelection(sel, true, true); //---------------- //-- second mode---------- GetParent().SetSelectionXML(sel); //---------------- //-- third mode---------- mapWidget.setSelection(sel, z); //---------------- alert(mapWidget.hasSelection()); } function SetSelectionXML(selectionXml) { var Fusion = window.top.Fusion; var mapWidget = Fusion.getWidgetById('Map'); if (mapWidget && mapWidget.isMapLoaded()) { mapWidget.setSelection(selectionXml, true, true); } } function GetParent() { if(popup) { return opener; } else { return parent.parent; } } function TrimString(responseString) { responseString = responseString.replace( /^\s+/g, "" ); return responseString.replace( /\s+$/g, "" ); } //************************************************* -- View this message in context: http://n2.nabble.com/Select-an-object-in-MapGuide-2-0-2-tp3661625p3661625.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users