mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
16 lines
387 B
TypeScript
16 lines
387 B
TypeScript
import * as L from 'leaflet';
|
|
import 'leaflet-areaselect';
|
|
|
|
const map = L.map('map', {center: L.latLng(-37.7772, 175.2756), zoom: 15 });
|
|
let area: L.AreaSelect;
|
|
const dim: L.Dimension = { width: 1, height: 2 };
|
|
|
|
area = L.areaSelect({});
|
|
|
|
area.remove();
|
|
area.addTo(map);
|
|
area.getBounds();
|
|
area.setDimensions(dim);
|
|
|
|
L.areaSelect({width: 10, height: 30, keepAspectRatio: true}).addTo(map);
|