umap-project 3.1.2__py3-none-any.whl → 3.3.0__py3-none-any.whl
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.
Potentially problematic release.
This version of umap-project might be problematic. Click here for more details.
- umap/__init__.py +1 -1
- umap/locale/en/LC_MESSAGES/django.mo +0 -0
- umap/locale/en/LC_MESSAGES/django.po +22 -18
- umap/locale/fr/LC_MESSAGES/django.mo +0 -0
- umap/locale/fr/LC_MESSAGES/django.po +21 -17
- umap/management/commands/export_pictogram.py +29 -0
- umap/management/commands/migrate_to_S3.py +5 -1
- umap/management/commands/purge_old_versions.py +8 -6
- umap/settings/__init__.py +21 -0
- umap/settings/base.py +3 -0
- umap/static/umap/content.css +7 -2
- umap/static/umap/css/contextmenu.css +58 -2
- umap/static/umap/css/form.css +175 -45
- umap/static/umap/css/icon.css +97 -3
- umap/static/umap/css/panel.css +31 -1
- umap/static/umap/img/16-white.svg +21 -40
- umap/static/umap/img/16.svg +1 -1
- umap/static/umap/img/24-white.svg +9 -9
- umap/static/umap/img/24.svg +23 -10
- umap/static/umap/img/source/16-white.svg +23 -41
- umap/static/umap/img/source/16.svg +1 -1
- umap/static/umap/img/source/24-white.svg +11 -11
- umap/static/umap/img/source/24.svg +25 -12
- umap/static/umap/js/modules/browser.js +1 -1
- umap/static/umap/js/modules/caption.js +8 -0
- umap/static/umap/js/modules/data/features.js +331 -202
- umap/static/umap/js/modules/data/layer.js +263 -152
- umap/static/umap/js/modules/facets.js +2 -2
- umap/static/umap/js/modules/form/builder.js +11 -7
- umap/static/umap/js/modules/form/fields.js +66 -26
- umap/static/umap/js/modules/formatter.js +78 -28
- umap/static/umap/js/modules/importer.js +6 -1
- umap/static/umap/js/modules/importers/opendata.js +138 -33
- umap/static/umap/js/modules/importers/openrouteservice.js +140 -0
- umap/static/umap/js/modules/managers.js +67 -0
- umap/static/umap/js/modules/printer.js +107 -0
- umap/static/umap/js/modules/rendering/controls.js +78 -2
- umap/static/umap/js/modules/rendering/icon.js +116 -87
- umap/static/umap/js/modules/rendering/layers/classified.js +8 -7
- umap/static/umap/js/modules/rendering/layers/cluster.js +199 -63
- umap/static/umap/js/modules/rendering/map.js +6 -2
- umap/static/umap/js/modules/rendering/template.js +71 -1
- umap/static/umap/js/modules/rendering/ui.js +111 -34
- umap/static/umap/js/modules/rules.js +76 -23
- umap/static/umap/js/modules/schema.js +27 -0
- umap/static/umap/js/modules/share.js +19 -12
- umap/static/umap/js/modules/slideshow.js +1 -1
- umap/static/umap/js/modules/sync/updaters.js +1 -6
- umap/static/umap/js/modules/tableeditor.js +13 -37
- umap/static/umap/js/modules/templates.js +7 -6
- umap/static/umap/js/modules/ui/bar.js +6 -1
- umap/static/umap/js/modules/ui/base.js +24 -9
- umap/static/umap/js/modules/ui/contextmenu.js +17 -7
- umap/static/umap/js/modules/ui/dialog.js +7 -4
- umap/static/umap/js/modules/ui/panel.js +7 -0
- umap/static/umap/js/modules/umap.js +84 -67
- umap/static/umap/js/modules/utils.js +8 -7
- umap/static/umap/js/umap.controls.js +22 -57
- umap/static/umap/locale/am_ET.js +81 -9
- umap/static/umap/locale/am_ET.json +81 -9
- umap/static/umap/locale/ar.js +81 -9
- umap/static/umap/locale/ar.json +81 -9
- umap/static/umap/locale/ast.js +81 -9
- umap/static/umap/locale/ast.json +81 -9
- umap/static/umap/locale/bg.js +81 -9
- umap/static/umap/locale/bg.json +81 -9
- umap/static/umap/locale/br.js +68 -29
- umap/static/umap/locale/br.json +68 -29
- umap/static/umap/locale/ca.js +88 -16
- umap/static/umap/locale/ca.json +88 -16
- umap/static/umap/locale/cs_CZ.js +81 -9
- umap/static/umap/locale/cs_CZ.json +81 -9
- umap/static/umap/locale/da.js +48 -9
- umap/static/umap/locale/da.json +48 -9
- umap/static/umap/locale/de.js +48 -9
- umap/static/umap/locale/de.json +48 -9
- umap/static/umap/locale/el.js +58 -13
- umap/static/umap/locale/el.json +58 -13
- umap/static/umap/locale/en.js +48 -9
- umap/static/umap/locale/en.json +48 -9
- umap/static/umap/locale/en_US.json +81 -9
- umap/static/umap/locale/es.js +48 -9
- umap/static/umap/locale/es.json +48 -9
- umap/static/umap/locale/et.js +81 -9
- umap/static/umap/locale/et.json +81 -9
- umap/static/umap/locale/eu.js +97 -25
- umap/static/umap/locale/eu.json +97 -25
- umap/static/umap/locale/fa_IR.js +81 -9
- umap/static/umap/locale/fa_IR.json +81 -9
- umap/static/umap/locale/fi.js +81 -9
- umap/static/umap/locale/fi.json +81 -9
- umap/static/umap/locale/fr.js +48 -9
- umap/static/umap/locale/fr.json +48 -9
- umap/static/umap/locale/gl.js +81 -9
- umap/static/umap/locale/gl.json +81 -9
- umap/static/umap/locale/he.js +81 -9
- umap/static/umap/locale/he.json +81 -9
- umap/static/umap/locale/hr.js +81 -9
- umap/static/umap/locale/hr.json +81 -9
- umap/static/umap/locale/hu.js +72 -27
- umap/static/umap/locale/hu.json +72 -27
- umap/static/umap/locale/id.js +81 -9
- umap/static/umap/locale/id.json +81 -9
- umap/static/umap/locale/is.js +81 -9
- umap/static/umap/locale/is.json +81 -9
- umap/static/umap/locale/it.js +48 -9
- umap/static/umap/locale/it.json +48 -9
- umap/static/umap/locale/ja.js +81 -9
- umap/static/umap/locale/ja.json +81 -9
- umap/static/umap/locale/ko.js +81 -9
- umap/static/umap/locale/ko.json +81 -9
- umap/static/umap/locale/lt.js +81 -9
- umap/static/umap/locale/lt.json +81 -9
- umap/static/umap/locale/ms.js +81 -9
- umap/static/umap/locale/ms.json +81 -9
- umap/static/umap/locale/nl.js +48 -9
- umap/static/umap/locale/nl.json +48 -9
- umap/static/umap/locale/no.js +81 -9
- umap/static/umap/locale/no.json +81 -9
- umap/static/umap/locale/pl.js +81 -9
- umap/static/umap/locale/pl.json +81 -9
- umap/static/umap/locale/pl_PL.json +81 -9
- umap/static/umap/locale/pt.js +81 -9
- umap/static/umap/locale/pt.json +81 -9
- umap/static/umap/locale/pt_BR.js +91 -19
- umap/static/umap/locale/pt_BR.json +91 -19
- umap/static/umap/locale/pt_PT.js +81 -9
- umap/static/umap/locale/pt_PT.json +81 -9
- umap/static/umap/locale/ro.js +81 -9
- umap/static/umap/locale/ro.json +81 -9
- umap/static/umap/locale/ru.js +81 -9
- umap/static/umap/locale/ru.json +81 -9
- umap/static/umap/locale/sk_SK.js +81 -9
- umap/static/umap/locale/sk_SK.json +81 -9
- umap/static/umap/locale/sl.js +81 -9
- umap/static/umap/locale/sl.json +81 -9
- umap/static/umap/locale/sr.js +81 -9
- umap/static/umap/locale/sr.json +81 -9
- umap/static/umap/locale/sv.js +81 -9
- umap/static/umap/locale/sv.json +81 -9
- umap/static/umap/locale/th_TH.js +81 -9
- umap/static/umap/locale/th_TH.json +81 -9
- umap/static/umap/locale/tr.js +81 -9
- umap/static/umap/locale/tr.json +81 -9
- umap/static/umap/locale/uk_UA.js +81 -9
- umap/static/umap/locale/uk_UA.json +81 -9
- umap/static/umap/locale/vi.js +81 -9
- umap/static/umap/locale/vi.json +81 -9
- umap/static/umap/locale/vi_VN.json +81 -9
- umap/static/umap/locale/zh.js +81 -9
- umap/static/umap/locale/zh.json +81 -9
- umap/static/umap/locale/zh_CN.json +81 -9
- umap/static/umap/locale/zh_TW.Big5.json +81 -9
- umap/static/umap/locale/zh_TW.js +98 -26
- umap/static/umap/locale/zh_TW.json +98 -26
- umap/static/umap/map.css +325 -102
- umap/static/umap/vars.css +1 -0
- umap/static/umap/vendors/betterknown/betterknown.mjs +287 -0
- umap/static/umap/vendors/editable/Leaflet.Editable.js +3 -1
- umap/static/umap/vendors/openrouteservice/ors-js-client.js +521 -0
- umap/static/umap/vendors/openrouteservice/ors-js-client.js.map +1 -0
- umap/static/umap/vendors/simple-elevation-chart/elevation.js +63 -0
- umap/static/umap/vendors/simple-elevation-chart/elevation.svg +8 -0
- umap/static/umap/vendors/snapdom/snapdom.min.mjs +3 -0
- umap/storage/fs.py +3 -2
- umap/storage/staticfiles.py +12 -0
- umap/templates/base.html +4 -1
- umap/templates/umap/css.html +0 -4
- umap/templates/umap/js.html +1 -3
- umap/tests/base.py +9 -1
- umap/tests/integration/test_basics.py +3 -1
- umap/tests/integration/test_conditional_rules.py +79 -37
- umap/tests/integration/test_datalayer.py +1 -1
- umap/tests/integration/test_draw_polygon.py +3 -5
- umap/tests/integration/test_draw_polyline.py +4 -6
- umap/tests/integration/test_draw_route.py +178 -0
- umap/tests/integration/test_edit_datalayer.py +1 -1
- umap/tests/integration/test_edit_map.py +1 -1
- umap/tests/integration/test_edit_marker.py +8 -8
- umap/tests/integration/test_edit_polygon.py +2 -2
- umap/tests/integration/test_export_map.py +84 -10
- umap/tests/integration/test_import.py +140 -0
- umap/tests/integration/test_map_preview.py +1 -1
- umap/tests/integration/test_optimistic_merge.py +72 -12
- umap/tests/integration/test_share.py +1 -1
- umap/tests/integration/test_tableeditor.py +10 -7
- umap/tests/integration/test_websocket_sync.py +4 -4
- umap/utils.py +37 -0
- umap/views.py +18 -2
- umap_project-3.3.0.dist-info/METADATA +76 -0
- {umap_project-3.1.2.dist-info → umap_project-3.3.0.dist-info}/RECORD +194 -188
- umap/static/umap/vendors/markercluster/MarkerCluster.Default.css +0 -60
- umap/static/umap/vendors/markercluster/MarkerCluster.css +0 -14
- umap/static/umap/vendors/markercluster/leaflet.markercluster.js +0 -2
- umap/static/umap/vendors/markercluster/leaflet.markercluster.js.map +0 -1
- umap_project-3.1.2.dist-info/METADATA +0 -68
- {umap_project-3.1.2.dist-info → umap_project-3.3.0.dist-info}/WHEEL +0 -0
- {umap_project-3.1.2.dist-info → umap_project-3.3.0.dist-info}/entry_points.txt +0 -0
- {umap_project-3.1.2.dist-info → umap_project-3.3.0.dist-info}/licenses/LICENSE +0 -0
umap/static/umap/vars.css
CHANGED
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var d = (t, n, e) => n in t ? l(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
|
|
3
|
+
var p = (t, n, e) => (d(t, typeof n != "symbol" ? n + "" : n, e), e);
|
|
4
|
+
const M = [
|
|
5
|
+
"Point",
|
|
6
|
+
"LineString",
|
|
7
|
+
"Polygon",
|
|
8
|
+
"MultiPoint",
|
|
9
|
+
"MultiLineString",
|
|
10
|
+
"MultiPolygon",
|
|
11
|
+
"GeometryCollection"
|
|
12
|
+
], f = ["ZM", "Z", "M"], s = "EMPTY";
|
|
13
|
+
class G {
|
|
14
|
+
constructor(n) {
|
|
15
|
+
p(this, "value");
|
|
16
|
+
p(this, "position");
|
|
17
|
+
this.value = n.toUpperCase(), this.position = 0;
|
|
18
|
+
}
|
|
19
|
+
match(n) {
|
|
20
|
+
this.skipWhitespaces();
|
|
21
|
+
for (const e of n) {
|
|
22
|
+
const r = e.toUpperCase();
|
|
23
|
+
if (this.value.startsWith(r, this.position))
|
|
24
|
+
return this.position += r.length, e;
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
matchRegex(n) {
|
|
29
|
+
this.skipWhitespaces();
|
|
30
|
+
for (const e of n) {
|
|
31
|
+
const r = this.value.substring(this.position).match(e);
|
|
32
|
+
if (r)
|
|
33
|
+
return this.position += r[0].length, r;
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
isMatch(n) {
|
|
38
|
+
return this.skipWhitespaces(), this.value.startsWith(n, this.position) ? (this.position += n.length, !0) : !1;
|
|
39
|
+
}
|
|
40
|
+
matchType() {
|
|
41
|
+
const n = this.match(M);
|
|
42
|
+
if (!n)
|
|
43
|
+
throw new Error("Expected geometry type");
|
|
44
|
+
return n;
|
|
45
|
+
}
|
|
46
|
+
matchDimension() {
|
|
47
|
+
switch (this.match(f)) {
|
|
48
|
+
case "ZM":
|
|
49
|
+
return { hasZ: !0, hasM: !0 };
|
|
50
|
+
case "Z":
|
|
51
|
+
return { hasZ: !0, hasM: !1 };
|
|
52
|
+
case "M":
|
|
53
|
+
return { hasZ: !1, hasM: !0 };
|
|
54
|
+
default:
|
|
55
|
+
return { hasZ: !1, hasM: !1 };
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
expectGroupStart() {
|
|
59
|
+
if (!this.isMatch("("))
|
|
60
|
+
throw new Error("Expected group start");
|
|
61
|
+
}
|
|
62
|
+
expectGroupEnd() {
|
|
63
|
+
if (!this.isMatch(")"))
|
|
64
|
+
throw new Error("Expected group end");
|
|
65
|
+
}
|
|
66
|
+
matchCoordinate(n) {
|
|
67
|
+
let e;
|
|
68
|
+
if (n.hasZ && n.hasM ? e = this.matchRegex([/^(\S*)\s+(\S*)\s+(\S*)\s+([^\s,)]*)/i]) : n.hasZ || n.hasM ? e = this.matchRegex([/^(\S*)\s+(\S*)\s+([^\s,)]*)/i]) : e = this.matchRegex([/^(\S*)\s+([^\s,)]*)/i]), !e)
|
|
69
|
+
throw new Error("Expected coordinates");
|
|
70
|
+
const r = n.hasZ && n.hasM ? [
|
|
71
|
+
parseFloat(e[1]),
|
|
72
|
+
parseFloat(e[2]),
|
|
73
|
+
parseFloat(e[3]),
|
|
74
|
+
parseFloat(e[4])
|
|
75
|
+
] : n.hasZ ? [parseFloat(e[1]), parseFloat(e[2]), parseFloat(e[3])] : n.hasM ? [
|
|
76
|
+
parseFloat(e[1]),
|
|
77
|
+
parseFloat(e[2])
|
|
78
|
+
] : [parseFloat(e[1]), parseFloat(e[2])];
|
|
79
|
+
if (n.srid && n.srid !== 4326) {
|
|
80
|
+
if (n.proj)
|
|
81
|
+
return n.proj(`EPSG:${n.srid}`, "EPSG:4326", r);
|
|
82
|
+
throw new Error(
|
|
83
|
+
`EWKT data in an unknown SRID (${n.srid}) was provided, but a proj function was not`
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
return r;
|
|
87
|
+
}
|
|
88
|
+
matchCoordinates(n) {
|
|
89
|
+
const e = [];
|
|
90
|
+
do {
|
|
91
|
+
const r = this.isMatch("(");
|
|
92
|
+
e.push(this.matchCoordinate(n)), r && this.expectGroupEnd();
|
|
93
|
+
} while (this.isMatch(","));
|
|
94
|
+
return e;
|
|
95
|
+
}
|
|
96
|
+
skipWhitespaces() {
|
|
97
|
+
for (; this.position < this.value.length && this.value[this.position] === " "; )
|
|
98
|
+
this.position++;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const g = (t, n) => {
|
|
102
|
+
if (t.isMatch(s))
|
|
103
|
+
return n.emptyAsNull ? null : { type: "Point", coordinates: [] };
|
|
104
|
+
t.expectGroupStart();
|
|
105
|
+
const e = t.matchCoordinate(n);
|
|
106
|
+
return t.expectGroupEnd(), {
|
|
107
|
+
type: "Point",
|
|
108
|
+
coordinates: e
|
|
109
|
+
};
|
|
110
|
+
}, E = (t, n) => {
|
|
111
|
+
if (t.isMatch(s))
|
|
112
|
+
return n.emptyAsNull ? null : { type: "LineString", coordinates: [] };
|
|
113
|
+
t.expectGroupStart();
|
|
114
|
+
const e = t.matchCoordinates(n);
|
|
115
|
+
return t.expectGroupEnd(), {
|
|
116
|
+
type: "LineString",
|
|
117
|
+
coordinates: e
|
|
118
|
+
};
|
|
119
|
+
}, m = (t, n) => {
|
|
120
|
+
if (t.isMatch(s))
|
|
121
|
+
return n.emptyAsNull ? null : { type: "Polygon", coordinates: [] };
|
|
122
|
+
const e = [];
|
|
123
|
+
for (t.expectGroupStart(), t.expectGroupStart(), e.push(t.matchCoordinates(n)), t.expectGroupEnd(); t.isMatch(","); )
|
|
124
|
+
t.expectGroupStart(), e.push(t.matchCoordinates(n)), t.expectGroupEnd();
|
|
125
|
+
return t.expectGroupEnd(), {
|
|
126
|
+
type: "Polygon",
|
|
127
|
+
coordinates: e
|
|
128
|
+
};
|
|
129
|
+
}, S = (t, n) => {
|
|
130
|
+
if (t.isMatch(s))
|
|
131
|
+
return n.emptyAsNull ? null : { type: "MultiPoint", coordinates: [] };
|
|
132
|
+
t.expectGroupStart();
|
|
133
|
+
const e = t.matchCoordinates(n);
|
|
134
|
+
return t.expectGroupEnd(), {
|
|
135
|
+
type: "MultiPoint",
|
|
136
|
+
coordinates: e
|
|
137
|
+
};
|
|
138
|
+
}, y = (t, n) => {
|
|
139
|
+
if (t.isMatch(s))
|
|
140
|
+
return n.emptyAsNull ? null : { type: "MultiLineString", coordinates: [] };
|
|
141
|
+
t.expectGroupStart();
|
|
142
|
+
const e = [];
|
|
143
|
+
do
|
|
144
|
+
t.expectGroupStart(), e.push(t.matchCoordinates(n)), t.expectGroupEnd();
|
|
145
|
+
while (t.isMatch(","));
|
|
146
|
+
return t.expectGroupEnd(), {
|
|
147
|
+
type: "MultiLineString",
|
|
148
|
+
coordinates: e
|
|
149
|
+
};
|
|
150
|
+
}, x = (t, n) => {
|
|
151
|
+
if (t.isMatch(s))
|
|
152
|
+
return n.emptyAsNull ? null : { type: "MultiPolygon", coordinates: [] };
|
|
153
|
+
t.expectGroupStart();
|
|
154
|
+
const e = [];
|
|
155
|
+
do {
|
|
156
|
+
t.expectGroupStart();
|
|
157
|
+
const r = [], o = [];
|
|
158
|
+
for (t.expectGroupStart(), r.push.apply(r, t.matchCoordinates(n)), t.expectGroupEnd(); t.isMatch(","); )
|
|
159
|
+
t.expectGroupStart(), o.push(t.matchCoordinates(n)), t.expectGroupEnd();
|
|
160
|
+
e.push([r, ...o]), t.expectGroupEnd();
|
|
161
|
+
} while (t.isMatch(","));
|
|
162
|
+
return t.expectGroupEnd(), {
|
|
163
|
+
type: "MultiPolygon",
|
|
164
|
+
coordinates: e
|
|
165
|
+
};
|
|
166
|
+
}, P = (t, n) => {
|
|
167
|
+
if (t.isMatch(s))
|
|
168
|
+
return n.emptyAsNull ? null : { type: "GeometryCollection", geometries: [] };
|
|
169
|
+
t.expectGroupStart();
|
|
170
|
+
const e = [];
|
|
171
|
+
do {
|
|
172
|
+
const r = u(t, n);
|
|
173
|
+
r && e.push(r);
|
|
174
|
+
} while (t.isMatch(","));
|
|
175
|
+
return t.expectGroupEnd(), {
|
|
176
|
+
type: "GeometryCollection",
|
|
177
|
+
geometries: e
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
function c(t) {
|
|
181
|
+
return t.join(" ");
|
|
182
|
+
}
|
|
183
|
+
function a(t) {
|
|
184
|
+
if (t === void 0)
|
|
185
|
+
return " ";
|
|
186
|
+
switch (t.length) {
|
|
187
|
+
case 3:
|
|
188
|
+
return " Z ";
|
|
189
|
+
default:
|
|
190
|
+
return " ";
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
function T(t) {
|
|
194
|
+
return t.coordinates.length === 0 ? "POINT EMPTY" : `POINT${a(t.coordinates)}(${c(
|
|
195
|
+
t.coordinates
|
|
196
|
+
)})`;
|
|
197
|
+
}
|
|
198
|
+
function L(t) {
|
|
199
|
+
return t.coordinates.length === 0 ? "MULTIPOINT EMPTY" : `MULTIPOINT${a(
|
|
200
|
+
t.coordinates[0]
|
|
201
|
+
)}(${t.coordinates.map((n) => c(n)).join(",")})`;
|
|
202
|
+
}
|
|
203
|
+
function N(t) {
|
|
204
|
+
if (t.coordinates.length === 0)
|
|
205
|
+
return "LINESTRING EMPTY";
|
|
206
|
+
const n = `(${t.coordinates.map((e) => c(e)).join(",")})`;
|
|
207
|
+
return `LINESTRING${a(t.coordinates[0])}${n}`;
|
|
208
|
+
}
|
|
209
|
+
function C(t) {
|
|
210
|
+
return t.geometries.length === 0 ? "GEOMETRYCOLLECTION EMPTY" : `GEOMETRYCOLLECTION${`(${t.geometries.map((e) => O(e)).join(",")})`}`;
|
|
211
|
+
}
|
|
212
|
+
function I(t) {
|
|
213
|
+
if (t.coordinates.length === 0)
|
|
214
|
+
return "MULTILINESTRING EMPTY";
|
|
215
|
+
const n = `(${t.coordinates.map((e) => `(${e.map((r) => c(r))})`)})`;
|
|
216
|
+
return `MULTILINESTRING${a(t.coordinates[0][0])}${n}`;
|
|
217
|
+
}
|
|
218
|
+
function W(t) {
|
|
219
|
+
var e;
|
|
220
|
+
if (t.coordinates.length === 0)
|
|
221
|
+
return "POLYGON EMPTY";
|
|
222
|
+
const n = `(${t.coordinates.map((r) => `(${r.map((o) => c(o))})`)})`;
|
|
223
|
+
return `POLYGON${a((e = t.coordinates[0]) == null ? void 0 : e[0])}${n}`;
|
|
224
|
+
}
|
|
225
|
+
function $(t) {
|
|
226
|
+
var e, r;
|
|
227
|
+
if (t.coordinates.length === 0)
|
|
228
|
+
return "MULTIPOLYGON EMPTY";
|
|
229
|
+
const n = `(${t.coordinates.map((o) => `(${o.map((h) => `(${h.map((i) => c(i))})`)})`)})`;
|
|
230
|
+
return `MULTIPOLYGON${a(
|
|
231
|
+
(r = (e = t.coordinates[0]) == null ? void 0 : e[0]) == null ? void 0 : r[0]
|
|
232
|
+
)}${n}`;
|
|
233
|
+
}
|
|
234
|
+
function u(t, n) {
|
|
235
|
+
let e = null;
|
|
236
|
+
const r = t.matchRegex([/^SRID=(\d+);/i]);
|
|
237
|
+
r && (e = parseInt(r[1], 10));
|
|
238
|
+
const o = t.matchType(), h = t.matchDimension(), i = {
|
|
239
|
+
...n,
|
|
240
|
+
srid: e,
|
|
241
|
+
hasZ: h.hasZ,
|
|
242
|
+
hasM: h.hasM
|
|
243
|
+
};
|
|
244
|
+
switch (o) {
|
|
245
|
+
case "Point":
|
|
246
|
+
return g(t, i);
|
|
247
|
+
case "LineString":
|
|
248
|
+
return E(t, i);
|
|
249
|
+
case "Polygon":
|
|
250
|
+
return m(t, i);
|
|
251
|
+
case "MultiPoint":
|
|
252
|
+
return S(t, i);
|
|
253
|
+
case "MultiLineString":
|
|
254
|
+
return y(t, i);
|
|
255
|
+
case "MultiPolygon":
|
|
256
|
+
return x(t, i);
|
|
257
|
+
case "GeometryCollection":
|
|
258
|
+
return P(t, i);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
function O(t) {
|
|
262
|
+
switch (t.type) {
|
|
263
|
+
case "Point":
|
|
264
|
+
return T(t);
|
|
265
|
+
case "LineString":
|
|
266
|
+
return N(t);
|
|
267
|
+
case "MultiPoint":
|
|
268
|
+
return L(t);
|
|
269
|
+
case "GeometryCollection":
|
|
270
|
+
return C(t);
|
|
271
|
+
case "Polygon":
|
|
272
|
+
return W(t);
|
|
273
|
+
case "MultiPolygon":
|
|
274
|
+
return $(t);
|
|
275
|
+
case "MultiLineString":
|
|
276
|
+
return I(t);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function Z(t, n = {
|
|
280
|
+
emptyAsNull: !0
|
|
281
|
+
}) {
|
|
282
|
+
return u(new G(t), n);
|
|
283
|
+
}
|
|
284
|
+
export {
|
|
285
|
+
O as geoJSONToWkt,
|
|
286
|
+
Z as wktToGeoJSON
|
|
287
|
+
};
|
|
@@ -814,6 +814,8 @@
|
|
|
814
814
|
// 🍂namespace Editable; 🍂class BaseEditor; 🍂aka L.Editable.BaseEditor
|
|
815
815
|
// When editing a feature (Marker, Polyline…), an editor is attached to it. This
|
|
816
816
|
// editor basically knows how to handle the edition.
|
|
817
|
+
// 🍂option draggable: boolean = false
|
|
818
|
+
// Disable dragging of the feature while in edit mode
|
|
817
819
|
L.Editable.BaseEditor = L.Handler.extend({
|
|
818
820
|
initialize: function (map, feature, options) {
|
|
819
821
|
L.setOptions(this, options)
|
|
@@ -854,7 +856,7 @@
|
|
|
854
856
|
|
|
855
857
|
onFeatureAdd: function () {
|
|
856
858
|
this.tools.editLayer.addLayer(this.editLayer)
|
|
857
|
-
if (this.feature.dragging) this.feature.dragging.enable()
|
|
859
|
+
if (this.feature.dragging && this.options.draggable != false) this.feature.dragging.enable()
|
|
858
860
|
},
|
|
859
861
|
|
|
860
862
|
hasMiddleMarkers: function () {
|