fusion selection events

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

fusion selection events

Jackie Ng-2
Hi All,

In fusion, how can I listen for a selection on the map? I think it's something to do with Fusion.registerForEvent(), but I don't know what event to listen for.

- Jackie
Reply | Threaded
Open this post in threaded view
|

RE: fusion selection events

Jason Fournier
Hi Jackie,

Both of these events are valid:

Fusion.Event.MAP_SELECTION_ON
Fusion.Event.MAP_SELECTION_OFF

The selection events are tied to the MAP so the following would work ...

In template context:

Fusion.getMapById('Map').registerForEvent(Fusion.Event.MAP_SELECTION_ON,
callback);
Fusion.getMapById('Map').registerForEvent(Fusion.Event.MAP_SELECTION_OFF,
callback);

(where 'Map' is the div id containing the map)

In widget context:

this.getMap().registerForEvent(Fusion.Event.<EVENT>,
this.<CALLBACK>.bind(this));

Regards,
Jason




-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jackie Ng
Sent: Tuesday, March 11, 2008 9:38 PM
To: [hidden email]
Subject: [mapguide-users] fusion selection events


Hi All,

In fusion, how can I listen for a selection on the map? I think it's
something to do with Fusion.registerForEvent(), but I don't know what event
to listen for.

- Jackie
--
View this message in context:
http://www.nabble.com/fusion-selection-events-tp15996245s16610p15996245.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

RE: fusion selection events

alba
Hi Jason

I did not understand that you have write
in particular, how to define the callback function?

I read the text of site http://trac.osgeo.org/fusion/wiki/MapGuideTutorial#WorkingwithSelections
it is similar to what you say
but in the function 'displaySelection' the variable 'selection' is unclear

thank for your help
Alba