platform
platform copied to clipboard
Map support for configurable interactions
Description
The Map component should provide an API for configuring interactions with the viewport (for example drag to pan, pinch to zoom), and should allow enabling or disabling interactions.
Use cases
As a developer I want to be able to configure map interactions So that I can replace the default set of interactions to a custom set, And enable or disable interactions in reaction to certain events in my application.
Acceptance criteria
- [ ] All default OpenLayers viewport interactions have a Java counterpart
- [ ]
DragRotate - [ ]
DoubleClickZoom - [ ]
DragPan - [ ]
PinchRotate - [ ]
PinchZoom - [ ]
KeyboardPan - [ ]
KeyboardZoom - [ ]
MouseWheelZoom - [ ]
DragZoom
- [ ]
- [ ] Flow Map component is initialized by default with the same set of default interactions that OpenLayers uses (docs, source), and interactions are defined in the same order
- [ ] All interactions can be enabled or disabled using the
activeproperty - [ ] The following interactions should implement the
onFocusOnlyproperty, which controls whether the element must receive focus before the interaction can be used, and should be initialized with a value offalseby default to match the current defaults in the Vaadin Map web component: https://github.com/vaadin/web-components/blob/c88dd80fc48d523eea2afb66e4f481e0d8500c38/packages/map/src/vaadin-map.js#L406-L407- [ ]
DragPan - [ ]
MouseWheelZoom
- [ ]
- [ ] All other interaction properties should be initialized with the same defaults that OpenLayers uses (see source), for example
DragPanshould be initialized with the samekineticproperty value. These defaults do not need to be set from the Java side, and can be hard-coded in the client-side synchronization logic. - [ ] The component has an API for adding interactions
- [ ] The component has an API for removing interactions
- [ ] The component has an API for removing all interactions
- [ ] The component has an API for replacing all interactions with a custom set
- [ ] The component has an API for retrieving an interaction by its type, for example
public <T extends Interaction> getInteraction(Class<T> interactionClass)- [ ] returns the first applicable interaction, or null if no result can be found
General criteria
- [ ] APIs reviewed
- [ ] Performance
- [ ] UX/DX tests in Alpha
- [ ] Documentation:
- [ ] How to test?
- [ ] Limitations:
Thanks for using Vaadin! We appreciate your help and we’ll take care of this as soon as possible.