[mapguide-users] Fusion Event Listeners Called Twice

ChrisGo cgountanis at mpowerinnovations.com
Mon Nov 11 08:03:31 PST 2013


I wanted to make sure it was nothing to do with my code so I added some basic
code to the bottom of the Fusion.js main code. Can someone just take 2
minutes and test this and tell me why the API is freaking out doing double
calls? This is a huge issue for us in trying to use this framework.

I am still getting double calls on all selections with the same data.
(http://i.imgur.com/k29NnqZ.png)


var ObjectMap;
Fusion.registerForEvent(Fusion.Event.FUSION_INITIALIZED, onInitialized);

function onInitialized() {
    console.log("onInitialized");
    ObjectMap = Fusion.getWidgetById('Map');
    ObjectMap.registerForEvent(Fusion.Event.MAP_SELECTION_ON,
LocalSelectionOnEvent);
}

function LocalSelectionOnEvent() {
    console.log("LocalSelectionOnEvent");
    ObjectMap.getSelection(outputSelection);
}

function outputSelection(oSelection) {
    console.log("outputSelection(oSelection)");
}


Example of placement: http://i.imgur.com/JIlcLZp.png


What can I do to help?





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Fusion-Event-Listeners-Called-Twice-tp5087525p5088561.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list