Skip to content

Releases: watergis/maplibre-gl-terradraw

v0.6.3

09 Dec 02:14
74caa35
Compare
Choose a tag to compare

Patch Changes

  • 5a285ce: fix: support select and delete-selection mode for MeasureControl. Use change event to compute distance and area instead of finished.

v0.6.2

08 Dec 10:27
fc73819
Compare
Choose a tag to compare

Patch Changes

  • 42e6ef0: fix: changed TerraDraw mode style for MeasureControl to differentiate from normal control. Also, circle layer for line label is added to visualize node of distance.

v0.6.1

08 Dec 02:47
aeb8e02
Compare
Choose a tag to compare

Patch Changes

  • af6beaf: fix: only add relevant source for user specified modes. For example, only line layer and source is added if no modes of polygon are used.

v0.6.0

08 Dec 02:10
a0a7f6a
Compare
Choose a tag to compare

Minor Changes

  • 36861d2: This release has a breaking change of the plugin interface. Please read carefully this changelog.

    added MaplibreMeasureControl to provide measure line and area control easily.

    Usage of MaplibreMeasureControl is like the below code.

    const drawControl = new MaplibreMeasureControl({
    	modes: [
    		'linestring',
    		'polygon',
    		'rectangle',
    		'angled-rectangle',
    		'circle',
    		'sector',
    		'sensor',
    		'freehand',
    		'delete'
    	],
    	open: true
    });
    map.addControl(drawControl, 'top-left');

    Due to adding new plugin control, default export was removed.

    New usage of MaplibreTerradrawControl will be like below.

    • NPM
    - import MaplibreTerradrawControl from '$lib/index.js';
    + import { MaplibreTerradrawControl } from '$lib/index.js';
    • CDN

    for CDN, library name of MaplibreTerradrawControl needs to be added.

    - const draw = new MaplibreTerradrawControl();
    + const draw = new MaplibreTerradrawControl.MaplibreTerradrawControl();

    Furthermore, all interfaces and constants are now exported from index.js.

v0.5.1

03 Dec 23:56
9f5cbe6
Compare
Choose a tag to compare

Patch Changes

  • 9358be9: chore: updated vite and other dependencies. Moved exports.types before import and require in package.json

v0.5.0

01 Dec 03:00
423ecaa
Compare
Choose a tag to compare

Minor Changes

  • 853a8a1: feat: add on/off function to the control for subscribing some events (currently only two modes - mode-changed and feature-deleted are supported)

v0.4.4

28 Nov 12:17
5332a49
Compare
Choose a tag to compare

Patch Changes

  • fc1c04f: fix: in some timing, TerraDraw throw error of 'Can not register unless mode is unregistered'. Hence, it resets _state in modes as unregistered before adding.

v0.4.3

28 Nov 08:16
55888eb
Compare
Choose a tag to compare

Patch Changes

  • 5529521: chore: updated devDependencies.

v0.4.2

15 Nov 03:07
b73eb99
Compare
Choose a tag to compare

Patch Changes

  • cdf5c1d: fix: fixed bug of angled-rectangle, sensor and sector SVG icons which were not rotated with transform in some browser.
  • 37a9836: fix: fixed bug when render button is removed. add default hidden mode if no render buttom.

v0.4.1

03 Nov 09:15
a5b1dde
Compare
Choose a tag to compare

Patch Changes

  • fa9ec0f: call this.deactivate() when calling map.removeControl(drawControl)