Skip to content

Add onMapSingleClick & onMapMove as optional props on RplMap #1638

@bgilhome-now

Description

@bgilhome-now

Describe the feature

For customised maps (e.g. EPA), there's use cases for being able to override the default event handlers onMapSingleClick & onMapMove (e.g. to customise map centering, popup toggling or cluster handling). Currently activatePin is exposed but not overridable.

Motivation

EPA wished to disable map centering on pin click as the animation/move was visually distracting.

Proposal

Add the event handlers as optional properties on the component, with defaults set to the current handlers used.

Benefits

Easier implementation of custom functionality for sites requiring advanced map components, e.g. EPA.

Drawbacks

May need DGS review of any custom implementations in order to ensure conformance with any existing style/a11y guidelines or UX patterns.

Adoption strategy

No breaking changes, existing behaviour would be preserved via prop defaults.

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be created outside of Ripple-framework as a layer?

Final checks

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions