Skip to main content

Mouse control

Control component adding functionality to parent Map component.

This component adds possibility to interact with map through mouse or touch. By default all three types of interaction are enabled.

How to use it

import { Map, MouseControl } from 'mapy-cz-react';

<Map>
<MouseControl />
</Map>;

Props

NameTypeDefaultDescriptionRequired
panbooltrueEnable mouse pan control with drag
wheelbooltrueEnable mouse wheel control of zoom
zoombooltrueEnable mouse zoom control though double click or tap

Example

Live Editor
Result
Loading...