hi Bernel Brian, You excuse me for this email, but I have the problem to select and to selection objects on map
I use mgos 2.0.1 with IIS and fusion I insert in fusion/MapGuide/MapGuideViewerApi.js function GetParent(){ if (popup) { return opener; } else if (parent.Fusion) { return parent; } else if (parent.parent.Fusion) { return parent.parent; } return null; } In my procedure I insert <script language="javascript" src="../../fusion/MapGuide/MapGuideViewerApi.js"></script> ... function Selezione_oggetto(){ var resultSelect = document.getElementById("resultSelect"); var k=0; var valoreCercato=dati_ord[resultSelect.value]; while(valoreCercato!=dati[k]){ k=k+1; } //alert(k); reqParams = "COMMAND=GETSELECTIONXML"; reqParams += "&SESSION=" + encodeURIComponent(session); reqParams += "&MAPNAME=" + encodeURIComponent(mapName); reqParams += "&LAYERNAME=" + encodeURIComponent("Catastali"); reqParams += "&IDLIST=" + results[k].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; alert(mapName); // ?????????? problem---------------------- //parent.parent.mapFrame.SetSelectionXML(TrimString(selectionXml));// old for mg 1.2 var map = GetParent().Fusion.getMapByName(mapName); // ?????????? GetParent().SetSelectionXML(selectionXml);// ?????????? } function Zoom_oggetto() {//alert("ZoomToFeature"); var resultSelect = document.getElementById("resultSelect"); var scaleInput = document.getElementById("scaleInput"); scale = scaleInput.value; scale = (scale == 0) ? 10000 : scale; scale = scale*1.0; var k=0; var valoreCercato=dati_ord[resultSelect.value]; while(valoreCercato!=dati[k]){ k=k+1; } feature = results[k]; // ?????????? problem---------------------- parent.parent.mapFrame.ZoomToView(feature.centerX, feature.centerY, scale, true);// ?????????? } Can you help me, please? Thank Alba -- View this message in context: http://n2.nabble.com/how-to-set-selected-feature-at-client-in-fusion----tp1814359p2669423.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