September 15, 2010

I’ve been working to migrate the RADEMapguide 2010 code to work with 2011. In 2010, I only implemented support for the DWF and Ajax viewer. With the release of 2011, the new ability to include mapping data from Google, Yahoo and Microsoft in Fusion are huge so I opted to migrate everything over. The DWF viewer is already deprecated and I suspect the Ajax viewer will likely go next.

With 2010 and the Ajax viewer we had to get the selection from the MapFrame using the GetSelectionXML() method. Then we had to encode, and send this value up to the web tier for processing. I had all kinds of business logic that I was hoping to re-use with a minimal amount of modifications so I was trying to find how to recreate this functionality with Fusion. I figured out how the selections worked on the client side using the new callback system and was getting the selection object – but I could not find anything definitively saying “There is no selection XML on the client side anymore”. So…

There is no selection XML on the client side any more when using Fusion.

There I said it. It makes sense too – first getting this large XML string and sending it up was a pain in the ass. Encoding it, creating a form to submit it, etc. I should have clued into this sooner – Fusion is updating the selection on the server side as needed.

So in order to minimally impact the existing code – I added an additional check to some of the calls that looks a little something like this: