mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-17 22:24:49 +02:00
Remove unused, add maprules documentation
This commit is contained in:
@@ -27,8 +27,12 @@ in the hash portion of the URL:
|
||||
* __`gpx`__ - A custom URL for loading a gpx track. Specifying a `gpx` parameter will
|
||||
automatically enable the gpx layer for display.<br/>
|
||||
_Example:_ `gpx=https://tasks.hotosm.org/project/592/task/16.gpx`
|
||||
* __`maprules`__ - connect to a [MapRules](https://github.com/radiant-maxar/maprules) service for enhanced tag validation.<br/>
|
||||
_Example:_ `maprules=https://path/to/file.json`
|
||||
* __`offset`__ - imagery offset in meters, formatted as `east,north`.<br/>
|
||||
_Example:_ `offset=-10,5`
|
||||
* __`presets`__ - load an external presets file.<br/>
|
||||
_Example:_ `presets=https://path/to/presets.json`
|
||||
* __`comment`__ - Prefills the changeset comment. Pass a url encoded string.<br/>
|
||||
_Example:_ `comment=CAR%20crisis%2C%20refugee%20areas%20in%20Cameroon`
|
||||
* __`source`__ - Prefills the changeset source. Pass a url encoded string.<br/>
|
||||
@@ -55,7 +59,9 @@ are available as regular URL query parameters:
|
||||
* __`background`__ - same as standalone
|
||||
* __`disable_features`__ - same as standalone
|
||||
* __`gpx`__ - same as standalone
|
||||
* __`maprules`__ - same as standalone
|
||||
* __`offset`__ - same as standalone
|
||||
* __`presets`__ - same as standalone
|
||||
* __`comment`__ - same as standalone
|
||||
* __`source`__ - same as standalone
|
||||
* __`hashtags`__ - same as standalone
|
||||
|
||||
+5
-2
@@ -33,9 +33,10 @@ _Breaking changes, which may affect downstream projects or sites that embed iD,
|
||||
|
||||
#### :mega: Release Highlights
|
||||
|
||||
* :zap: [KeepRight](https://wiki.openstreetmap.org/wiki/Keep_Right) data quality issues can now be browsed and resolved directly within iD. Many thanks to Thomas Hervey ([@thomas-hervey]) for his work on this!<br/>
|
||||
* :zap: You can now browse and fix [KeepRight](https://wiki.openstreetmap.org/wiki/Keep_Right) data quality issues directly within iD. Many thanks to Thomas Hervey ([@thomas-hervey]) for his work on this!<br/>
|
||||
_Open the Map Data pane (shortcut <kbd>F</kbd>) and select "KeepRight Issues" to view and fix map issues._
|
||||
* :triangular_ruler: [MapRules](https://github.com/radiant-maxar/maprules) <br/>
|
||||
* :triangular_ruler: We've added support for [MapRules](https://github.com/radiant-maxar/maprules), an API service and web interface for creating and sharing reusable presets and validation rules.<br/>
|
||||
_Check out the [maprules repo](https://github.com/radiant-maxar/maprules) for more info or watch Clarisse and Max's talk at SOTM-US [here](https://2018.stateofthemap.us/program/grossman-maprules.html)_
|
||||
* :mag: You can now quickly center and zoom the map on any feature, note, or data issue!<br/>
|
||||
_Click the new "zoom to" link on the sidebar under the preset icon, or press <kbd>Z</kbd> keyboard shortcut to focus on the selected feature._
|
||||
|
||||
@@ -45,6 +46,7 @@ _Click the new "zoom to" link on the sidebar under the preset icon, or press <kb
|
||||
|
||||
* Integrate with Keep Right QA tools ([#3452], [#5201], thanks [@thomas-hervey])
|
||||
* Show the location when geolocating the user ([#5587], [#5629], thanks [@maxgrossman])
|
||||
* Add MapRules service and parameters to use it ([#5617], thanks [@maxgrossman])
|
||||
* Add button to zoom to the selected feature ([#5169])
|
||||
* Display some preset fields conditionally based on tags ([#5581], [#5583])
|
||||
* Add validation check for generic feature names ([#5590])
|
||||
@@ -55,6 +57,7 @@ _Click the new "zoom to" link on the sidebar under the preset icon, or press <kb
|
||||
[#5590]: https://github.com/openstreetmap/iD/issues/5590
|
||||
[#5169]: https://github.com/openstreetmap/iD/issues/5169
|
||||
[#5738]: https://github.com/openstreetmap/iD/issues/5738
|
||||
[#5617]: https://github.com/openstreetmap/iD/issues/5617
|
||||
[#5581]: https://github.com/openstreetmap/iD/issues/5581
|
||||
[#5583]: https://github.com/openstreetmap/iD/issues/5583
|
||||
[#5587]: https://github.com/openstreetmap/iD/issues/5587
|
||||
|
||||
@@ -480,15 +480,14 @@ export function coreContext() {
|
||||
features = rendererFeatures(context);
|
||||
presets = presetIndex();
|
||||
|
||||
if (services.maprules && utilStringQs(window.location.hash).validations) {
|
||||
var validations = utilStringQs(window.location.hash).validations;
|
||||
d3_json(validations, function (err, mapcss) {
|
||||
if (services.maprules && utilStringQs(window.location.hash).maprules) {
|
||||
var maprules = utilStringQs(window.location.hash).maprules;
|
||||
d3_json(maprules, function (err, mapcss) {
|
||||
if (err) return;
|
||||
services.maprules.init(context.presets().areaKeys());
|
||||
_each(mapcss, function(mapcssSelector) {
|
||||
return services.maprules.addRule(mapcssSelector);
|
||||
});
|
||||
context.validationRules = true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,8 +9,6 @@ export { utilEditDistance } from './util';
|
||||
export { utilEntitySelector } from './util';
|
||||
export { utilEntityOrMemberSelector } from './util';
|
||||
export { utilEntityOrDeepMemberSelector } from './util';
|
||||
export { utilExternalPresets } from './util';
|
||||
export { utilExternalValidationRules } from './util';
|
||||
export { utilFastMouse } from './util';
|
||||
export { utilFunctor } from './util';
|
||||
export { utilGetAllNodes } from './util';
|
||||
|
||||
@@ -311,13 +311,6 @@ export function utilNoAuto(selection) {
|
||||
.attr('spellcheck', isText ? 'true' : 'false');
|
||||
}
|
||||
|
||||
export function utilExternalPresets() {
|
||||
return utilStringQs(window.location.hash).hasOwnProperty('presets');
|
||||
}
|
||||
|
||||
export function utilExternalValidationRules() {
|
||||
return utilStringQs(window.location.hash).hasOwnProperty('validations');
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/questions/194846/is-there-any-kind-of-hash-code-function-in-javascript
|
||||
// https://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/
|
||||
|
||||
Reference in New Issue
Block a user