@watergis/maplibre-gl-terradraw 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -37,6 +37,15 @@ These projects are using `maplibre-gl-terradraw` and can be used as examples:
|
|
|
37
37
|
|
|
38
38
|
Please feel free to make a PR to add your project here!
|
|
39
39
|
|
|
40
|
+
## Dependencies
|
|
41
|
+
|
|
42
|
+
This plugin depends the following libraries:
|
|
43
|
+
|
|
44
|
+
- [Terra Draw](https://github.com/JamesLMilner/terra-draw): core library for drawing features
|
|
45
|
+
- [maplibre-gl-js](https://github.com/maplibre/maplibre-gl-js): map library for the plugin
|
|
46
|
+
- [Turf](https://github.com/Turfjs/turf): It is used for measuring functionalities (area, distance, centroid).
|
|
47
|
+
- [Google fonts](https://fonts.google.com/icons): using some icons for the plugin buttons
|
|
48
|
+
|
|
40
49
|
## Contribution
|
|
41
50
|
|
|
42
51
|
See [CONTRIBUTING](./CONTRIBUTING.md)
|
|
@@ -4075,7 +4075,7 @@ const ue = (r) => r === "degrees" ? "°" : r === "miles" ? "mi" : r === "radians
|
|
|
4075
4075
|
const i = JSON.parse(JSON.stringify(r));
|
|
4076
4076
|
return t && (t.onlyTerraDrawLayers === !0 ? (i.layers = i.layers.filter((o) => "source" in o && e.includes(o.source)), Object.keys(i.sources).forEach((o) => {
|
|
4077
4077
|
e.includes(o) || delete i.sources[o];
|
|
4078
|
-
})) : t.excludeTerraDrawLayers === !0 && (i.layers = i.layers.filter((o) => "source" in o && !e.includes(o.source)), Object.keys(i.sources).forEach((o) => {
|
|
4078
|
+
})) : t.excludeTerraDrawLayers === !0 && (i.layers = i.layers.filter((o) => "source" in o && !e.includes(o.source) || o.type === "background"), Object.keys(i.sources).forEach((o) => {
|
|
4079
4079
|
e.includes(o) && delete i.sources[o];
|
|
4080
4080
|
}))), i;
|
|
4081
4081
|
}, uo = (r, t = 250) => {
|