From 55715a482738df282003c72e20545abd19377208 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 25 Jan 2019 14:45:47 -0500 Subject: [PATCH 01/14] Try to dispatch an `accept` event on blur (re: #5752 - but does not close it) --- modules/ui/combobox.js | 68 ++++++++++++++++++++++------------------ test/spec/ui/combobox.js | 4 ++- 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/modules/ui/combobox.js b/modules/ui/combobox.js index e7192d259..fb27f7d15 100644 --- a/modules/ui/combobox.js +++ b/modules/ui/combobox.js @@ -1,3 +1,5 @@ +import _clone from 'lodash-es/clone'; + import { dispatch as d3_dispatch } from 'd3-dispatch'; @@ -11,11 +13,10 @@ import { utilGetSetValue, utilRebind, utilTriggerEvent } from '../util'; // This code assumes that the combobox values will not have duplicate entries. -// It is keyed on the `value` of the entry. -// Data should be an array of objects like: +// It is keyed on the `value` of the entry. Data should be an array of objects like: // [{ -// title: 'hover text', -// value: 'display text' +// value: 'display text', // required +// title: 'hover text' // optional // }, ...] var _comboHideTimerID; @@ -25,7 +26,8 @@ export function uiCombobox(context, klass) { var container = context.container(); var _suggestions = []; - var _values = []; + var _data = []; + var _fetched = {}; var _selected = null; var _canAutocomplete = true; var _caseSensitive = false; @@ -34,7 +36,7 @@ export function uiCombobox(context, klass) { var _tDown = 0; var _fetcher = function(val, cb) { - cb(_values.filter(function(d) { + cb(_data.filter(function(d) { return d.value .toString() .toLowerCase() @@ -114,6 +116,9 @@ export function uiCombobox(context, klass) { function blur() { + // Try to dispatch accept here, but no guarantee - see note in `accept` + accept(null, true); // null = datum, true = onBlur + _comboHideTimerID = window.setTimeout(hide, 75); } @@ -213,18 +218,6 @@ export function uiCombobox(context, klass) { } - // return the datum for the currently chosen value - function datum(val) { - for (var i = 0; i < _suggestions.length; i++) { - var suggestion = _suggestions[i]; - if (suggestion.value === val) { - return suggestion; - } - } - return null; - } - - // Called whenever the input value is changed (e.g. on typing) function change() { fetch(value(), function() { @@ -237,7 +230,7 @@ export function uiCombobox(context, klass) { } if (!_selected) { - _selected = datum(val); + _selected = val; } } @@ -261,7 +254,7 @@ export function uiCombobox(context, klass) { // try to determine previously selected index.. var index = -1; for (var i = 0; i < _suggestions.length; i++) { - if (_selected && _suggestions[i].value === _selected.value) { + if (_selected && _suggestions[i].value === _selected) { index = i; break; } @@ -269,8 +262,8 @@ export function uiCombobox(context, klass) { // pick new _selected index = Math.max(Math.min(index + dir, _suggestions.length - 1), 0); - _selected = _suggestions[index]; - input.property('value', _selected.value); + _selected = _suggestions[index].value; + input.property('value', _selected); } render(); @@ -316,8 +309,12 @@ export function uiCombobox(context, klass) { _cancelFetch = false; _fetcher.call(input, v, function(results) { + // already chose a value, don't overwrite or autocomplete it if (_cancelFetch) return; + _suggestions = results; + results.forEach(function(d) { _fetched[d.value] = d; }); + if (cb) { cb(); } @@ -354,7 +351,7 @@ export function uiCombobox(context, klass) { var bestVal = _suggestions[bestIndex].value; input.property('value', bestVal); input.node().setSelectionRange(val.length, bestVal.length); - return _suggestions[bestIndex]; + return bestVal; } } @@ -379,10 +376,10 @@ export function uiCombobox(context, klass) { options.enter() .append('a') .attr('class', 'combobox-option') - .text(function(d) { return d.value; }) - .merge(options) .attr('title', function(d) { return d.title; }) - .classed('selected', function(d) { return d === _selected; }) + .text(function(d) { return d.display || d.value; }) + .merge(options) + .classed('selected', function(d) { return d.value === _selected; }) .on('click.combobox', accept) .order(); @@ -398,7 +395,7 @@ export function uiCombobox(context, klass) { // Dispatches an 'accept' event // Then hides the combobox. - function accept(d) { + function accept(d, onBlur) { _cancelFetch = true; var thiz = input.node(); @@ -411,7 +408,18 @@ export function uiCombobox(context, klass) { var val = utilGetSetValue(input); thiz.setSelectionRange(val.length, val.length); - d = datum(val); + d = _fetched[val]; + + // Try to dispatch `accept` onBlur, but only if we matched field to fetched datum. + // Surprisingly, this might happen: + // - user accepts a value in raw tag editor by pressing 'tab' + // - we dispatch `accept` + // - value change kicks off an event cascade *which replaces the combo* + // - 'tab' takes the user to the next field, blurring the current one + // - we get here, but the combo is new and has no datum yet + // - so just return because there's no reason to fire another `accept` with no datum + if (onBlur && !d) return; + dispatch.call('accept', thiz, d, val); hide(); } @@ -451,8 +459,8 @@ export function uiCombobox(context, klass) { }; combobox.data = function(val) { - if (!arguments.length) return _values; - _values = val; + if (!arguments.length) return _data; + _data = val; return combobox; }; diff --git a/test/spec/ui/combobox.js b/test/spec/ui/combobox.js index 972543b5b..20a0fe965 100644 --- a/test/spec/ui/combobox.js +++ b/test/spec/ui/combobox.js @@ -105,7 +105,7 @@ describe('uiCombobox', function() { expect(body.selectAll('.combobox-option').nodes()[2].text).to.equal('Baz'); }); - it('shows all entries when clicking on the caret', function() { + it('shows all entries when activating the combo', function() { input.property('value', 'foobar').call(combobox.data(data)); focusTypeahead(input); simulateKeypress('↓'); @@ -238,6 +238,7 @@ describe('uiCombobox', function() { it('emits accepted event with selected datum on ⇥', function(done) { combobox.on('accept', function(d) { expect(d).to.eql({title: 'bar', value: 'bar'}); + combobox.on('accept', null); done(); }); input.call(combobox.data(data)); @@ -249,6 +250,7 @@ describe('uiCombobox', function() { it('emits accepted event with selected datum on ↩', function(done) { combobox.on('accept', function(d) { expect(d).to.eql({title: 'bar', value: 'bar'}); + combobox.on('accept', null); done(); }); input.call(combobox.data(data)); From 5d6e331635feaef2ce50300477c6b9b2ac7168a6 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 25 Jan 2019 16:16:07 -0500 Subject: [PATCH 02/14] Don't erase name field when tabbing from it (closes #5760) --- modules/ui/fields/localized.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/ui/fields/localized.js b/modules/ui/fields/localized.js index b99b0a758..f2e6e0b38 100644 --- a/modules/ui/fields/localized.js +++ b/modules/ui/fields/localized.js @@ -223,10 +223,12 @@ export function uiFieldLocalized(field, context) { // NOTE: split/join on en-dash, not a hypen (to avoid conflict with fr - nl names in Brussels etc) var name = utilGetSetValue(input); var parts = name.split(' – '); - parts.pop(); - name = parts.join(' – '); - utilGetSetValue(input, name); - dispatch.call('change', this, { name: name }); + if (parts.length > 1) { + parts.pop(); + var name = parts.join(' – '); + utilGetSetValue(input, name); + dispatch.call('change', this, { name: name }); + } } From 18d71448be9d39a06f3fdef0c2fb63e085061923 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 25 Jan 2019 16:23:46 -0500 Subject: [PATCH 03/14] pacify eslint --- modules/ui/combobox.js | 2 -- modules/ui/fields/localized.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/ui/combobox.js b/modules/ui/combobox.js index fb27f7d15..be9702244 100644 --- a/modules/ui/combobox.js +++ b/modules/ui/combobox.js @@ -1,5 +1,3 @@ -import _clone from 'lodash-es/clone'; - import { dispatch as d3_dispatch } from 'd3-dispatch'; diff --git a/modules/ui/fields/localized.js b/modules/ui/fields/localized.js index f2e6e0b38..566eb0f63 100644 --- a/modules/ui/fields/localized.js +++ b/modules/ui/fields/localized.js @@ -225,7 +225,7 @@ export function uiFieldLocalized(field, context) { var parts = name.split(' – '); if (parts.length > 1) { parts.pop(); - var name = parts.join(' – '); + name = parts.join(' – '); utilGetSetValue(input, name); dispatch.call('change', this, { name: name }); } From b9444ab9911b6935a01d3d2d024744328e7d884c Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sat, 26 Jan 2019 13:22:31 -0500 Subject: [PATCH 04/14] Restore hand cursor on dropdown carat (closes #5769) This change allows pointer events to flow to the caret, and forwards them back to the combo input. Also renames several event handlers for clarity, and increases the double-click detection threshold. --- css/80_app.css | 1 - modules/ui/combobox.js | 84 +++++++++++++++++++++------------------- test/spec/ui/combobox.js | 4 +- 3 files changed, 47 insertions(+), 42 deletions(-) diff --git a/css/80_app.css b/css/80_app.css index dacc04ae1..530e7cf64 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -1949,7 +1949,6 @@ div.combobox { margin-left: -30px; vertical-align: top; cursor: pointer; - pointer-events: none; } [dir='rtl'] .combobox-caret { margin-left: 0; diff --git a/modules/ui/combobox.js b/modules/ui/combobox.js index be9702244..cc98f4ca1 100644 --- a/modules/ui/combobox.js +++ b/modules/ui/combobox.js @@ -47,43 +47,49 @@ export function uiCombobox(context, klass) { input .classed('combobox-input', true) - .on('focus.combobox', focus) - .on('blur.combobox', blur) - .on('keydown.combobox', keydown) - .on('keyup.combobox', keyup) - .on('input.combobox', change) - .on('mousedown.combobox', mousedown) - .each(addCaret); + .on('focus.combo-input', focus) + .on('blur.combo-input', blur) + .on('keydown.combo-input', keydown) + .on('keyup.combo-input', keyup) + .on('input.combo-input', change) + .on('mousedown.combo-input', mousedown) + .each(function() { + var parent = this.parentNode; + var sibling = this.nextSibling; - - function addCaret() { - var parent = this.parentNode; - var sibling = this.nextSibling; - - d3_select(parent).selectAll('.combobox-caret') - .filter(function(d) { return d === input.node(); }) - .data([input.node()]) - .enter() - .insert('div', function() { return sibling; }) - .attr('class', 'combobox-caret'); - } + d3_select(parent).selectAll('.combobox-caret') + .filter(function(d) { return d === input.node(); }) + .data([input.node()]) + .enter() + .insert('div', function() { return sibling; }) + .attr('class', 'combobox-caret') + .on('mousedown.combo-caret mouseup.combo-caret', function() { + var e2 = new MouseEvent(d3_event.type, d3_event); + d3_event.preventDefault(); // don't steal focus from input + input.node().dispatchEvent(e2); // send events to the input instead + }); + }); function mousedown() { if (d3_event.button !== 0) return; // left click only + _tDown = +new Date(); + // clear selection var start = input.property('selectionStart'); var end = input.property('selectionEnd'); - if (start !== end) return; // exit if user is deselecting + if (start !== end) { + var val = utilGetSetValue(input); + input.node().setSelectionRange(val.length, val.length); + return; + } - _tDown = +new Date(); - input.on('mouseup.combobox', mouseup); + input.on('mouseup.combo-input', mouseup); } function mouseup() { - input.on('mouseup.combobox', null); - + input.on('mouseup.combo-input', null); if (d3_event.button !== 0) return; // left click only var start = input.property('selectionStart'); @@ -100,7 +106,7 @@ export function uiCombobox(context, klass) { show(); render(); }); - }, 75); + }, 250); } else { hide(); @@ -131,13 +137,13 @@ export function uiCombobox(context, klass) { .style('position', 'absolute') .style('display', 'block') .style('left', '0px') - .on('mousedown.combobox', function () { + .on('mousedown.combo-container', function () { // prevent moving focus out of the input field d3_event.preventDefault(); }); d3_select('body') - .on('scroll.combobox', render, true); + .on('scroll.combo-scroll', render, true); } @@ -151,7 +157,7 @@ export function uiCombobox(context, klass) { .remove(); d3_select('body') - .on('scroll.combobox', null); + .on('scroll.combo-scroll', null); } @@ -165,10 +171,10 @@ export function uiCombobox(context, klass) { d3_event.stopPropagation(); _selected = null; render(); - input.on('input.combobox', function() { + input.on('input.combo-input', function() { var start = input.property('selectionStart'); input.node().setSelectionRange(start, start); - input.on('input.combobox', change); + input.on('input.combo-input', change); }); break; @@ -378,7 +384,7 @@ export function uiCombobox(context, klass) { .text(function(d) { return d.display || d.value; }) .merge(options) .classed('selected', function(d) { return d.value === _selected; }) - .on('click.combobox', accept) + .on('click.combo-option', accept) .order(); var node = attachTo ? attachTo.node() : input.node(); @@ -481,15 +487,15 @@ export function uiCombobox(context, klass) { uiCombobox.off = function(input) { input - .on('focus.combobox', null) - .on('blur.combobox', null) - .on('keydown.combobox', null) - .on('keyup.combobox', null) - .on('input.combobox', null) - .on('mousedown.combobox', null) - .on('mouseup.combobox', null); + .on('focus.combo-input', null) + .on('blur.combo-input', null) + .on('keydown.combo-input', null) + .on('keyup.combo-input', null) + .on('input.combo-input', null) + .on('mousedown.combo-input', null) + .on('mouseup.combo-input', null); d3_select('body') - .on('scroll.combobox', null); + .on('scroll.combo-scroll', null); }; diff --git a/test/spec/ui/combobox.js b/test/spec/ui/combobox.js index 20a0fe965..978ff62c8 100644 --- a/test/spec/ui/combobox.js +++ b/test/spec/ui/combobox.js @@ -18,7 +18,7 @@ describe('uiCombobox', function() { iD.d3.customEvent(happen.makeEvent({ type: 'keydown', keyCode: keyCode - }), input.on('keydown.combobox')); + }), input.on('keydown.combo-input')); switch (key) { case '⇥': @@ -80,7 +80,7 @@ describe('uiCombobox', function() { function focusTypeahead(input) { input.node().focus(); - d3.customEvent(happen.makeEvent('focus'), input.on('focus.combobox')); + d3.customEvent(happen.makeEvent('focus'), input.on('focus.combo-input')); } it('adds the combobox-input class', function() { From 1a3a411507be6f616e6b11bcc04aa641f7cb405a Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sun, 27 Jan 2019 13:19:16 -0500 Subject: [PATCH 05/14] Restore basin preset (closes #5758) --- data/presets.yaml | 5 ++++ data/presets/presets.json | 1 + data/presets/presets/natural/water/basin.json | 27 +++++++++++++++++++ data/taginfo.json | 1 + dist/locales/en.json | 4 +++ 5 files changed, 38 insertions(+) create mode 100644 data/presets/presets/natural/water/basin.json diff --git a/data/presets.yaml b/data/presets.yaml index 75e7c401c..b5b88d6ae 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -5098,6 +5098,11 @@ en: # natural=water name: Water terms: '' + natural/water/basin: + # 'natural=water, water=basin' + name: Basin + # 'terms: detention,drain,overflow,rain,retention' + terms: '' natural/water/canal: # 'natural=water, water=canal' name: Canal diff --git a/data/presets/presets.json b/data/presets/presets.json index 88540d925..6bc98288c 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -661,6 +661,7 @@ "natural/tree": {"icon": "maki-park", "fields": ["leaf_type_singular", "leaf_cycle_singular", "denotation"], "geometry": ["point", "vertex"], "tags": {"natural": "tree"}, "terms": [], "name": "Tree"}, "natural/volcano": {"icon": "maki-volcano", "fields": ["name", "elevation", "volcano/status", "volcano/type"], "geometry": ["point", "vertex"], "tags": {"natural": "volcano"}, "terms": ["mountain", "crater"], "name": "Volcano"}, "natural/water": {"icon": "maki-water", "fields": ["water"], "geometry": ["area"], "tags": {"natural": "water"}, "name": "Water"}, + "natural/water/basin": {"icon": "maki-water", "fields": ["name", "basin", "intermittent_yes"], "geometry": ["area"], "tags": {"natural": "water", "water": "basin"}, "reference": {"key": "water", "value": "basin"}, "terms": ["detention", "drain", "overflow", "rain", "retention"], "name": "Basin"}, "natural/water/canal": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "canal"}, "reference": {"key": "water", "value": "canal"}, "name": "Canal"}, "natural/water/lake": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "lake"}, "reference": {"key": "water", "value": "lake"}, "terms": ["lakelet", "loch", "mere"], "name": "Lake"}, "natural/water/pond": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "pond"}, "reference": {"key": "water", "value": "pond"}, "terms": ["lakelet", "millpond", "tarn", "pool", "mere"], "name": "Pond"}, diff --git a/data/presets/presets/natural/water/basin.json b/data/presets/presets/natural/water/basin.json new file mode 100644 index 000000000..f7775db64 --- /dev/null +++ b/data/presets/presets/natural/water/basin.json @@ -0,0 +1,27 @@ +{ + "icon": "maki-water", + "fields": [ + "name", + "basin", + "intermittent_yes" + ], + "geometry": [ + "area" + ], + "tags": { + "natural": "water", + "water": "basin" + }, + "reference": { + "key": "water", + "value": "basin" + }, + "terms": [ + "detention", + "drain", + "overflow", + "rain", + "retention" + ], + "name": "Basin" +} diff --git a/data/taginfo.json b/data/taginfo.json index 4942d5b54..005b923ab 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -645,6 +645,7 @@ {"key": "natural", "value": "tree_row", "description": "🄿 Tree Row", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/park-15.svg?sanitize=true"}, {"key": "natural", "value": "tree", "description": "🄿 Tree", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/park-15.svg?sanitize=true"}, {"key": "natural", "value": "volcano", "description": "🄿 Volcano", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/volcano-15.svg?sanitize=true"}, + {"key": "water", "value": "basin", "description": "🄿 Basin", "object_types": ["area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/water-15.svg?sanitize=true"}, {"key": "water", "value": "canal", "description": "🄿 Canal", "object_types": ["area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/water-15.svg?sanitize=true"}, {"key": "water", "value": "lake", "description": "🄿 Lake", "object_types": ["area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/water-15.svg?sanitize=true"}, {"key": "water", "value": "pond", "description": "🄿 Pond", "object_types": ["area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/water-15.svg?sanitize=true"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index 666844530..a76545964 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -6248,6 +6248,10 @@ "name": "Water", "terms": "" }, + "natural/water/basin": { + "name": "Basin", + "terms": "detention,drain,overflow,rain,retention" + }, "natural/water/canal": { "name": "Canal", "terms": "" From 9febb34b53a0a27f2ed886c1afdd0a0a360d0bcc Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sun, 27 Jan 2019 13:23:04 -0500 Subject: [PATCH 06/14] Add "riverbank" for search term for River area preset --- data/presets.yaml | 2 +- data/presets/presets.json | 2 +- data/presets/presets/natural/water/river.json | 1 + dist/locales/en.json | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/presets.yaml b/data/presets.yaml index b5b88d6ae..109c2550f 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -5124,7 +5124,7 @@ en: natural/water/river: # 'natural=water, water=river' name: River - # 'terms: beck,branch,brook,course,creek,estuary,rill,rivulet,run,runnel,stream,tributary,watercourse' + # 'terms: beck,branch,brook,course,creek,estuary,rill,riverbank,rivulet,run,runnel,stream,tributary,watercourse' terms: '' natural/water/stream: # 'natural=water, water=stream' diff --git a/data/presets/presets.json b/data/presets/presets.json index 6bc98288c..f4fdc4cfe 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -666,7 +666,7 @@ "natural/water/lake": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "lake"}, "reference": {"key": "water", "value": "lake"}, "terms": ["lakelet", "loch", "mere"], "name": "Lake"}, "natural/water/pond": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "pond"}, "reference": {"key": "water", "value": "pond"}, "terms": ["lakelet", "millpond", "tarn", "pool", "mere"], "name": "Pond"}, "natural/water/reservoir": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "reservoir"}, "reference": {"key": "water", "value": "reservoir"}, "name": "Reservoir"}, - "natural/water/river": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "river"}, "reference": {"key": "water", "value": "river"}, "terms": ["beck", "branch", "brook", "course", "creek", "estuary", "rill", "rivulet", "run", "runnel", "stream", "tributary", "watercourse"], "name": "River"}, + "natural/water/river": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "river"}, "reference": {"key": "water", "value": "river"}, "terms": ["beck", "branch", "brook", "course", "creek", "estuary", "rill", "riverbank", "rivulet", "run", "runnel", "stream", "tributary", "watercourse"], "name": "River"}, "natural/water/stream": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "stream"}, "reference": {"key": "water", "value": "stream"}, "terms": ["beck", "branch", "brook", "burn", "course", "creek", "current", "drift", "flood", "flow", "freshet", "race", "rill", "rindle", "rivulet", "run", "runnel", "rush", "spate", "spritz", "surge", "tide", "torrent", "tributary", "watercourse"], "name": "Stream"}, "natural/wetland": {"icon": "maki-wetland", "fields": ["wetland"], "geometry": ["point", "area"], "tags": {"natural": "wetland"}, "terms": ["bog", "marsh", "reedbed", "swamp", "tidalflat"], "name": "Wetland"}, "natural/wood": {"icon": "maki-park-alt1", "fields": ["name", "leaf_type", "leaf_cycle"], "geometry": ["point", "area"], "tags": {"natural": "wood"}, "terms": ["tree"], "name": "Wood"}, diff --git a/data/presets/presets/natural/water/river.json b/data/presets/presets/natural/water/river.json index 4b22a554a..6ee23d23b 100644 --- a/data/presets/presets/natural/water/river.json +++ b/data/presets/presets/natural/water/river.json @@ -23,6 +23,7 @@ "creek", "estuary", "rill", + "riverbank", "rivulet", "run", "runnel", diff --git a/dist/locales/en.json b/dist/locales/en.json index a76545964..d5e57dd26 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -6270,7 +6270,7 @@ }, "natural/water/river": { "name": "River", - "terms": "beck,branch,brook,course,creek,estuary,rill,rivulet,run,runnel,stream,tributary,watercourse" + "terms": "beck,branch,brook,course,creek,estuary,rill,riverbank,rivulet,run,runnel,stream,tributary,watercourse" }, "natural/water/stream": { "name": "Stream", From 7cdca993e80d70895f8928af682eda97d0da929a Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sun, 27 Jan 2019 20:53:47 -0500 Subject: [PATCH 07/14] Move "Name" from `fields` to `moreFields` on Other vertex preset (closes #5812) --- data/presets/presets.json | 2 +- data/presets/presets/vertex.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/presets/presets.json b/data/presets/presets.json index f4fdc4cfe..f4adb7340 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -1055,7 +1055,7 @@ "type/route/tram": {"icon": "iD-route-tram", "fields": ["name", "ref_route", "operator", "network", "to", "from"], "geometry": ["relation"], "tags": {"type": "route", "route": "tram"}, "name": "Tram Route"}, "type/site": {"icon": "iD-relation", "fields": ["name", "site"], "geometry": ["relation"], "tags": {"type": "site"}, "name": "Site"}, "type/waterway": {"icon": "iD-route-water", "fields": ["name", "waterway", "ref"], "geometry": ["relation"], "tags": {"type": "waterway"}, "name": "Waterway"}, - "vertex": {"fields": ["name"], "geometry": ["vertex"], "tags": {}, "name": "Other", "matchScore": 0.1}, + "vertex": {"moreFields": ["name"], "geometry": ["vertex"], "tags": {}, "name": "Other", "matchScore": 0.1}, "waterway/riverbank": {"icon": "maki-water", "geometry": ["area"], "tags": {"waterway": "riverbank"}, "name": "Riverbank", "searchable": false}, "waterway/boatyard": {"icon": "maki-harbor", "fields": ["name", "operator"], "moreFields": ["address", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["area", "vertex", "point"], "tags": {"waterway": "boatyard"}, "name": "Boatyard"}, "waterway/canal": {"icon": "iD-waterway-canal", "fields": ["name", "width", "intermittent"], "geometry": ["line"], "tags": {"waterway": "canal"}, "name": "Canal"}, diff --git a/data/presets/presets/vertex.json b/data/presets/presets/vertex.json index f49857d8c..85c3ddbc6 100644 --- a/data/presets/presets/vertex.json +++ b/data/presets/presets/vertex.json @@ -1,5 +1,5 @@ { - "fields": [ + "moreFields": [ "name" ], "geometry": [ From 3a48b3b57c947d5372a71a851a5a30294d6d53ca Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 28 Jan 2019 08:32:03 -0500 Subject: [PATCH 08/14] Add inscription field to the bench preset Add building_area field to the attraction/carousel and attraction/dark_ride presets --- data/presets/presets.json | 6 +++--- data/presets/presets/amenity/bench.json | 5 +++-- data/presets/presets/attraction/carousel.json | 4 ++++ data/presets/presets/attraction/dark_ride.json | 4 ++++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/data/presets/presets.json b/data/presets/presets.json index f4adb7340..997469e61 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -53,7 +53,7 @@ "amenity/bank": {"icon": "maki-bank", "fields": ["name", "operator", "address", "building_area", "atm", "drive_through"], "moreFields": ["opening_hours", "currency_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["credit union", "check", "deposit", "fund", "investment", "repository", "reserve", "safe", "savings", "stock", "treasury", "trust", "vault"], "tags": {"amenity": "bank"}, "name": "Bank"}, "amenity/bar": {"icon": "maki-bar", "fields": ["name", "address", "building_area", "outdoor_seating", "brewery"], "moreFields": ["smoking", "opening_hours", "payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["dive", "beer", "bier", "booze"], "tags": {"amenity": "bar"}, "name": "Bar"}, "amenity/bbq": {"icon": "maki-bbq", "fields": ["covered", "fuel", "access_simple"], "moreFields": ["lit"], "geometry": ["point"], "terms": ["bbq", "grill"], "tags": {"amenity": "bbq"}, "name": "Barbecue/Grill"}, - "amenity/bench": {"icon": "temaki-bench", "fields": ["backrest", "material", "seats", "colour"], "moreFields": ["lit", "access_simple"], "geometry": ["point", "vertex", "line"], "terms": ["seat"], "tags": {"amenity": "bench"}, "name": "Bench"}, + "amenity/bench": {"icon": "temaki-bench", "fields": ["backrest", "material", "seats", "colour"], "moreFields": ["access_simple", "inscription", "lit"], "geometry": ["point", "vertex", "line"], "terms": ["seat"], "tags": {"amenity": "bench"}, "name": "Bench"}, "amenity/bicycle_parking": {"icon": "maki-bicycle", "fields": ["bicycle_parking", "capacity", "operator", "covered", "access_simple", "fee"], "moreFields": ["payment_multi"], "geometry": ["point", "vertex", "area"], "terms": ["bike"], "tags": {"amenity": "bicycle_parking"}, "name": "Bicycle Parking"}, "amenity/bicycle_rental": {"icon": "maki-bicycle", "fields": ["capacity", "network", "operator", "fee", "payment_multi"], "moreFields": ["opening_hours", "address", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "vertex", "area"], "terms": ["bike"], "tags": {"amenity": "bicycle_rental"}, "name": "Bicycle Rental"}, "amenity/bicycle_repair_station": {"icon": "maki-bicycle", "fields": ["operator", "brand", "opening_hours", "fee", "service/bicycle"], "moreFields": ["payment_multi"], "geometry": ["point", "vertex"], "terms": ["bike", "repair", "chain", "pump"], "tags": {"amenity": "bicycle_repair_station"}, "name": "Bicycle Repair Tool Stand"}, @@ -215,8 +215,8 @@ "attraction/big_wheel": {"icon": "maki-amusement-park", "fields": ["{attraction}", "height"], "geometry": ["point"], "terms": ["ferris wheel", "theme park", "amusement ride"], "tags": {"attraction": "big_wheel"}, "name": "Big Wheel"}, "attraction/bumper_car": {"icon": "maki-car", "geometry": ["point", "area"], "terms": ["theme park", "dodgem cars", "autoscooter"], "tags": {"attraction": "bumper_car"}, "name": "Bumper Car"}, "attraction/bungee_jumping": {"icon": "maki-pitch", "fields": ["{attraction}", "height"], "geometry": ["point", "area"], "terms": ["theme park", "bungy jumping", "jumping platform"], "tags": {"attraction": "bungee_jumping"}, "name": "Bungee Jumping"}, - "attraction/carousel": {"icon": "temaki-amusement_park", "geometry": ["point", "area"], "terms": ["theme park", "roundabout", "merry-go-round", "galloper", "jumper", "horseabout", "flying horses"], "tags": {"attraction": "carousel"}, "name": "Carousel"}, - "attraction/dark_ride": {"icon": "maki-rail-metro", "geometry": ["point", "line", "area"], "terms": ["theme park", "ghost train"], "tags": {"attraction": "dark_ride"}, "name": "Dark Ride"}, + "attraction/carousel": {"icon": "temaki-amusement_park", "fields": ["{attraction}", "building_area"], "geometry": ["point", "area"], "terms": ["theme park", "roundabout", "merry-go-round", "galloper", "jumper", "horseabout", "flying horses"], "tags": {"attraction": "carousel"}, "name": "Carousel"}, + "attraction/dark_ride": {"icon": "maki-rail-metro", "fields": ["{attraction}", "building_area"], "geometry": ["point", "line", "area"], "terms": ["theme park", "ghost train"], "tags": {"attraction": "dark_ride"}, "name": "Dark Ride"}, "attraction/drop_tower": {"icon": "temaki-tower", "fields": ["{attraction}", "height"], "geometry": ["point", "area"], "terms": ["theme park", "amusement ride", "gondola", "tower", "big drop"], "tags": {"attraction": "drop_tower"}, "name": "Drop Tower"}, "attraction/maze": {"icon": "maki-amusement-park", "geometry": ["point", "area"], "terms": ["theme park", "amusement ride", "labyrinth"], "tags": {"attraction": "maze"}, "name": "Maze"}, "attraction/pirate_ship": {"icon": "maki-danger", "geometry": ["point"], "terms": ["theme park", "carnival ride", "amusement ride"], "tags": {"attraction": "pirate_ship"}, "name": "Pirate Ship"}, diff --git a/data/presets/presets/amenity/bench.json b/data/presets/presets/amenity/bench.json index 0342ef3c0..f41127a3a 100644 --- a/data/presets/presets/amenity/bench.json +++ b/data/presets/presets/amenity/bench.json @@ -7,8 +7,9 @@ "colour" ], "moreFields": [ - "lit", - "access_simple" + "access_simple", + "inscription", + "lit" ], "geometry": [ "point", diff --git a/data/presets/presets/attraction/carousel.json b/data/presets/presets/attraction/carousel.json index ce10cb815..7c513f9cc 100644 --- a/data/presets/presets/attraction/carousel.json +++ b/data/presets/presets/attraction/carousel.json @@ -1,5 +1,9 @@ { "icon": "temaki-amusement_park", + "fields": [ + "{attraction}", + "building_area" + ], "geometry": [ "point", "area" diff --git a/data/presets/presets/attraction/dark_ride.json b/data/presets/presets/attraction/dark_ride.json index 9929aad22..406f25433 100644 --- a/data/presets/presets/attraction/dark_ride.json +++ b/data/presets/presets/attraction/dark_ride.json @@ -1,5 +1,9 @@ { "icon": "maki-rail-metro", + "fields": [ + "{attraction}", + "building_area" + ], "geometry": [ "point", "line", From 1066f8f78886b7fd2dccabcf389cf0e2f257bd9f Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 28 Jan 2019 08:52:20 -0500 Subject: [PATCH 09/14] Fix issue where preset browser would show after continuing a line (close #5770) --- modules/behavior/draw_way.js | 4 ++-- modules/modes/draw_line.js | 5 +++-- modules/operations/continue.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/behavior/draw_way.js b/modules/behavior/draw_way.js index e99da7b32..d980bc26b 100644 --- a/modules/behavior/draw_way.js +++ b/modules/behavior/draw_way.js @@ -317,8 +317,8 @@ export function behaviorDrawWay(context, wayId, index, mode, startGraph) { window.setTimeout(function() { context.map().dblclickEnable(true); }, 1000); - - context.enter(modeSelect(context, [wayId]).newFeature(true)); + var isNewFeature = !mode.isContinuing; + context.enter(modeSelect(context, [wayId]).newFeature(isNewFeature)); }; diff --git a/modules/modes/draw_line.js b/modules/modes/draw_line.js index a9f5b0e49..9c6fc0109 100644 --- a/modules/modes/draw_line.js +++ b/modules/modes/draw_line.js @@ -2,7 +2,7 @@ import { t } from '../util/locale'; import { behaviorDrawWay } from '../behavior'; -export function modeDrawLine(context, wayID, startGraph, affix) { +export function modeDrawLine(context, wayID, startGraph, affix, continuing) { var mode = { button: 'line', id: 'draw-line' @@ -10,13 +10,14 @@ export function modeDrawLine(context, wayID, startGraph, affix) { var behavior; + mode.isContinuing = continuing; mode.enter = function() { var way = context.entity(wayID); var index = (affix === 'prefix') ? 0 : undefined; var headID = (affix === 'prefix') ? way.first() : way.last(); - behavior = behaviorDrawWay(context, wayID, index, mode, startGraph) + behavior = behaviorDrawWay(context, wayID, index, mode, startGraph, continuing) .tail(t('modes.draw_line.tail')); var addNode = behavior.addNode; diff --git a/modules/operations/continue.js b/modules/operations/continue.js index 53c92db7a..37ccdd40d 100644 --- a/modules/operations/continue.js +++ b/modules/operations/continue.js @@ -27,7 +27,7 @@ export function operationContinue(selectedIDs, context) { var operation = function() { var candidate = candidateWays()[0]; context.enter( - modeDrawLine(context, candidate.id, context.graph(), candidate.affix(vertex.id)) + modeDrawLine(context, candidate.id, context.graph(), candidate.affix(vertex.id), true) ); }; From 3903e9347eb5abbb5a6dba1a747b5860f5d23b71 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 28 Jan 2019 09:04:36 -0500 Subject: [PATCH 10/14] Add covered field to moreFields of various rail presets --- data/presets/presets.json | 16 ++++++++-------- data/presets/presets/railway/abandoned.json | 3 +++ data/presets/presets/railway/disused.json | 3 +++ data/presets/presets/railway/light_rail.json | 5 +++-- data/presets/presets/railway/miniature.json | 5 +++-- data/presets/presets/railway/monorail.json | 5 +++-- data/presets/presets/railway/narrow_gauge.json | 5 +++-- data/presets/presets/railway/rail.json | 5 +++-- data/presets/presets/railway/tram.json | 5 +++-- 9 files changed, 32 insertions(+), 20 deletions(-) diff --git a/data/presets/presets.json b/data/presets/presets.json index 997469e61..acc95bede 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -811,25 +811,25 @@ "railway/platform": {"icon": "iD-highway-footway", "fields": ["name", "ref_platform", "surface", "lit", "shelter"], "geometry": ["line", "area"], "tags": {"railway": "platform"}, "name": "Train Stop / Platform", "searchable": false}, "railway/station": {"icon": "maki-rail", "fields": ["name", "network", "operator", "address", "building_area", "internet_access", "internet_access/fee", "internet_access/ssid"], "geometry": ["point", "vertex", "area"], "tags": {"railway": "station"}, "terms": ["train station", "station"], "name": "Train Station", "searchable": false}, "railway/tram_stop": {"icon": "temaki-tram", "fields": ["name", "network", "operator"], "geometry": ["vertex"], "tags": {"railway": "tram_stop"}, "terms": ["light rail", "streetcar", "tram", "trolley"], "name": "Tram Stopping Position", "searchable": false}, - "railway/abandoned": {"icon": "iD-railway-abandoned", "fields": ["name", "structure", "service_rail", "usage_rail"], "geometry": ["line"], "tags": {"railway": "abandoned"}, "terms": [], "name": "Abandoned Railway"}, + "railway/abandoned": {"icon": "iD-railway-abandoned", "fields": ["name", "structure", "service_rail", "usage_rail"], "moreFields": ["covered"], "geometry": ["line"], "tags": {"railway": "abandoned"}, "terms": [], "name": "Abandoned Railway"}, "railway/buffer_stop": {"icon": "temaki-buffer_stop", "geometry": ["vertex"], "tags": {"railway": "buffer_stop"}, "terms": ["stop", "halt", "buffer"], "name": "Buffer Stop"}, "railway/crossing": {"icon": "temaki-pedestrian", "geometry": ["vertex"], "tags": {"railway": "crossing"}, "terms": ["crossing", "pedestrian crossing", "railroad crossing", "level crossing", "grade crossing", "path through railroad", "train crossing"], "name": "Railway Crossing (Path)"}, "railway/derail": {"icon": "maki-roadblock", "geometry": ["vertex"], "tags": {"railway": "derail"}, "terms": ["derailer"], "name": "Railway Derailer"}, - "railway/disused": {"icon": "iD-railway-disused", "fields": ["structure", "service_rail", "usage_rail"], "geometry": ["line"], "tags": {"railway": "disused"}, "terms": [], "name": "Disused Railway"}, + "railway/disused": {"icon": "iD-railway-disused", "fields": ["structure", "service_rail", "usage_rail"], "moreFields": ["covered"], "geometry": ["line"], "tags": {"railway": "disused"}, "terms": [], "name": "Disused Railway"}, "railway/funicular": {"icon": "iD-railway-rail", "geometry": ["line"], "terms": ["venicular", "cliff railway", "cable car", "cable railway", "funicular railway"], "fields": ["structure", "gauge", "service_rail"], "tags": {"railway": "funicular"}, "name": "Funicular"}, "railway/level_crossing": {"icon": "maki-cross", "geometry": ["vertex"], "tags": {"railway": "level_crossing"}, "terms": ["crossing", "railroad crossing", "level crossing", "grade crossing", "road through railroad", "train crossing"], "name": "Railway Crossing (Road)"}, - "railway/light_rail": {"icon": "iD-railway-light-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "light_rail"}, "terms": ["light rail", "streetcar", "trolley"], "name": "Light Rail"}, + "railway/light_rail": {"icon": "iD-railway-light-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "light_rail"}, "terms": ["light rail", "streetcar", "trolley"], "name": "Light Rail"}, "railway/milestone": {"icon": "temaki-milestone", "geometry": ["point", "vertex"], "fields": ["railway/position", "direction_vertex"], "tags": {"railway": "milestone"}, "terms": ["milestone", "marker"], "name": "Railway Milestone"}, - "railway/miniature": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "miniature"}, "terms": ["rideable miniature railway", "narrow gauge railway", "minimum gauge railway"], "name": "Miniature Railway"}, - "railway/monorail": {"icon": "iD-railway-monorail", "fields": ["name", "structure", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "monorail"}, "terms": [], "name": "Monorail"}, - "railway/narrow_gauge": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "narrow_gauge"}, "terms": ["narrow gauge railway", "narrow gauge railroad"], "name": "Narrow Gauge Rail"}, - "railway/rail": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "rail"}, "terms": [], "name": "Rail"}, + "railway/miniature": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "miniature"}, "terms": ["rideable miniature railway", "narrow gauge railway", "minimum gauge railway"], "name": "Miniature Railway"}, + "railway/monorail": {"icon": "iD-railway-monorail", "fields": ["name", "structure", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "monorail"}, "terms": [], "name": "Monorail"}, + "railway/narrow_gauge": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "narrow_gauge"}, "terms": ["narrow gauge railway", "narrow gauge railroad"], "name": "Narrow Gauge Rail"}, + "railway/rail": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "rail"}, "terms": [], "name": "Rail"}, "railway/signal": {"icon": "temaki-railway_signals", "geometry": ["point", "vertex"], "fields": ["railway/position", "railway/signal/direction", "ref"], "tags": {"railway": "signal"}, "terms": ["signal", "lights"], "name": "Railway Signal"}, "railway/subway_entrance": {"icon": "maki-entrance", "geometry": ["point", "vertex"], "fields": ["name"], "tags": {"railway": "subway_entrance"}, "terms": ["metro", "transit"], "name": "Subway Entrance"}, "railway/subway": {"icon": "iD-railway-subway", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "subway"}, "terms": ["metro", "transit"], "name": "Subway"}, "railway/switch": {"icon": "temaki-junction", "geometry": ["vertex"], "tags": {"railway": "switch"}, "terms": ["switch", "points"], "name": "Railway Switch"}, "railway/train_wash": {"icon": "maki-rail", "geometry": ["point", "vertex", "area"], "fields": ["operator", "building_area"], "tags": {"railway": "wash"}, "terms": ["wash", "clean"], "name": "Train Wash"}, - "railway/tram": {"icon": "iD-railway-light-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "tram"}, "terms": ["light rail", "streetcar", "tram", "trolley"], "name": "Tram"}, + "railway/tram": {"icon": "iD-railway-light-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "tram"}, "terms": ["light rail", "streetcar", "tram", "trolley"], "name": "Tram"}, "relation": {"icon": "iD-relation", "fields": ["name", "relation"], "geometry": ["relation"], "tags": {}, "name": "Relation"}, "route/ferry": {"icon": "iD-ferry-line", "geometry": ["line"], "fields": ["name", "operator", "duration", "access", "to", "from"], "tags": {"route": "ferry"}, "name": "Ferry Route"}, "seamark/beacon_isolated_danger": {"fields": ["ref", "operator", "seamark/beacon_isolated_danger/shape", "seamark/type"], "geometry": ["point", "vertex"], "terms": ["beacon isolated danger", "isolated danger beacon", "iala"], "tags": {"seamark:type": "beacon_isolated_danger"}, "name": "Danger Beacon"}, diff --git a/data/presets/presets/railway/abandoned.json b/data/presets/presets/railway/abandoned.json index de78e95dd..657c3dc58 100644 --- a/data/presets/presets/railway/abandoned.json +++ b/data/presets/presets/railway/abandoned.json @@ -6,6 +6,9 @@ "service_rail", "usage_rail" ], + "moreFields": [ + "covered" + ], "geometry": [ "line" ], diff --git a/data/presets/presets/railway/disused.json b/data/presets/presets/railway/disused.json index 816b6df4f..ea611e50e 100644 --- a/data/presets/presets/railway/disused.json +++ b/data/presets/presets/railway/disused.json @@ -5,6 +5,9 @@ "service_rail", "usage_rail" ], + "moreFields": [ + "covered" + ], "geometry": [ "line" ], diff --git a/data/presets/presets/railway/light_rail.json b/data/presets/presets/railway/light_rail.json index d9de27cd1..7e0e917c8 100644 --- a/data/presets/presets/railway/light_rail.json +++ b/data/presets/presets/railway/light_rail.json @@ -9,9 +9,10 @@ "usage_rail" ], "moreFields": [ + "covered", + "frequency_electrified", "maxspeed", - "voltage_electrified", - "frequency_electrified" + "voltage_electrified" ], "geometry": [ "line" diff --git a/data/presets/presets/railway/miniature.json b/data/presets/presets/railway/miniature.json index 12d0939da..2c1eb0110 100644 --- a/data/presets/presets/railway/miniature.json +++ b/data/presets/presets/railway/miniature.json @@ -8,9 +8,10 @@ "service_rail" ], "moreFields": [ + "covered", + "frequency_electrified", "maxspeed", - "voltage_electrified", - "frequency_electrified" + "voltage_electrified" ], "geometry": [ "line" diff --git a/data/presets/presets/railway/monorail.json b/data/presets/presets/railway/monorail.json index 588fcce2a..2cb45fdcc 100644 --- a/data/presets/presets/railway/monorail.json +++ b/data/presets/presets/railway/monorail.json @@ -8,9 +8,10 @@ "usage_rail" ], "moreFields": [ + "covered", + "frequency_electrified", "maxspeed", - "voltage_electrified", - "frequency_electrified" + "voltage_electrified" ], "geometry": [ "line" diff --git a/data/presets/presets/railway/narrow_gauge.json b/data/presets/presets/railway/narrow_gauge.json index b2e81367d..e507f66bf 100644 --- a/data/presets/presets/railway/narrow_gauge.json +++ b/data/presets/presets/railway/narrow_gauge.json @@ -9,9 +9,10 @@ "usage_rail" ], "moreFields": [ + "covered", + "frequency_electrified", "maxspeed", - "voltage_electrified", - "frequency_electrified" + "voltage_electrified" ], "geometry": [ "line" diff --git a/data/presets/presets/railway/rail.json b/data/presets/presets/railway/rail.json index 8b2ebf579..d15394a59 100644 --- a/data/presets/presets/railway/rail.json +++ b/data/presets/presets/railway/rail.json @@ -9,9 +9,10 @@ "usage_rail" ], "moreFields": [ + "covered", + "frequency_electrified", "maxspeed", - "voltage_electrified", - "frequency_electrified" + "voltage_electrified" ], "geometry": [ "line" diff --git a/data/presets/presets/railway/tram.json b/data/presets/presets/railway/tram.json index 2682581ab..be0b3939e 100644 --- a/data/presets/presets/railway/tram.json +++ b/data/presets/presets/railway/tram.json @@ -9,9 +9,10 @@ "usage_rail" ], "moreFields": [ + "covered", + "frequency_electrified", "maxspeed", - "voltage_electrified", - "frequency_electrified" + "voltage_electrified" ], "geometry": [ "line" From 4ef46a4b1d30451832c043a1a16d3b1536d556a1 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 28 Jan 2019 11:15:59 -0500 Subject: [PATCH 11/14] Fix issue where Chrome would attempt to autofill fields (close #5818) --- modules/util/util.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/util/util.js b/modules/util/util.js index 887383502..babfdf6aa 100644 --- a/modules/util/util.js +++ b/modules/util/util.js @@ -305,7 +305,8 @@ export function utilNoAuto(selection) { var isText = (selection.size() && selection.node().tagName.toLowerCase() === 'textarea'); return selection - .attr('autocomplete', 'off') + // assign 'new-password' even for non-password fields to prevent browsers (Chrome) ignoring 'off' + .attr('autocomplete', 'new-password') .attr('autocorrect', 'off') .attr('autocapitalize', 'off') .attr('spellcheck', isText ? 'true' : 'false'); From 87ddfa68dc25e0057a329a836dba8f84c6929848 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 28 Jan 2019 11:20:32 -0500 Subject: [PATCH 12/14] Revert 55715a482 - caused raw_tag_editor combos to not blur in Safari --- modules/ui/combobox.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/modules/ui/combobox.js b/modules/ui/combobox.js index cc98f4ca1..e8fc6484b 100644 --- a/modules/ui/combobox.js +++ b/modules/ui/combobox.js @@ -120,9 +120,6 @@ export function uiCombobox(context, klass) { function blur() { - // Try to dispatch accept here, but no guarantee - see note in `accept` - accept(null, true); // null = datum, true = onBlur - _comboHideTimerID = window.setTimeout(hide, 75); } @@ -399,7 +396,7 @@ export function uiCombobox(context, klass) { // Dispatches an 'accept' event // Then hides the combobox. - function accept(d, onBlur) { + function accept(d) { _cancelFetch = true; var thiz = input.node(); @@ -413,17 +410,6 @@ export function uiCombobox(context, klass) { thiz.setSelectionRange(val.length, val.length); d = _fetched[val]; - - // Try to dispatch `accept` onBlur, but only if we matched field to fetched datum. - // Surprisingly, this might happen: - // - user accepts a value in raw tag editor by pressing 'tab' - // - we dispatch `accept` - // - value change kicks off an event cascade *which replaces the combo* - // - 'tab' takes the user to the next field, blurring the current one - // - we get here, but the combo is new and has no datum yet - // - so just return because there's no reason to fire another `accept` with no datum - if (onBlur && !d) return; - dispatch.call('accept', thiz, d, val); hide(); } From b73ad48802f1774515d88ae71757f686bcdc3947 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 28 Jan 2019 11:45:34 -0500 Subject: [PATCH 13/14] Add the covered field to more presets Add "water fountain" and synonyms as terms to amenity/drinking_water preset --- data/presets.yaml | 2 +- data/presets/presets.json | 14 +++++++------- data/presets/presets/amenity/atm.json | 3 ++- data/presets/presets/amenity/bicycle_parking.json | 3 ++- data/presets/presets/amenity/bicycle_rental.json | 3 ++- .../presets/amenity/bicycle_repair_station.json | 3 ++- data/presets/presets/amenity/drinking_water.json | 10 +++++++--- data/presets/presets/amenity/parking.json | 3 ++- data/presets/presets/amenity/smoking_area.json | 3 ++- dist/locales/en.json | 2 +- 10 files changed, 28 insertions(+), 18 deletions(-) diff --git a/data/presets.yaml b/data/presets.yaml index 109c2550f..9f475cf44 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -2423,7 +2423,7 @@ en: amenity/drinking_water: # amenity=drinking_water name: Drinking Water - # 'terms: fountain,potable' + # 'terms: potable water source,water fountain,drinking fountain,bubbler,water tap' terms: '' amenity/driving_school: # amenity=driving_school diff --git a/data/presets/presets.json b/data/presets/presets.json index acc95bede..7f68cf91b 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -49,14 +49,14 @@ "amenity/animal_breeding": {"icon": "maki-veterinary", "fields": ["name", "operator", "address", "building_area", "opening_hours", "animal_breeding"], "moreFields": ["website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["breeding", "bull", "cat", "cow", "dog", "horse", "husbandry", "kitten", "livestock", "pet breeding", "puppy", "reptile"], "tags": {"amenity": "animal_breeding"}, "name": "Animal Breeding Facility"}, "amenity/animal_shelter": {"icon": "maki-veterinary", "fields": ["name", "operator", "address", "building_area", "opening_hours", "animal_shelter"], "moreFields": ["website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["adoption", "aspca", "cat", "dog", "horse", "kitten", "pet care", "pet rescue", "puppy", "raptor", "reptile", "rescue", "spca"], "tags": {"amenity": "animal_shelter"}, "name": "Animal Shelter"}, "amenity/arts_centre": {"icon": "maki-theatre", "fields": ["name", "address", "building_area", "opening_hours", "website"], "moreFields": ["fee", "payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": [], "tags": {"amenity": "arts_centre"}, "name": "Arts Center"}, - "amenity/atm": {"icon": "maki-bank", "fields": ["operator", "network", "cash_in", "currency_multi", "drive_through"], "moreFields": ["name", "brand", "lit", "opening_hours", "wheelchair"], "geometry": ["point", "vertex"], "terms": ["money", "cash", "machine"], "tags": {"amenity": "atm"}, "name": "ATM"}, + "amenity/atm": {"icon": "maki-bank", "fields": ["operator", "network", "cash_in", "currency_multi", "drive_through"], "moreFields": ["name", "brand", "lit", "opening_hours", "wheelchair", "covered"], "geometry": ["point", "vertex"], "terms": ["money", "cash", "machine"], "tags": {"amenity": "atm"}, "name": "ATM"}, "amenity/bank": {"icon": "maki-bank", "fields": ["name", "operator", "address", "building_area", "atm", "drive_through"], "moreFields": ["opening_hours", "currency_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["credit union", "check", "deposit", "fund", "investment", "repository", "reserve", "safe", "savings", "stock", "treasury", "trust", "vault"], "tags": {"amenity": "bank"}, "name": "Bank"}, "amenity/bar": {"icon": "maki-bar", "fields": ["name", "address", "building_area", "outdoor_seating", "brewery"], "moreFields": ["smoking", "opening_hours", "payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["dive", "beer", "bier", "booze"], "tags": {"amenity": "bar"}, "name": "Bar"}, "amenity/bbq": {"icon": "maki-bbq", "fields": ["covered", "fuel", "access_simple"], "moreFields": ["lit"], "geometry": ["point"], "terms": ["bbq", "grill"], "tags": {"amenity": "bbq"}, "name": "Barbecue/Grill"}, "amenity/bench": {"icon": "temaki-bench", "fields": ["backrest", "material", "seats", "colour"], "moreFields": ["access_simple", "inscription", "lit"], "geometry": ["point", "vertex", "line"], "terms": ["seat"], "tags": {"amenity": "bench"}, "name": "Bench"}, - "amenity/bicycle_parking": {"icon": "maki-bicycle", "fields": ["bicycle_parking", "capacity", "operator", "covered", "access_simple", "fee"], "moreFields": ["payment_multi"], "geometry": ["point", "vertex", "area"], "terms": ["bike"], "tags": {"amenity": "bicycle_parking"}, "name": "Bicycle Parking"}, - "amenity/bicycle_rental": {"icon": "maki-bicycle", "fields": ["capacity", "network", "operator", "fee", "payment_multi"], "moreFields": ["opening_hours", "address", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "vertex", "area"], "terms": ["bike"], "tags": {"amenity": "bicycle_rental"}, "name": "Bicycle Rental"}, - "amenity/bicycle_repair_station": {"icon": "maki-bicycle", "fields": ["operator", "brand", "opening_hours", "fee", "service/bicycle"], "moreFields": ["payment_multi"], "geometry": ["point", "vertex"], "terms": ["bike", "repair", "chain", "pump"], "tags": {"amenity": "bicycle_repair_station"}, "name": "Bicycle Repair Tool Stand"}, + "amenity/bicycle_parking": {"icon": "maki-bicycle", "fields": ["bicycle_parking", "capacity", "operator", "covered", "access_simple", "fee"], "moreFields": ["payment_multi", "covered"], "geometry": ["point", "vertex", "area"], "terms": ["bike"], "tags": {"amenity": "bicycle_parking"}, "name": "Bicycle Parking"}, + "amenity/bicycle_rental": {"icon": "maki-bicycle", "fields": ["capacity", "network", "operator", "fee", "payment_multi"], "moreFields": ["opening_hours", "address", "website", "phone", "email", "fax", "wheelchair", "covered"], "geometry": ["point", "vertex", "area"], "terms": ["bike"], "tags": {"amenity": "bicycle_rental"}, "name": "Bicycle Rental"}, + "amenity/bicycle_repair_station": {"icon": "maki-bicycle", "fields": ["operator", "brand", "opening_hours", "fee", "service/bicycle"], "moreFields": ["payment_multi", "covered"], "geometry": ["point", "vertex"], "terms": ["bike", "repair", "chain", "pump"], "tags": {"amenity": "bicycle_repair_station"}, "name": "Bicycle Repair Tool Stand"}, "amenity/biergarten": {"icon": "maki-beer", "fields": ["name", "address", "building", "outdoor_seating", "brewery"], "moreFields": ["{amenity/bar}"], "geometry": ["point", "area"], "tags": {"amenity": "biergarten"}, "terms": ["beer", "bier", "booze"], "name": "Biergarten"}, "amenity/boat_rental": {"icon": "temaki-boating", "fields": ["name", "operator", "fee", "payment_multi"], "moreFields": ["address", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "boat_rental"}, "name": "Boat Rental"}, "amenity/bureau_de_change": {"icon": "maki-bank", "fields": ["name", "operator", "payment_multi", "currency_multi", "address", "building_area"], "moreFields": ["opening_hours", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["bureau de change", "money changer"], "tags": {"amenity": "bureau_de_change"}, "name": "Currency Exchange"}, @@ -82,7 +82,7 @@ "amenity/dive_centre": {"icon": "maki-swimming", "fields": ["name", "operator", "address", "building_area", "opening_hours", "scuba_diving"], "moreFields": ["payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["diving", "scuba"], "tags": {"amenity": "dive_centre"}, "name": "Dive Center"}, "amenity/doctors": {"icon": "maki-doctor", "fields": ["name", "operator", "healthcare/speciality", "address", "building_area", "opening_hours"], "moreFields": ["payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["medic*", "physician"], "tags": {"amenity": "doctors"}, "addTags": {"amenity": "doctors", "healthcare": "doctor"}, "removeTags": {"amenity": "doctors", "healthcare": "doctor"}, "reference": {"key": "amenity", "value": "doctors"}, "name": "Doctor"}, "amenity/dojo": {"icon": "maki-pitch", "fields": ["name", "sport", "address", "building_area", "opening_hours"], "moreFields": ["payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["martial arts", "dojang"], "tags": {"amenity": "dojo"}, "name": "Dojo / Martial Arts Academy"}, - "amenity/drinking_water": {"icon": "maki-drinking-water", "fields": ["operator", "access_simple", "fee", "wheelchair"], "moreFields": ["lit"], "geometry": ["point"], "tags": {"amenity": "drinking_water"}, "terms": ["fountain", "potable"], "name": "Drinking Water"}, + "amenity/drinking_water": {"icon": "maki-drinking-water", "fields": ["operator", "access_simple", "fee", "wheelchair"], "moreFields": ["lit", "covered"], "geometry": ["point"], "tags": {"amenity": "drinking_water"}, "terms": ["potable water source", "water fountain", "drinking fountain", "bubbler", "water tap"], "name": "Drinking Water"}, "amenity/driving_school": {"icon": "maki-car", "fields": ["name", "operator", "address", "building_area", "opening_hours"], "moreFields": ["payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "driving_school"}, "name": "Driving School"}, "amenity/embassy": {"icon": "maki-embassy", "fields": ["name", "country", "address", "building_area"], "moreFields": ["website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "embassy"}, "name": "Embassy"}, "amenity/fast_food": {"icon": "maki-fast-food", "fields": ["name", "cuisine", "operator", "address", "building_area", "drive_through"], "moreFields": ["opening_hours", "diet_multi", "takeaway", "delivery", "smoking", "capacity", "outdoor_seating", "internet_access", "internet_access/fee", "internet_access/ssid", "payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "fast_food"}, "terms": ["restaurant", "takeaway"], "name": "Fast Food"}, @@ -114,7 +114,7 @@ "amenity/nightclub": {"icon": "maki-bar", "fields": ["name", "operator", "address", "building_area", "opening_hours", "smoking"], "moreFields": ["payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "nightclub"}, "terms": ["disco*", "night club", "dancing", "dance club"], "name": "Nightclub"}, "amenity/parking_entrance": {"icon": "maki-entrance-alt1", "fields": ["access_simple", "ref"], "geometry": ["vertex"], "tags": {"amenity": "parking_entrance"}, "name": "Parking Garage Entrance/Exit"}, "amenity/parking_space": {"fields": ["capacity"], "geometry": ["point", "vertex", "area"], "terms": [], "tags": {"amenity": "parking_space"}, "matchScore": 0.95, "name": "Parking Space"}, - "amenity/parking": {"icon": "maki-car", "fields": ["operator", "parking", "capacity", "access_simple", "fee", "surface"], "moreFields": ["name", "supervised", "park_ride", "maxstay", "payment_multi", "address", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "vertex", "area"], "tags": {"amenity": "parking"}, "terms": ["automobile parking", "car lot", "car parking", "rv parking", "truck parking", "vehicle parking"], "name": "Parking Lot"}, + "amenity/parking": {"icon": "maki-car", "fields": ["operator", "parking", "capacity", "access_simple", "fee", "surface"], "moreFields": ["name", "supervised", "park_ride", "maxstay", "payment_multi", "address", "website", "phone", "email", "fax", "wheelchair", "covered"], "geometry": ["point", "vertex", "area"], "tags": {"amenity": "parking"}, "terms": ["automobile parking", "car lot", "car parking", "rv parking", "truck parking", "vehicle parking"], "name": "Parking Lot"}, "amenity/parking/multi-storey": {"icon": "maki-car", "fields": ["{amenity/parking}", "building", "levels", "height"], "geometry": ["area"], "tags": {"amenity": "parking", "parking": "multi-storey"}, "addTags": {"building": "parking", "amenity": "parking", "parking": "multi-storey"}, "removeTags": {"building": "parking", "amenity": "parking", "parking": "multi-storey"}, "reference": {"key": "parking", "value": "multi-storey"}, "terms": ["car", "indoor parking", "multistorey car park", "parkade", "parking building", "parking deck", "parking garage", "parking ramp", "parking structure"], "name": "Multilevel Parking Garage"}, "amenity/payment_centre": {"icon": "maki-bank", "fields": ["name", "brand", "address", "building_area", "opening_hours", "payment_multi"], "moreFields": ["currency_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["check", "tax pay", "bill pay", "currency", "finance", "cash", "money"], "tags": {"amenity": "payment_centre"}, "name": "Payment Center"}, "amenity/payment_terminal": {"icon": "maki-bank", "fields": ["name", "brand", "address", "opening_hours", "payment_multi"], "moreFields": ["currency_multi", "wheelchair"], "geometry": ["point"], "terms": ["interactive kiosk", "ekiosk", "atm", "bill pay", "tax pay", "phone pay", "finance", "cash", "money transfer", "card"], "tags": {"amenity": "payment_terminal"}, "name": "Payment Terminal"}, @@ -166,7 +166,7 @@ "amenity/shelter/picnic_shelter": {"icon": "maki-shelter", "fields": ["name", "shelter_type", "building_area", "lit", "bin"], "geometry": ["point", "area"], "tags": {"amenity": "shelter", "shelter_type": "picnic_shelter"}, "reference": {"key": "shelter_type", "value": "picnic_shelter"}, "terms": ["pavilion"], "name": "Picnic Shelter"}, "amenity/shelter/public_transport": {"icon": "maki-shelter", "fields": ["name", "shelter_type", "building_area", "bench", "lit"], "geometry": ["point", "area"], "terms": ["bus stop", "metro stop", "waiting"], "tags": {"amenity": "shelter", "shelter_type": "public_transport"}, "reference": {"key": "shelter_type", "value": "public_transport"}, "name": "Transit Shelter"}, "amenity/shower": {"icon": "temaki-shower", "fields": ["opening_hours", "fee", "supervised", "building_area", "access_simple", "wheelchair"], "moreFields": ["operator", "gender", "payment_multi"], "geometry": ["point", "vertex", "area"], "terms": ["rain closet"], "tags": {"amenity": "shower"}, "name": "Shower"}, - "amenity/smoking_area": {"icon": "fas-smoking", "fields": ["name", "shelter", "bin", "bench", "opening_hours"], "moreFields": ["lit", "wheelchair"], "geometry": ["point", "vertex", "area"], "terms": [], "tags": {"amenity": "smoking_area"}, "name": "Smoking Area"}, + "amenity/smoking_area": {"icon": "fas-smoking", "fields": ["name", "shelter", "bin", "bench", "opening_hours"], "moreFields": ["lit", "wheelchair", "covered"], "geometry": ["point", "vertex", "area"], "terms": [], "tags": {"amenity": "smoking_area"}, "name": "Smoking Area"}, "amenity/social_facility": {"icon": "temaki-social_facility", "fields": ["name", "operator", "address", "building_area", "social_facility", "social_facility_for"], "moreFields": ["opening_hours", "wheelchair", "internet_access", "internet_access/fee", "internet_access/ssid", "website", "phone", "email", "fax"], "geometry": ["point", "area"], "terms": [], "tags": {"amenity": "social_facility"}, "name": "Social Facility"}, "amenity/social_facility/food_bank": {"icon": "temaki-social_facility", "geometry": ["point", "area"], "terms": [], "tags": {"amenity": "social_facility", "social_facility": "food_bank"}, "reference": {"key": "social_facility", "value": "food_bank"}, "name": "Food Bank"}, "amenity/social_facility/group_home": {"icon": "maki-wheelchair", "fields": ["{amenity/social_facility}", "wheelchair"], "geometry": ["point", "area"], "terms": ["old", "senior", "living", "care home", "assisted living"], "tags": {"amenity": "social_facility", "social_facility": "group_home", "social_facility:for": "senior"}, "reference": {"key": "social_facility", "value": "group_home"}, "name": "Elderly Group Home"}, diff --git a/data/presets/presets/amenity/atm.json b/data/presets/presets/amenity/atm.json index 134753c5c..ba60cc5a3 100644 --- a/data/presets/presets/amenity/atm.json +++ b/data/presets/presets/amenity/atm.json @@ -12,7 +12,8 @@ "brand", "lit", "opening_hours", - "wheelchair" + "wheelchair", + "covered" ], "geometry": [ "point", diff --git a/data/presets/presets/amenity/bicycle_parking.json b/data/presets/presets/amenity/bicycle_parking.json index ab0e26474..31286bd31 100644 --- a/data/presets/presets/amenity/bicycle_parking.json +++ b/data/presets/presets/amenity/bicycle_parking.json @@ -9,7 +9,8 @@ "fee" ], "moreFields": [ - "payment_multi" + "payment_multi", + "covered" ], "geometry": [ "point", diff --git a/data/presets/presets/amenity/bicycle_rental.json b/data/presets/presets/amenity/bicycle_rental.json index 45e7eb266..3a8b19708 100644 --- a/data/presets/presets/amenity/bicycle_rental.json +++ b/data/presets/presets/amenity/bicycle_rental.json @@ -14,7 +14,8 @@ "phone", "email", "fax", - "wheelchair" + "wheelchair", + "covered" ], "geometry": [ "point", diff --git a/data/presets/presets/amenity/bicycle_repair_station.json b/data/presets/presets/amenity/bicycle_repair_station.json index 5953214d0..5676a4e52 100644 --- a/data/presets/presets/amenity/bicycle_repair_station.json +++ b/data/presets/presets/amenity/bicycle_repair_station.json @@ -8,7 +8,8 @@ "service/bicycle" ], "moreFields": [ - "payment_multi" + "payment_multi", + "covered" ], "geometry": [ "point", diff --git a/data/presets/presets/amenity/drinking_water.json b/data/presets/presets/amenity/drinking_water.json index 0874cc9b2..4b3ad1f00 100644 --- a/data/presets/presets/amenity/drinking_water.json +++ b/data/presets/presets/amenity/drinking_water.json @@ -7,7 +7,8 @@ "wheelchair" ], "moreFields": [ - "lit" + "lit", + "covered" ], "geometry": [ "point" @@ -16,8 +17,11 @@ "amenity": "drinking_water" }, "terms": [ - "fountain", - "potable" + "potable water source", + "water fountain", + "drinking fountain", + "bubbler", + "water tap" ], "name": "Drinking Water" } diff --git a/data/presets/presets/amenity/parking.json b/data/presets/presets/amenity/parking.json index b32e3faff..32fad249d 100644 --- a/data/presets/presets/amenity/parking.json +++ b/data/presets/presets/amenity/parking.json @@ -19,7 +19,8 @@ "phone", "email", "fax", - "wheelchair" + "wheelchair", + "covered" ], "geometry": [ "point", diff --git a/data/presets/presets/amenity/smoking_area.json b/data/presets/presets/amenity/smoking_area.json index ae80a7ad7..cf4535d22 100644 --- a/data/presets/presets/amenity/smoking_area.json +++ b/data/presets/presets/amenity/smoking_area.json @@ -9,7 +9,8 @@ ], "moreFields": [ "lit", - "wheelchair" + "wheelchair", + "covered" ], "geometry": [ "point", diff --git a/dist/locales/en.json b/dist/locales/en.json index d5e57dd26..f7b55af3a 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -3934,7 +3934,7 @@ }, "amenity/drinking_water": { "name": "Drinking Water", - "terms": "fountain,potable" + "terms": "potable water source,water fountain,drinking fountain,bubbler,water tap" }, "amenity/driving_school": { "name": "Driving School", From 623eb3c2b93fc0233eb0f6732ea0e13fa41f5215 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 28 Jan 2019 12:11:31 -0500 Subject: [PATCH 14/14] Show `covered` field on drive-through preset --- data/presets/presets.json | 2 +- data/presets/presets/highway/service/drive-through.json | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/data/presets/presets.json b/data/presets/presets.json index 7f68cf91b..e6a865580 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -441,7 +441,7 @@ "highway/secondary": {"icon": "iD-highway-secondary", "fields": ["{highway/primary}"], "moreFields": ["{highway/primary}"], "geometry": ["line"], "tags": {"highway": "secondary"}, "terms": ["road", "street"], "name": "Secondary Road"}, "highway/service": {"icon": "iD-highway-service", "fields": ["name", "service", "oneway", "maxspeed", "surface", "structure", "access"], "moreFields": ["covered", "lanes", "lit", "maxheight", "maxspeed/advisory", "oneway/bicycle"], "geometry": ["line"], "tags": {"highway": "service"}, "terms": ["road", "street"], "name": "Service Road"}, "highway/service/alley": {"icon": "iD-highway-service", "geometry": ["line"], "tags": {"highway": "service", "service": "alley"}, "reference": {"key": "service", "value": "alley"}, "name": "Alley"}, - "highway/service/drive-through": {"icon": "iD-highway-service", "geometry": ["line"], "tags": {"highway": "service", "service": "drive-through"}, "reference": {"key": "service", "value": "drive-through"}, "name": "Drive-Through"}, + "highway/service/drive-through": {"icon": "iD-highway-service", "fields": ["{highway/service}", "covered"], "geometry": ["line"], "tags": {"highway": "service", "service": "drive-through"}, "reference": {"key": "service", "value": "drive-through"}, "name": "Drive-Through"}, "highway/service/driveway": {"icon": "iD-highway-service", "geometry": ["line"], "tags": {"highway": "service", "service": "driveway"}, "reference": {"key": "service", "value": "driveway"}, "name": "Driveway"}, "highway/service/emergency_access": {"icon": "iD-highway-service", "geometry": ["line"], "tags": {"highway": "service", "service": "emergency_access"}, "reference": {"key": "service", "value": "emergency_access"}, "name": "Emergency Access"}, "highway/service/parking_aisle": {"icon": "iD-highway-service", "geometry": ["line"], "tags": {"highway": "service", "service": "parking_aisle"}, "reference": {"key": "service", "value": "parking_aisle"}, "name": "Parking Aisle"}, diff --git a/data/presets/presets/highway/service/drive-through.json b/data/presets/presets/highway/service/drive-through.json index 1bf4c0c92..6eada87a0 100644 --- a/data/presets/presets/highway/service/drive-through.json +++ b/data/presets/presets/highway/service/drive-through.json @@ -1,5 +1,9 @@ { "icon": "iD-highway-service", + "fields": [ + "{highway/service}", + "covered" + ], "geometry": [ "line" ],