[mapguide-users] mapguide OpenLayers with selection

Srecko Lipovsek srecko.lipovsek at kaliopa.si
Mon Dec 23 16:33:03 PST 2013


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20131223/cd311831/attachment.html>


More information about the mapguide-users mailing list