Hi,
My Previous post describes how to create selection on map dynamic by drawing
geometries …
If you need selection only once on page load then you should call SetSelection
javasctipt function on page load … or set selection in your ASP.NET code ...
Call it In Javascript:
SetSelectionUrl is path to your setselection.aspx located in mapviewerajax
folder …
function SetSelection(selText, requery) {
var reqParams = "SESSION=" + sessionId + "&MAPNAME=" +
encodeURIComponent(mapName) + "&SEQ=" + Math.random() + "&SELECTION=" +
encodeURIComponent(selText) + "&QUERYINFO=" + (requery ? "1" : "0");
reqHandler = GetRequestHandler();
reqHandler.open("POST", SetSelectionUrl, false);
reqHandler.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
reqHandler.send(reqParams);
if (requery)
return reqHandler.responseXML;
}
Or first set in ASP.NET:
Use code from setselection.aspx …
Than it will just work if you use behavior: 5 (you don’t have to pass
selectionxml as parameter) …
Greetings from Slovenia …
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/mapguide-OpenLayers-with-selection-tp5095063p5095496.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