Monday, July 05, 2010

MapGuide: Using Fusion with Selection Events (aka reports)

Sometimes, you just want to do simple things and it seems frustrating. I was
frustrated and I solved it, here's my contribution back!

Having come into the geo-spatial world with Autodesk MapGuide in the 6.x series (aka classic),
the world was a lot simpler. The MapGuide Open Source Classic (or
Basic Viewer) made things easy to make a url launch from a selection. Fusion is a
little different, here's some pointers :)

MapGuide Fusion (aka flexible layouts) is a bit more technical to use, but is also
far more powerful, being based on OpenLayers.

If you want to launch a report, or popup window form a selection you need to
register an event to handle the selection.

The answer is pretty simple, as this mailing list post explains.

It's all you need to know to get started and hacking.

If it doesn't work, flip into Firefox, with Firebug enabled and dump
the sel inside the function selectionCallback(sel) and add a line to; and see what your dealing with!

Learning by trying is the best way to learn

MapGuide Central for a good starting point for playhing with MapGuide, Openlayers and Fusion.