@trailstash/ultra 3.4.2 → 3.4.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 +2 -2
- package/cli/build.js +3 -3
- package/cli/serve.js +2 -2
- package/components/help-modal.js +11 -14
- package/docs/index.md +41 -31
- package/package.json +1 -1
- /package/{config.js → config.mjs} +0 -0
package/README.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Ultra (née Overpass Ultra) is a web-application made to simplify making maps with [MapLibre GL
|
|
4
4
|
JS](https://maplibre.org).
|
|
5
5
|
|
|
6
|
-
- Stable version - [overpass-ultra.us](https://overpass-ultra.us) <small>([config](https://gitlab.com/trailstash/overpass-ultra/-/blob/main/config.
|
|
7
|
-
- Latest version - [ultra.trailsta.sh](https://ultra.trailsta.sh) <small>([config](https://gitlab.com/trailstash/ultra/-/blob/main/config.
|
|
6
|
+
- Stable version - [overpass-ultra.us](https://overpass-ultra.us) <small>([config](https://gitlab.com/trailstash/overpass-ultra/-/blob/main/config.mjs))</small>
|
|
7
|
+
- Latest version - [ultra.trailsta.sh](https://ultra.trailsta.sh) <small>([config](https://gitlab.com/trailstash/ultra/-/blob/main/config.mjs))</small>
|
|
8
8
|
- OHM version - [ohm.overpass-ultra.us](https://ohm.overpass-ultra.us) <small>([config](https://gitlab.com/trailstash/ohm-ultra/-/blob/main/config.js))</small>
|
|
9
9
|
|
|
10
10
|
## Documentation
|
package/cli/build.js
CHANGED
|
@@ -63,7 +63,7 @@ export default class Build extends Command {
|
|
|
63
63
|
config: Flags.string({
|
|
64
64
|
char: "c",
|
|
65
65
|
description: "configuration to use",
|
|
66
|
-
default: path.join(process.cwd(), "/config.
|
|
66
|
+
default: path.join(process.cwd(), "/config.mjs"),
|
|
67
67
|
}),
|
|
68
68
|
};
|
|
69
69
|
static args = {
|
|
@@ -82,9 +82,9 @@ export default class Build extends Command {
|
|
|
82
82
|
|
|
83
83
|
if (!fs.existsSync(config)) {
|
|
84
84
|
console.error(
|
|
85
|
-
`"${config}" not found, using ${path.join(ultraRoot, "config.
|
|
85
|
+
`"${config}" not found, using ${path.join(ultraRoot, "config.mjs")}`,
|
|
86
86
|
);
|
|
87
|
-
config = path.join(ultraRoot, "config.
|
|
87
|
+
config = path.join(ultraRoot, "config.mjs");
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
if (query) {
|
package/cli/serve.js
CHANGED
|
@@ -43,9 +43,9 @@ export default class Serve extends Command {
|
|
|
43
43
|
|
|
44
44
|
if (!fs.existsSync(config)) {
|
|
45
45
|
console.error(
|
|
46
|
-
`"${config}" not found, using ${path.join(ultraRoot, "config.
|
|
46
|
+
`"${config}" not found, using ${path.join(ultraRoot, "config.mjs")}`,
|
|
47
47
|
);
|
|
48
|
-
config = path.join(ultraRoot, "config.
|
|
48
|
+
config = path.join(ultraRoot, "config.mjs");
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
if (query) {
|
package/components/help-modal.js
CHANGED
|
@@ -32,18 +32,6 @@ Full documentation for Ultra is available at ${window.location.origin}/docs
|
|
|
32
32
|
Various aspects of Ultra, such as styling, can be
|
|
33
33
|
configured via [YAML front-matter](/docs/yaml).
|
|
34
34
|
|
|
35
|
-
## Query Bounds
|
|
36
|
-
|
|
37
|
-
The following shortcuts are available to parameterize your queries:
|
|
38
|
-
|
|
39
|
-
| shortcut | description |
|
|
40
|
-
| -------- | ----------- |
|
|
41
|
-
| \`{{bbox}}\` | The map's bounds in the format expected by [https://overpass-api.de](Overpass) |
|
|
42
|
-
| \`{{south}}\` | The Southern Latitude of the map's bounds |
|
|
43
|
-
| \`{{north}}\` | The Northern Latitude of the map's bounds |
|
|
44
|
-
| \`{{east}}\` | The Eastern Longitude of the map's bounds |
|
|
45
|
-
| \`{{west}}\` | The Western Longitude of the map's bounds |
|
|
46
|
-
|
|
47
35
|
## Styling
|
|
48
36
|
|
|
49
37
|
Ultra supports styling using an extended version of the the
|
|
@@ -51,6 +39,15 @@ Ultra supports styling using an extended version of the the
|
|
|
51
39
|
|
|
52
40
|
See the [Styling](/docs/style) section for more information.
|
|
53
41
|
|
|
42
|
+
## Overpass Queries
|
|
43
|
+
|
|
44
|
+
The Overpass API allows you to query for OSM data by your own search criteria. For this purpose, it
|
|
45
|
+
has a specifically crafted query language: [Overpass
|
|
46
|
+
QL](https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL)
|
|
47
|
+
|
|
48
|
+
In addition to regular Overpass API queries one can use \`{{bbox}}\` to specify the bounding box
|
|
49
|
+
coordinates of the current map view.
|
|
50
|
+
|
|
54
51
|
## About
|
|
55
52
|
|
|
56
53
|
Ultra is built by Daniel Schep.
|
|
@@ -96,7 +93,7 @@ export class HelpModal extends HTMLElement {
|
|
|
96
93
|
let stylesHTML = "";
|
|
97
94
|
if (this.styles.length > 0) {
|
|
98
95
|
stylesHTML = `<div><h4>Style & Tile Providers</h4><ul>`;
|
|
99
|
-
const styles = new Set(this.styles.map(style => style[2]));
|
|
96
|
+
const styles = new Set(this.styles.map((style) => style[2]));
|
|
100
97
|
for (const style of styles) {
|
|
101
98
|
stylesHTML += `<li>${style}</li>`;
|
|
102
99
|
}
|
|
@@ -120,7 +117,7 @@ export class HelpModal extends HTMLElement {
|
|
|
120
117
|
<li>
|
|
121
118
|
Map powered by
|
|
122
119
|
<a target="_blank" href="https://github.com/maplibre/maplibre-gl-js/"
|
|
123
|
-
>
|
|
120
|
+
>maplibre-gl</a
|
|
124
121
|
> <code>${maplibreVersion}</code>
|
|
125
122
|
</li>
|
|
126
123
|
<li>
|
package/docs/index.md
CHANGED
|
@@ -16,45 +16,55 @@ It can easily visualize the following file/query types:
|
|
|
16
16
|
* [OSM XML](https://wiki.openstreetmap.org/wiki/OSM_XML)
|
|
17
17
|
* [OSM JSON](https://wiki.openstreetmap.org/wiki/OSM_JSON)
|
|
18
18
|
|
|
19
|
+
## Getting Started
|
|
20
|
+
All Ultra maps defined by a document containing an optional configuration and optional query. For
|
|
21
|
+
example, to query bicycle repair stations using the [Overpass API](https://overpass-api.de), you
|
|
22
|
+
can make a document containing an OverpassQL query:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
node[amenity=bicycle_repair_station]({{bbox}});
|
|
26
|
+
out;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or to place a red marker at Eiffel Tower using a GeoJSON document as the query:
|
|
30
|
+
```
|
|
31
|
+
---
|
|
32
|
+
style:
|
|
33
|
+
layers:
|
|
34
|
+
- type: symbol
|
|
35
|
+
icon-image: maki:marker
|
|
36
|
+
icon-color: red
|
|
37
|
+
icon-anchor: bottom
|
|
38
|
+
---
|
|
39
|
+
{
|
|
40
|
+
"type": "FeatureCollection",
|
|
41
|
+
"features": [
|
|
42
|
+
{
|
|
43
|
+
"type": "Feature",
|
|
44
|
+
"properties": {},
|
|
45
|
+
"geometry": {
|
|
46
|
+
"coordinates": [
|
|
47
|
+
2.2945119627238455,
|
|
48
|
+
48.85826635779679
|
|
49
|
+
],
|
|
50
|
+
"type": "Point"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
For more examples, see the [Examples](./Examples) and [MapLibre Examples](./MapLibre Examples)
|
|
58
|
+
sections.
|
|
59
|
+
|
|
19
60
|
## Configuration
|
|
20
61
|
|
|
21
62
|
Various aspects of Ultra, such as styling, can be
|
|
22
63
|
configured via [YAML front-matter](./yaml.md).
|
|
23
64
|
|
|
24
|
-
## Query Bounds
|
|
25
|
-
|
|
26
|
-
The following shortcuts are available to parameterize your queries:
|
|
27
|
-
|
|
28
|
-
| shortcut | description |
|
|
29
|
-
| -------- | ----------- |
|
|
30
|
-
| `{{bbox}}` | The map's bounds in the format expected by [Overpass](https://overpass-api.de) |
|
|
31
|
-
| `{{south}}` | The Southern Latitude of the map's bounds |
|
|
32
|
-
| `{{north}}` | The Northern Latitude of the map's bounds |
|
|
33
|
-
| `{{east}}` | The Eastern Longitude of the map's bounds |
|
|
34
|
-
| `{{west}}` | The Western Longitude of the map's bounds |
|
|
35
|
-
|
|
36
65
|
## Styling
|
|
37
66
|
|
|
38
67
|
Ultra supports styling using an extended version of the the
|
|
39
68
|
[MapLibre Style Spec](https://maplibre.org/maplibre-style-spec/).
|
|
40
69
|
|
|
41
70
|
See the [Styling](./style.md) section for more information.
|
|
42
|
-
|
|
43
|
-
## About
|
|
44
|
-
|
|
45
|
-
Ultra is built by Daniel Schep.
|
|
46
|
-
|
|
47
|
-
You can contact me on [Mastodon](https://mapstodon.space/@trailstash).
|
|
48
|
-
|
|
49
|
-
## Feedback, Bug Reports, Feature Requests
|
|
50
|
-
|
|
51
|
-
While Ultra has been in development for a while, it should still be considered
|
|
52
|
-
experimental.
|
|
53
|
-
|
|
54
|
-
If you would like to report a bug or provide other feedback, please do so in the project's
|
|
55
|
-
[Issue Tracker](https://gitlab.com/trailstash/ultra/-/issues).
|
|
56
|
-
|
|
57
|
-
## Source Code</h4>
|
|
58
|
-
|
|
59
|
-
The [source code](https://gitlab.com/trailstash/ultra) of this application is released under the
|
|
60
|
-
[MIT license](https://gitlab.com/trailstash/ultra/-/blob/master/LICENSE).
|
package/package.json
CHANGED
|
File without changes
|