@trailstash/ultra
Version:
A web based tool for making MapLibre GL maps with data from sources such as Overpass, GeoJSON, GPX, KML, TCX, etc
47 lines (31 loc) • 1.15 kB
Markdown
In order to allow for querying Overpass with the extents of the MapLibre viewport, Ultra
replaces any occurences of `{{bbox}}` in the query with the bounding box in the format expected by
the Overpass API.
For example:
```
[bbox:{{bbox}}];
nwr[shop];
out center;
```
### Other formats
If you need to specify your bounding box in a different format, for example for an HTTP GeoJSON API
or [Postpass](https://github.com/wookdpeck/postpass), you can specify just the specific lat/lon
vaulues or a comma-delimited set of values.
#### Short form
The short form is wrapped it double curly braces and consists of a string of one or more of the
letters `n`/`s`/`e`/`w` which corespond to the north/south-most latitudes and east/west-most
longitudes.
This means you can use simple 1-character shortcuts like:
- `{{s}}`
- `{{n}}`
- `{{e}}`
- `{{w}}`
Or a longer string like `{{wsen}}` which is equivalent to `{{w}}{{s}}{{e}}{{n}}`.
[Example](./Examples/alt-bbox-format.md)
#### Long form
The original long form of he individual min and max of both latitude and longitude are also
available:
- `{{south}}`
- `{{north}}`
- `{{east}}`
- `{{west}}`