[mapguide-users] How to get selection with fusion??
lzzgeo
lzzgeo at yahoo.cn
Wed May 12 23:24:46 EDT 2010
I am using MGOS 2.1 with fusion, I just want to get the information about
selction through the map.
there are some source code in the following.
Fusion.registerForEvent(Fusion.Event.FUSION_INITIALIZED,
fusionInitialized);
Fusion.registerForEvent(Fusion.Event.FUSION_ERROR, fusionError);
Fusion.initialize();
var themap;
var fusionInitialized = function() {
$('AppContainer').resize({forceResize: true});
themap = Fusion.getWidgetById('Map');
themap.registerForEvent(Fusion.Event.MAP_SELECTION_ON, selectionOn);
}
var selectionOn = function()
{
themap.getSelection(displaySelection);
}
function displaySelection(res){
var nums =res.getNumLayers();
alert(nums);
}
but, I get the message "getNumLayers() is not defined". why??
Is there something wrong?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-get-selection-with-fusion-tp5044598p5044598.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list