Keyboard control
Control component adding functionality to parent Map component.
This component adds possibility to interact with map through keyboard. Working keys are:
- arrows - moving map in arrow key direction
- keys - zooming in or out
How to use it
import { Map, KeyboarControl } from 'mapy-cz-react';
<Map>
<KeyboarControl />
</Map>;
Props
Name | Type | Default | Description | Required |
---|---|---|---|---|
pan | bool | true | Enable keyboard pan control - arrow keys | ❌ |
zoom | bool | true | Enable keyboard zoom control - + - keys | ❌ |
Example
Live Editor
Result
Loading...