Mg 2.0.2: selection of n objects

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Mg 2.0.2: selection of n objects

alba
Hi all
I extract n objects and I would to selection them
with mapguide 1.2 all ok, but with mapguide 2.0.2 it don't function
Can anybody help me?


var mapWidgetId = 'Map';
var Fusion = window.top.Fusion;
var mapWidget = Fusion.getWidgetById(mapWidgetId);


function ZoomTutti(piano)
{
var resultSelect = document.getElementById("resultSelect");
var n=resultSelect.length;
var selectionXml="";
for(var k=0; k<n; k++){
  reqParams = "COMMAND=GETSELECTIONXML";
  reqParams += "&SESSION=" + encodeURIComponent(session);
  reqParams += "&MAPNAME=" + encodeURIComponent(mapName);
  reqParams += "&LAYERNAME=" + encodeURIComponent(piano);
  reqParams += "&IDLIST=" + results[resultSelect[k].value].idList.toJSONString();
  if (msie)
    reqHandler = new ActiveXObject("Microsoft.XMLHTTP");
    else
     reqHandler = new XMLHttpRequest();
     reqHandler.open("POST", "querycontroller.php", false);
     reqHandler.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
     reqHandler.send(reqParams);
     selectionXml += reqHandler.responseText;

}
  sel=TrimString(selectionXml);
 
  //parent.parent.mapFrame.SetSelectionXML(TrimString(selectionXml));//mg 1.2
  //parent.parent.ExecuteMapAction(10); //mg 1.2

  map.setSelection(sel, true);
  mapWidget.Refresh();
}


bye bye Alba