This event is triggered when a feature has been created.
example
// Each time a feature is created, this method is processed
JMap.Event.Feature.on.creation(
"custom-feature-creation",
params =>console.info(`For layer id="${params.layerId}", feature id="${params.featureId}" geometry has been created`)
)
Parameters
listenerId: string
Your listener id (must be unique for all user events)
This event is triggered when a feature has been deleted.
example
// Each time layer features are deleted, this method is processed
JMap.Event.Feature.on.deletion(
"custom-feature-deletion",
params =>console.info(`For layer id="${params.layerId}", deleted feature ids: ${params.deletedFeatures.map(f => f.id).join(", ")}`)
)
Parameters
listenerId: string
Your listener id (must be unique for all user events)
This event is triggered when a feature geometry has been changed.
example
// Each time a layer feature geometry has been changed, this method is processed
JMap.Event.Feature.on.geometryChanged(
"custom-feature-geometry-changed",
params =>console.info(
`For layer id="${params.layerId}", feature id="${params.updatedFeature.id}" geometry has been changed`,
params.updatedFeature
)
)
Parameters
listenerId: string
Your listener id (must be unique for all user events)
JMap.Event.Feature.on
Here you have all available feature events on which you can attach a listener.