This was taking a lot of time at app startup.
Instad now we resolve and index only the include and exclude parts.
We can still determine the valid locationSets at runtime in `locationSetsAt()`
by checking the `_locationIncludedIn` and `_locationExcludedIn` caches.
This also upgrades the locationManger to an ES6 class.
This also includes some hacky code in nsi.js so that the NSI will continue to work.
The NSI matcher can build its own location index, but it doesn't need to do this.
We monkeypatch a few of the matcher collections to work with the new LocationManager.
* previously, this check was based on the "fraction" of the respective tag value, which excluded more values for common tag keys, but fewer for less common ones.
* this sets a limit of 100 uses for undocumented tags (key=value pairs)
* tags with a wiki page are always allowed
* this harmonizes the heuristic of which tags to show between preset fields and the raw tag editor (previously, there was an additional `count > 10` filter present in combo fields, which is now uncessary)
closes#9227
Depending on which way is the longest, the new way is inserted into the
relation before the existing one. This case must be explicitly handled
for the relation to remain correct.
The operation is disabled when attempting to join ways which don't belong to identical sets of relations. Restriction relations are excluded, because they are already handled with slightly different logic.
Fixes#8674Fixes#8645Fixes#3825Fixes#1512
The pointer events use a different mechanism for counting clicks that doesn't
work when the tests are run in a real browser like Chrome. This change forces
iD to always use mouse events during testing, even in a real browser.
By default, the `rendererBackground` code will choose an initial imagery based on what
sources are available at the given map location. It looks like this code will fallback
to "custom" _before_ "none", and I noticed that in some cases it was trying to fetch
whatever source happened to be stored in the "custom" template in localStorage.
This commit adds an explicit window.location.hash in a few places to encourage the
background layer to be "none". Some tests do change the hash, so this isn't perfect.