- preset data is no longer bundled into iD.js
- some code pathways commented out re: external presets
- many changes so that tests can run without presets at start, or async
- still need to make sure fallbacks are always there (point, line, area, etc)
(closes#6391)
Default timeout of 2000 regularly exceeded, causing spurious test failures.
Even a random garbage collection pause can take more than 2 seconds.
- can't reliably use sinon.spy to tell whether a thing has been called,
so we listen for events instead and check server.requests()
- make sure to request the next page before dispatching `loadedImages` so
we can `server.respond()` to the request in the event handler if we want to
- also moves `localeDateString` in the openstreetcam service from parsing
code to display code, because it's very slow (we can just do this for the
images we look at, instead of all images we fetch)
- Many text expects are now wrapped in setTimeout, as the fetch
promises settle async now.
- This makes the tests somewhat brittle, and we should maybe consider
reworking some of them. For example it is very hard to perform
a test like `expect(spy).to.have.not.been.called` in an async way.
(We could instead inspect the fakeServer requests() to know this.)
- Also includes some trickery for osm.js, which uses d3-xml (fetch)
now for unauthenticated calls and osmauth (xhr) for authenticated calls
(closes#4890)
This lets iD request needed tiles outside of the viewport, for example to
properly straighten lines or validate features that may have unloaded
connections.
* Takes data directly from the Wikibase data items (OSM Wiki)
https://wiki.openstreetmap.org/wiki/OpenStreetMap:Data_Items
* Understands the difference in regions - e.g. will show different
images depending on the local settings
* Perf: Single request will get both the tag and key description
(closes#4297)
The previous approach split the viewport up by pixels, but each time the view
moved, the pixels would change, so it was not a stable selection of the
streetview data, and the markers would fight for position as the user moved
around.
This approach uses utilTiler to partition the view into stable tiles.