Options
All
  • Public
  • Public/Protected
  • All
Menu

JMap.Application.Event.MapContext.on

Here you have all JMap NG App available map context events on which you can attach a listener.

Index

Functions

Functions

afterApply

  • afterApply(listenerId: string, fn: function): void
  • JMap.Application.Event.MapContext.on.afterApply

    This event is triggered after:

    • The NG Core event JMap.Event.MapContext.on.afterApply has been triggered
    • NG App map-context related things has been applied or processed

    You can access extension's data from this event, see example below.

    example
    
    // Triggered after a map-context is applied
    JMap.Application.Event.MapContext.on.afterApply("my-after-apply-listener", params => {
      console.info(`After apply map context id="${params.context.title}"`, params.context)
      const isExtensionDataSet = params.isExtensionDataSetById("my-extension")
      if (!isExtensionDataSet) {
        console.info("No extension data in map-context")
      } else {
        console.info("Extension map context data = ", params.getExtensionDataById("my-extension"))
      }
    })

    Parameters

    Returns void