- Allow additional file formats (via registerFileFormat, see README). For demonstration purposes, support for GeoJSON was added.
- Support for data urls (e.g. from an file-input field).
- Add a demo website (demo/), where queries can be tested. Overpass API server can be changed, alternatively files can be loaded (or uploaded). Code examples are generated, which can be used as templates for own applications.
- Add a .getMeta() which returns meta information about the server/file.
- Before, as bounds of the file (see .getMeta()) the bounding box of all present elements was calculated. Now, the bounding box from the file is used (or
null
).
- .BBoxQuery() now accept the option 'limit' - limit count of returned features.
- Improved cache handling - the query checks, if a super-set of that query has successfully been downloaded for the given area, which reduces the need for server requests. Example: if 'nwr[amenity]' for the given area has been downloaded, 'node[amenity=restaurant]' or 'way[amenity][cuisine]' are included.
- New filters:
(id:...)
, bbox(lat,lon,lat,lon)
,(around:...)
,(user:...)
,(uid:...)
,(poly:...)
,(if:...
),(newer:...)
. - For the
(if:...)
filter, the following evaluators functions are available: t[], is_tag(), is_closed(), id(), type(), version(), timestamp(), changeset(), uid(), user(), count_tags(), count_members(), count_by_role(), count_distinct_members(), count_distinct_by_role(), length(), is_closed() as well as the following operators: ternary...?...:...
, ||, &&, ==, !=, <, <=, >, >=, +, -, *, /, !, -.
- Bounds and memberBounds for .get() and .BBoxQuery() accept GeoJSON polygons/multipolygons
- .BBoxQuery() now accepts empty bounds (query the whole world)
- OverpassObject.intersect(): accept geojson polygon/multipolygon as boundary
- Improve support for multipolygons crossing lon180
- Decrease npm package size
- When the server fails with 429 error, gradually increase time gaps.
- Emit more events: 'start', 'load', 'reject', 'error'
- Improve loading referenced objects from 'out geom'
Support combining filters with 'and'.
Support for queries stretching longitude 180, resp. returning shifted geometries (to show an object shifted by 360 degrees).
Improved Filters.
All OverpassObjects (Node, Way, Relation) have new functions exportGeoJSON()
, exportOSMXML()
and exportOSMJSON()
which export the object in the specified format. Check the documentation for further details.
Calculate 'connectedPrev', 'connectedNext' and 'dir' for members of type way in relations.
overpass-frontend now internally uses the in-memory LokiJS database to look for matching objects in its cache. This also enables overpass-frontend to load a .osm or .osm.bz2 or .json file which works as an internal database - no queries to an Overpass API will be done in that case. Just pass a relative path to file name as url, when initializing OverpassFrontend.