Skip to main content

Sync control

Control component adding functionality to parent Map component.

This component adds behaviour - map stretches to whole width and height of parent, and adjusts its dimenstions based on parents dimension changes.

How to use it

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

<MapProvider center={{ lat: 50.096406, lng: 14.463071 }} id="map-example">
<Map>
<SyncControl />
</Map>
</MapProvider>;

Props

NameTypeDefaultDescriptionRequired
bottomSpacenumber0padding between bottom of the map and parent element
resizeTimeoutnumber100miliseconds after last resize action to update map