[mapguide-users] Set Selection in Fusion

Mark Pendergraft markp at Meadgilman.com
Sun Dec 21 19:50:38 EST 2008


I have created a Search widget for Fusion (MGOS 2.02) and I can't get
the javascript code to set the selection and zoom to it.  I've tried
using the functions provided in MapGuide.js and MapGuideViewerApi.js but
neither work.  I have been focusing on the MapGuideViewerApi.js function
'SetSelectionXML()' which returns no errors but does not set the
selection or zoom.  The map does nothing, and I remain confused.

 

My website is setup with a search box widget, when the user presses
enter it sends the search text to a web service which queries the map
and returns the selection xml.  The selection XML is then passed to the
SetSelectionXML function, and I have also tried the setSelection()
function.  Neither do anything at all, yet return no errors.

 

Any help would be appreciated.  I suspect I might have to save my
selection on the server and then find the coordinates for the geometry
and then pass that back and zoom to it, but that seems to completely
defeat the purpose of the two javascript files mentioned above.

 

Thanks for the help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20081221/20fbfbbf/attachment.html


More information about the mapguide-users mailing list