Skip to main content

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​

NameTypeDefaultDescriptionRequired
panbooltrueEnable keyboard pan control - arrow keys❌
zoombooltrueEnable keyboard zoom control - + - keys❌

Example​

Live Editor
Result
Loading...