@trailstash/ultra 3.1.1 → 3.1.4
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 +1 -1
- package/components/ultra-ide.js +4 -1
- package/docs/assets/logo.svg +78 -0
- package/lib/queryProviders/osm.js +1 -1
- package/lib/queryProviders/overpass.js +7 -0
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ JS](https://maplibre.org).
|
|
|
6
6
|
## Deployments
|
|
7
7
|
|
|
8
8
|
- Production version - [overpass-ultra.us](https://overpass-ultra.us) <small>([config](https://gitlab.com/trailstash/overpass-ultra/-/blob/main/config.js))</small>
|
|
9
|
-
- Development Version - [ultra.trailsta.sh](https://ultra.trailsta.sh) <small>([config](
|
|
9
|
+
- Development Version - [ultra.trailsta.sh](https://ultra.trailsta.sh) <small>([config](https://gitlab.com/trailstash/ultra/-/blob/main/config.js))</small>
|
|
10
10
|
- OHM version - [ohm.overpass-ultra.us](https://ohm.overpass-ultra.us) <small>([config](https://gitlab.com/trailstash/ohm-ultra/-/blob/main/config.js))</small>
|
|
11
11
|
|
|
12
12
|
## Documentation
|
package/components/ultra-ide.js
CHANGED
|
@@ -213,7 +213,10 @@ export class UltraIDE extends HTMLElement {
|
|
|
213
213
|
};
|
|
214
214
|
Object.assign(this.refs.mapLibre, {
|
|
215
215
|
...pick(settings, UltraMap.RUNTIME_SETTINGS),
|
|
216
|
-
mapStyle: setBaseStyle(
|
|
216
|
+
mapStyle: setBaseStyle(
|
|
217
|
+
settings.mapStyle,
|
|
218
|
+
this.settings.mapStyle || UltraMap.defaults.mapStyle,
|
|
219
|
+
),
|
|
217
220
|
});
|
|
218
221
|
|
|
219
222
|
this.refs.downloadButton.data = null;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
9
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
10
|
+
height="22"
|
|
11
|
+
width="22"
|
|
12
|
+
viewBox="0 0 704 704"
|
|
13
|
+
version="1.1"
|
|
14
|
+
id="svg4"
|
|
15
|
+
sodipodi:docname="logo.svg"
|
|
16
|
+
inkscape:version="1.0.2 (e86c870879, 2021-01-15)">
|
|
17
|
+
<metadata
|
|
18
|
+
id="metadata8">
|
|
19
|
+
<rdf:RDF>
|
|
20
|
+
<cc:Work
|
|
21
|
+
rdf:about="">
|
|
22
|
+
<dc:format>image/svg+xml</dc:format>
|
|
23
|
+
<dc:type
|
|
24
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
25
|
+
</cc:Work>
|
|
26
|
+
</rdf:RDF>
|
|
27
|
+
</metadata>
|
|
28
|
+
<defs
|
|
29
|
+
id="defs8" />
|
|
30
|
+
<sodipodi:namedview
|
|
31
|
+
id="namedview6"
|
|
32
|
+
pagecolor="#ffffff"
|
|
33
|
+
bordercolor="#666666"
|
|
34
|
+
borderopacity="1.0"
|
|
35
|
+
inkscape:pageshadow="2"
|
|
36
|
+
inkscape:pageopacity="0.0"
|
|
37
|
+
inkscape:pagecheckerboard="0"
|
|
38
|
+
showgrid="false"
|
|
39
|
+
inkscape:zoom="23.748482"
|
|
40
|
+
inkscape:cx="0.28180161"
|
|
41
|
+
inkscape:cy="7.5070578"
|
|
42
|
+
inkscape:window-width="2000"
|
|
43
|
+
inkscape:window-height="1253"
|
|
44
|
+
inkscape:window-x="0"
|
|
45
|
+
inkscape:window-y="0"
|
|
46
|
+
inkscape:window-maximized="1"
|
|
47
|
+
inkscape:current-layer="svg4"
|
|
48
|
+
inkscape:document-rotation="0" />
|
|
49
|
+
<!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
|
|
50
|
+
<path
|
|
51
|
+
d="M 0,352.00011 C 0,157.59567 157.59578,1.1113408e-4 352,1.1113408e-4 546.40422,1.1113408e-4 704,157.59567 704,352.00011 c 0,194.40445 -157.59578,352 -352,352 -194.40422,0 -352,-157.59555 -352,-352 z"
|
|
52
|
+
id="path2"
|
|
53
|
+
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke-width:1.375"
|
|
54
|
+
sodipodi:nodetypes="sssss" />
|
|
55
|
+
<path
|
|
56
|
+
style="fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:0.968366;stroke-opacity:1"
|
|
57
|
+
d="m 562.1348,394.20034 c -24.36253,-6.09555 -38.87589,-31.23955 -31.57391,-54.70088 9.69205,-31.1406 48.93706,-41.17209 71.5572,-18.29088 9.2616,9.3685 12.98726,18.20169 12.98726,30.79153 0,12.58984 -3.72548,21.42303 -12.98726,30.79153 -10.4064,10.5265 -25.87191,14.93938 -39.98329,11.4087 z"
|
|
58
|
+
id="path2039" />
|
|
59
|
+
<path
|
|
60
|
+
style="fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:0.968366;stroke-opacity:1"
|
|
61
|
+
d="m 340.66013,570.73635 c -21.70562,-2.79677 -44.61211,-16.08209 -57.89509,-33.57808 -6.30391,-8.30334 -12.93817,-21.77501 -15.59751,-31.67254 -2.75361,-10.24844 -3.04204,-30.65931 -0.57272,-40.52935 3.95574,-15.81141 11.04495,-28.9471 21.84961,-40.48556 15.42529,-16.47286 35.63618,-26.11684 57.85929,-27.60858 l 8.82916,-0.59267 44.4121,-100.73482 c 24.42665,-55.40414 45.59793,-102.60464 47.04724,-104.89 3.22036,-5.07763 8.88677,-9.30546 16.14514,-12.04574 11.16289,-4.21442 26.27231,-0.396 34.21123,8.64611 6.66015,7.58552 9.92266,19.75235 7.68227,28.64966 -0.61248,2.43264 -21.16026,49.98921 -45.66166,105.68124 l -44.54792,101.25828 3.94794,4.48511 c 29.65793,33.69321 27.52934,86.07857 -4.81183,118.41974 -14.01168,14.01167 -31.60929,22.57355 -51.5307,25.07147 -9.04172,1.13388 -12.07327,1.12332 -21.36656,-0.0748 z"
|
|
62
|
+
id="path2189" />
|
|
63
|
+
<path
|
|
64
|
+
style="fill:#ffffff;stroke-width:0.0249354;stroke-linejoin:round;stroke-dashoffset:3.8;fill-opacity:1"
|
|
65
|
+
d="M 3.8030177,12.323546 C 3.3782561,12.22055 2.9749708,11.854662 2.8417976,11.451463 2.669399,10.929505 2.7856098,10.430606 3.1694843,10.044689 c 0.5418431,-0.5447266 1.3695005,-0.5440222 1.9147492,0.0016 0.2687844,0.268983 0.3958216,0.575086 0.3958216,0.953754 0,0.241343 -0.043233,0.415026 -0.1586014,0.637158 -0.1703677,0.32803 -0.521472,0.602511 -0.8782964,0.686624 -0.1724295,0.04065 -0.4718397,0.0405 -0.6401396,-3.08e-4 z"
|
|
66
|
+
id="path10"
|
|
67
|
+
transform="scale(32)" />
|
|
68
|
+
<path
|
|
69
|
+
style="fill:#ffffff;stroke-width:0.0249354;stroke-linejoin:round;stroke-dashoffset:3.8;fill-opacity:1"
|
|
70
|
+
d="M 5.9532325,7.5284272 C 5.5819707,7.4573167 5.2565902,7.2410423 5.0479378,6.9266941 4.9364416,6.7587179 4.8436181,6.4807429 4.8280826,6.2683021 4.7822526,5.6415959 5.2392938,5.0222238 5.8643213,4.8640142 6.0326362,4.8214096 6.3364212,4.8214763 6.504317,4.8641547 6.8739312,4.9581091 7.2382341,5.246434 7.4006,5.5735113 7.8343052,6.4471873 7.2474771,7.4729318 6.2723522,7.5456292 6.1726455,7.5530625 6.0462921,7.5462521 5.9532325,7.5284272 Z"
|
|
71
|
+
id="path12"
|
|
72
|
+
transform="scale(32)" />
|
|
73
|
+
<path
|
|
74
|
+
style="fill:#ffffff;stroke-width:0.0249354;stroke-linejoin:round;stroke-dashoffset:3.8;fill-opacity:1"
|
|
75
|
+
d="M 10.719604,5.4583568 C 9.9759581,5.2893251 9.5026576,4.5470852 9.6738812,3.8184319 9.7908054,3.3208531 10.217638,2.8991213 10.709857,2.7948375 c 0.416647,-0.088273 0.871064,0.029737 1.190494,0.3091668 0.134292,0.117475 0.313993,0.3773193 0.376521,0.5444406 0.18623,0.4977426 0.06458,1.0468044 -0.317331,1.4322699 -0.156873,0.1583324 -0.358748,0.2833937 -0.559266,0.3464643 -0.188139,0.059177 -0.495543,0.073257 -0.680671,0.031178 z"
|
|
76
|
+
id="path14"
|
|
77
|
+
transform="scale(32)" />
|
|
78
|
+
</svg>
|
|
@@ -53,7 +53,7 @@ export const popupTemplate = `
|
|
|
53
53
|
{%- endif %}
|
|
54
54
|
{%- if coordinates %}
|
|
55
55
|
<h3>Coordinates</h3>
|
|
56
|
-
<a href="geo
|
|
56
|
+
<a href="geo:{{coordinates[1]}},{{coordinates[0]}}">{{coordinates[1] | round: 6 }} / {{coordinates[0] | round: 6 }}</a> <small>(lat/lon)</small>
|
|
57
57
|
{%- endif %}
|
|
58
58
|
`;
|
|
59
59
|
export const popupContextBuilder = ({ properties, geometry }) => {
|
|
@@ -33,6 +33,13 @@ const overpassQLRegexes = [
|
|
|
33
33
|
/out( geom| center| skel)?;/,
|
|
34
34
|
];
|
|
35
35
|
function detect(query) {
|
|
36
|
+
const doc = new window.DOMParser().parseFromString(query, "text/xml");
|
|
37
|
+
if (
|
|
38
|
+
!doc.querySelector("parsererror") &&
|
|
39
|
+
Array.from(doc.childNodes).some((x) => x.nodeName === "osm-script")
|
|
40
|
+
) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
36
43
|
for (const re of overpassQLRegexes) {
|
|
37
44
|
if (query.match(re)) {
|
|
38
45
|
return query;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "3.1.
|
|
6
|
+
"version": "3.1.4",
|
|
7
7
|
"description": "A web based tool for making MapLibre GL maps with data from sources such as Overpass, GeoJSON, GPX, KML, TCX, etc",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -22,19 +22,23 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "git+https://gitlab.com/trailstash/
|
|
25
|
+
"url": "git+https://gitlab.com/trailstash/ultra.git"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
28
28
|
"maps",
|
|
29
29
|
"cartography",
|
|
30
30
|
"osm",
|
|
31
31
|
"overpass",
|
|
32
|
+
"geojson",
|
|
33
|
+
"gpx",
|
|
34
|
+
"kml",
|
|
35
|
+
"tcx",
|
|
32
36
|
"mapbox-gl",
|
|
33
37
|
"mapbox-gl-js"
|
|
34
38
|
],
|
|
35
39
|
"author": "Daniel Schep",
|
|
36
40
|
"bugs": {
|
|
37
|
-
"url": "https://gitlab.com/trailstash/
|
|
41
|
+
"url": "https://gitlab.com/trailstash/ultra/issues"
|
|
38
42
|
},
|
|
39
43
|
"homepage": "https://overpass-ultra.us/",
|
|
40
44
|
"devDependencies": {
|