diff --git a/css/app.css b/css/app.css index 046bfbe71..8a625152c 100644 --- a/css/app.css +++ b/css/app.css @@ -975,6 +975,10 @@ button.preset-add-field { padding: 0 10px; } +.view-on-osm { + padding: 20px; +} + /* preset form numbers */ input[type=number] { diff --git a/css/map.css b/css/map.css index fa5bba2ac..02989ea77 100644 --- a/css/map.css +++ b/css/map.css @@ -793,7 +793,7 @@ text.pointlabel { } /* Opera doesn't support dominant-baseline. See #715 */ -.opera .linelabel-halo, +.opera .linelabel-halo .textpath, .opera .linelabel .textpath { baseline-shift: -33%; dominant-baseline: auto; diff --git a/data/locales.js b/data/locales.js index a7d467929..159850ab2 100644 --- a/data/locales.js +++ b/data/locales.js @@ -361,6 +361,9 @@ locale.en = { "oneway": { "label": "One Way" }, + "oneway_yes": { + "label": "One Way" + }, "opening_hours": { "label": "Hours" }, @@ -684,8 +687,8 @@ locale.en = { "terms": "" }, "highway/bridleway": { - "name": "Steps", - "terms": "stairs,staircase" + "name": "Bridle Path", + "terms": "bridleway,equestrian trail,horse riding path,bridle road,horse trail" }, "highway/bus_stop": { "name": "Bus Stop", @@ -707,6 +710,10 @@ locale.en = { "name": "Motorway", "terms": "" }, + "highway/motorway_link": { + "name": "Motorway Link", + "terms": "ramp,on ramp,off ramp" + }, "highway/path": { "name": "Path", "terms": "" @@ -715,14 +722,26 @@ locale.en = { "name": "Primary Road", "terms": "" }, + "highway/primary_link": { + "name": "Primary Link", + "terms": "ramp,on ramp,off ramp" + }, "highway/residential": { "name": "Residential Road", "terms": "" }, + "highway/road": { + "name": "Unknown Road", + "terms": "" + }, "highway/secondary": { "name": "Secondary Road", "terms": "" }, + "highway/secondary_link": { + "name": "Secondary Link", + "terms": "ramp,on ramp,off ramp" + }, "highway/service": { "name": "Service Road", "terms": "" @@ -735,6 +754,10 @@ locale.en = { "name": "Tertiary Road", "terms": "" }, + "highway/tertiary_link": { + "name": "Tertiary Link", + "terms": "ramp,on ramp,off ramp" + }, "highway/track": { "name": "Track", "terms": "" @@ -747,6 +770,10 @@ locale.en = { "name": "Trunk Road", "terms": "" }, + "highway/trunk_link": { + "name": "Trunk Link", + "terms": "ramp,on ramp,off ramp" + }, "highway/turning_circle": { "name": "Turning Circle", "terms": "" @@ -1064,11 +1091,11 @@ locale.en = { "terms": "" }, "railway/abandoned": { - "name": "Abandoned railway", + "name": "Abandoned Railway", "terms": "" }, "railway/disused": { - "name": "Disused railway", + "name": "Disused Railway", "terms": "" }, "railway/level_crossing": { diff --git a/data/presets.yaml b/data/presets.yaml index 5ceacc1d4..8c4a42d36 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -86,6 +86,8 @@ en: label: Type oneway: label: One Way + oneway_yes: + label: One Way opening_hours: label: Hours operator: @@ -324,8 +326,8 @@ en: name: Highway terms: "" highway/bridleway: - name: Bridleway - terms: "bridle path,bridleway,equestrian trail,horse riding path,bridle road,horse trail" + name: Bridle Path + terms: "bridleway,equestrian trail,horse riding path,bridle road,horse trail" highway/bus_stop: name: Bus Stop terms: "" @@ -341,18 +343,30 @@ en: highway/motorway: name: Motorway terms: "" + highway/motorway_link: + name: Motorway Link + terms: "ramp,on ramp,off ramp" highway/path: name: Path terms: "" highway/primary: name: Primary Road terms: "" + highway/primary_link: + name: Primary Link + terms: "ramp,on ramp,off ramp" highway/residential: name: Residential Road terms: "" + highway/road: + name: Unknown Road + terms: "" highway/secondary: name: Secondary Road terms: "" + highway/secondary_link: + name: Secondary Link + terms: "ramp,on ramp,off ramp" highway/service: name: Service Road terms: "" @@ -362,6 +376,9 @@ en: highway/tertiary: name: Tertiary Road terms: "" + highway/tertiary_link: + name: Tertiary Link + terms: "ramp,on ramp,off ramp" highway/track: name: Track terms: "" @@ -371,6 +388,9 @@ en: highway/trunk: name: Trunk Road terms: "" + highway/trunk_link: + name: Trunk Link + terms: "ramp,on ramp,off ramp" highway/turning_circle: name: Turning Circle terms: "" @@ -609,10 +629,10 @@ en: name: Railway terms: "" railway/abandoned: - name: Abandoned railway + name: Abandoned Railway terms: "" railway/disused: - name: Disused railway + name: Disused Railway terms: "" railway/level_crossing: name: Level Crossing diff --git a/data/presets/categories.json b/data/presets/categories.json index a47833d08..069f96bbf 100644 --- a/data/presets/categories.json +++ b/data/presets/categories.json @@ -1,6 +1,5 @@ [{ "geometry": "line", - "icon": "highway", "id": "Road", "icon": "category-roads", "members": [ @@ -11,7 +10,46 @@ "highway/secondary", "highway/tertiary", "highway/unclassified", + "highway/motorway_link", + "highway/trunk_link", + "highway/primary_link", + "highway/secondary_link", + "highway/tertiary_link", "highway/service", - "highway/track" + "highway/track", + "highway/road" + ] +}, { + "geometry": "line", + "id": "Rail", + "icon": "railway-rail", + "members": [ + "railway/rail", + "railway/subway", + "railway/tram", + "railway/monorail", + "railway/disused", + "railway/abandoned" + ] +}, { + "geometry": "line", + "id": "Path", + "icon": "highway-path", + "members": [ + "highway/footway", + "highway/cycleway", + "highway/bridleway", + "highway/path", + "highway/steps" + ] +}, { + "geometry": "line", + "id": "Water", + "icon": "waterway-river", + "members": [ + "waterway/river", + "waterway/stream", + "waterway/canal", + "waterway/ditch" ] }] diff --git a/data/presets/defaults.json b/data/presets/defaults.json index e43aa7a6e..72bc337e4 100644 --- a/data/presets/defaults.json +++ b/data/presets/defaults.json @@ -15,11 +15,10 @@ ], "line": [ "Road", - "highway/footway", - "highway/cycleway", - "railway/rail", - "waterway/river", - "waterway/stream", + "Rail", + "Path", + "Water", + "power/line", "other" ], "point": [ diff --git a/data/presets/fields.json b/data/presets/fields.json index 6bd523bfd..42489382c 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -327,7 +327,7 @@ }, "structure": { "type": "radio", - "options": [ + "keys": [ "bridge", "tunnel", "embankment", diff --git a/data/presets/fields/structure.json b/data/presets/fields/structure.json index 8ea1b28ea..7c65c5390 100644 --- a/data/presets/fields/structure.json +++ b/data/presets/fields/structure.json @@ -1,6 +1,6 @@ { "type": "radio", - "options": [ + "keys": [ "bridge", "tunnel", "embankment", diff --git a/data/presets/presets.json b/data/presets/presets.json index bf9e6177c..0bd1d3777 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -1069,13 +1069,16 @@ "line" ], "tags": { - "highway": "steps" + "highway": "bridleway" }, "terms": [ - "stairs", - "staircase" + "bridleway", + "equestrian trail", + "horse riding path", + "bridle road", + "horse trail" ], - "name": "Steps" + "name": "Bridle Path" }, "highway/bus_stop": { "icon": "bus", @@ -1210,7 +1213,7 @@ "name": "Motorway Link" }, "highway/path": { - "icon": "highway-footway", + "icon": "highway-path", "fields": [ "oneway", "structure", @@ -1287,6 +1290,24 @@ "terms": [], "name": "Residential Road" }, + "highway/road": { + "icon": "highway-road", + "fields": [ + "oneway", + "structure", + "access", + "maxspeed", + "surface" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "road" + }, + "terms": [], + "name": "Unknown Road" + }, "highway/secondary": { "icon": "highway-secondary", "fields": [ @@ -1494,7 +1515,7 @@ "name": "Turning Circle" }, "highway/unclassified": { - "icon": "highway", + "icon": "highway-unclassified", "fields": [ "oneway", "structure", @@ -2526,7 +2547,7 @@ "structure" ], "terms": [], - "name": "Abandoned railway" + "name": "Abandoned Railway" }, "railway/disused": { "icon": "railway-disused", @@ -2540,7 +2561,7 @@ "structure" ], "terms": [], - "name": "Disused railway" + "name": "Disused Railway" }, "railway/level_crossing": { "icon": "cross", @@ -2712,7 +2733,7 @@ "name": "Beverage Store" }, "shop/bicycle": { - "icon": "shop", + "icon": "bicycle", "fields": [ "address", "opening_hours" diff --git a/data/presets/presets/highway/bridleway.json b/data/presets/presets/highway/bridleway.json index 302fb0c35..cf14cce65 100644 --- a/data/presets/presets/highway/bridleway.json +++ b/data/presets/presets/highway/bridleway.json @@ -9,11 +9,14 @@ "line" ], "tags": { - "highway": "steps" + "highway": "bridleway" }, "terms": [ - "stairs", - "staircase" + "bridleway", + "equestrian trail", + "horse riding path", + "bridle road", + "horse trail" ], - "name": "Steps" + "name": "Bridle Path" } diff --git a/data/presets/presets/highway/path.json b/data/presets/presets/highway/path.json index 7b877201d..b85f98373 100644 --- a/data/presets/presets/highway/path.json +++ b/data/presets/presets/highway/path.json @@ -1,5 +1,5 @@ { - "icon": "highway-footway", + "icon": "highway-path", "fields": [ "oneway", "structure", diff --git a/data/presets/presets/highway/road.json b/data/presets/presets/highway/road.json new file mode 100644 index 000000000..bb74b6d0f --- /dev/null +++ b/data/presets/presets/highway/road.json @@ -0,0 +1,18 @@ +{ + "icon": "highway-road", + "fields": [ + "oneway", + "structure", + "access", + "maxspeed", + "surface" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "road" + }, + "terms": [], + "name": "Unknown Road" +} \ No newline at end of file diff --git a/data/presets/presets/highway/unclassified.json b/data/presets/presets/highway/unclassified.json index f6491fcd2..b8dc36200 100644 --- a/data/presets/presets/highway/unclassified.json +++ b/data/presets/presets/highway/unclassified.json @@ -1,5 +1,5 @@ { - "icon": "highway", + "icon": "highway-unclassified", "fields": [ "oneway", "structure", diff --git a/data/presets/presets/railway/abandoned.json b/data/presets/presets/railway/abandoned.json index 7f5fca123..898a96195 100644 --- a/data/presets/presets/railway/abandoned.json +++ b/data/presets/presets/railway/abandoned.json @@ -10,5 +10,5 @@ "structure" ], "terms": [], - "name": "Abandoned railway" + "name": "Abandoned Railway" } diff --git a/data/presets/presets/railway/disused.json b/data/presets/presets/railway/disused.json index 70577f2d1..748bba069 100644 --- a/data/presets/presets/railway/disused.json +++ b/data/presets/presets/railway/disused.json @@ -10,5 +10,5 @@ "structure" ], "terms": [], - "name": "Disused railway" + "name": "Disused Railway" } diff --git a/data/presets/presets/shop/bicycle.json b/data/presets/presets/shop/bicycle.json index 941432d10..12bad05b7 100644 --- a/data/presets/presets/shop/bicycle.json +++ b/data/presets/presets/shop/bicycle.json @@ -1,5 +1,5 @@ { - "icon": "shop", + "icon": "bicycle", "fields": [ "address", "opening_hours" diff --git a/js/id/ui/preset.js b/js/id/ui/preset.js index c0105206b..99ccc564a 100644 --- a/js/id/ui/preset.js +++ b/js/id/ui/preset.js @@ -114,6 +114,14 @@ iD.ui.preset = function(context) { } }); + formwrap.selectAll('div.preset-field') + .classed('modified', function(d) { + var original = context.graph().base().entities[entity.id]; + return _.any(d.keys || [d.key], function(key) { + return original ? tags[key] !== original.tags[key] : tags[key]; + }); + }); + event.setTags(tags); return presets; }; diff --git a/js/id/ui/preset/input.js b/js/id/ui/preset/input.js index fbdc0a147..4ac69f450 100644 --- a/js/id/ui/preset/input.js +++ b/js/id/ui/preset/input.js @@ -19,6 +19,7 @@ iD.ui.preset.url = function(field) { var num = elem.value ? parseInt(elem.value, 10) : 0; if (!isNaN(num)) elem.value = num + x; + change(); } if (field.type == 'number') { diff --git a/js/id/ui/preset/radio.js b/js/id/ui/preset/radio.js index 9e8eb97ac..24036a375 100644 --- a/js/id/ui/preset/radio.js +++ b/js/id/ui/preset/radio.js @@ -9,7 +9,7 @@ iD.ui.preset.radio = function(field) { var buttonwrap = selection.append('div').attr('class','radio-wrap'); buttons = buttonwrap.selectAll('button') - .data(field.options) + .data(field.keys || field.options) .enter() .append('button') .text(function(d) { return field.t('options.' + d, { 'default': d }); })