Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Event

JMap.Event

From this section you can manage your own event listeners reacting to JMap NG Core library events.

For all your listener you need provide a listener id. We introduced this notion of listener ids in order to be able to know what's the problem if something goes wrong in a listener.

Like that we are able to identify more easily the problem in the javascript console.

Listener ids have to be unique for the namespace, regardless to the type of event you register your listener.

By example, for all Layer events, you can register only one listener named "my-custom-listener"".

A good practice could be prefixing all your listener ids. For example if you work for the city of Montreal they could all start with "mtm-"".

Listeners can be deactivated and reactivated.

Deactivating a listener keep it in the JMap NG Core library, but ignore it when an event is emitted.

Index