diff --git a/Makefile b/Makefile index 19d5b9fb7..8f3d7e8ef 100644 --- a/Makefile +++ b/Makefile @@ -17,11 +17,12 @@ data/presets/presets.json: $(PRESET_FILES) # TODO: write a nice node script for this data/data.js: \ + data \ data/deprecated.json \ data/discarded.json \ data/imagery.json \ data/keys.json - node data/make.js + node build.js .INTERMEDIATE iD.js: \ js/lib/bootstrap-tooltip.js \ @@ -77,7 +78,7 @@ iD.js: Makefile %.min.js: %.js Makefile @rm -f $@ - $(JS_COMPILER) $< -c -m -o $@ + $(JS_COMPILER) $< -m -o $@ clean: rm -f iD*.js diff --git a/css/app.css b/css/app.css index a0c456c4c..1783988d7 100644 --- a/css/app.css +++ b/css/app.css @@ -133,6 +133,7 @@ a:hover { textarea, input[type=text], input[type=search], +input[type=number], input[type=url], input[type=tel], input[type=email] { diff --git a/data/make.js b/data/make.js deleted file mode 100644 index 1759b75b8..000000000 --- a/data/make.js +++ /dev/null @@ -1,16 +0,0 @@ -var fs = require('fs'); - -function r(f) { return JSON.parse(fs.readFileSync(__dirname + '/' + f)); } -function rp(f) { return r('presets/' + f); } - -fs.writeFileSync('data.js', 'iD.data = ' + JSON.stringify({ - deprecated: r('deprecated.json'), - discarded: r('discarded.json'), - keys: r('keys.json'), - presets: { - presets: rp('presets.json'), - defaults: rp('defaults.json'), - categories: rp('categories.json'), - forms: rp('forms.json') - } -})); diff --git a/data/presets/build.sh b/data/presets/build.sh deleted file mode 100755 index 12464b05d..000000000 --- a/data/presets/build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -dir=$(dirname $0) -presets=$(find $dir/presets -name "*.json" -exec cat {} \; -exec echo , \;) -echo [${presets%?}] > $dir/presets.json -node -e " -var fs = require('fs'); -fs.writeFileSync('$dir/presets.json', JSON.stringify(JSON.parse(fs.readFileSync('$dir/presets.json', 'utf8')), null, 4)); -" diff --git a/data/presets/forms.json b/data/presets/forms.json index 2f0b77256..62e7b44bf 100644 --- a/data/presets/forms.json +++ b/data/presets/forms.json @@ -41,6 +41,11 @@ "type": "combo", "default": { "area": "yes" } }, + "levels": { + "key": "building:levels", + "type": "number", + "title": "Levels" + }, "fee": { "key": "fee", "type": "check" diff --git a/data/presets/presets.json b/data/presets/presets.json index 7761dafeb..3b891a8cc 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -1,1895 +1 @@ -[ - { - "name": "airport", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "airplane", - "airport", - "aerodrome" - ], - "tags": { - "aeroway": "aerodrome" - } - }, - "icon": "airport", - "form": [] - }, - { - "name": "helipad", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "helicopter", - "helipad", - "heliport" - ], - "tags": { - "aeroway": "helipad" - } - }, - "icon": "heliport", - "form": [] - }, - { - "name": "cafe", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "coffee", - "tea", - "coffee shop" - ], - "tags": { - "amenity": "cafe" - } - }, - "icon": "cafe", - "form": [ - "cuisine", - "internet_access", - "building_area", - "address" - ] - }, - { - "name": "park", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "esplanade", - "estate", - "forest", - "garden", - "grass", - "green", - "grounds", - "lawn", - "lot", - "meadow", - "parkland", - "place", - "playground", - "plaza", - "pleasure garden", - "recreation area", - "square", - "tract", - "village green", - "woodland" - ], - "tags": { - "leisure": "park" - } - }, - "icon": "park" - }, - { - "name": "bay", - "match": { - "type": [ - "point", - "area" - ], - "terms": [], - "tags": { - "natural": "bay" - } - }, - "icon": "" - }, - { - "name": "beach", - "match": { - "type": [ - "point", - "area" - ], - "terms": [], - "tags": { - "natural": "beach" - } - }, - "form": [ - "surface" - ], - "icon": "" - }, - { - "name": "cliff", - "match": { - "type": [ - "point", - "vertex", - "line", - "area" - ], - "terms": [], - "tags": { - "natural": "cliff" - } - }, - "icon": "" - }, - { - "name": "coastline", - "match": { - "type": [ - "line" - ], - "terms": [ - "shore" - ], - "tags": { - "natural": "coastline" - } - }, - "icon": "" - }, - { - "name": "glacier", - "match": { - "type": [ - "area" - ], - "terms": [], - "tags": { - "natural": "glacier" - } - }, - "icon": "" - }, - { - "name": "grassland", - "match": { - "type": [ - "point", - "area" - ], - "terms": [], - "tags": { - "natural": "grassland" - } - }, - "icon": "" - }, - { - "name": "heath", - "match": { - "type": [ - "area" - ], - "terms": [], - "tags": { - "natural": "heath" - } - }, - "icon": "" - }, - { - "name": "peak", - "match": { - "type": [ - "point", - "vertex" - ], - "tags": { - "natural": "peak" - }, - "terms": [ - "acme", - "aiguille", - "alp", - "climax", - "crest", - "crown", - "hill", - "mount", - "mountain", - "pinnacle", - "summit", - "tip", - "top" - ] - }, - "icon": "" - }, - { - "name": "scrub", - "match": { - "type": [ - "area" - ], - "tags": { - "natural": "scrub" - }, - "terms": [] - }, - "icon": "" - }, - { - "name": "spring", - "match": { - "type": [ - "point", - "vertex" - ], - "terms": [], - "tags": { - "natural": "spring" - } - }, - "icon": "" - }, - { - "name": "tree", - "match": { - "type": [ - "point", - "vertex" - ], - "terms": [], - "tags": { - "natural": "tree" - } - }, - "form": [ - { - "key": "denotation", - "type": "combo" - } - ], - "icon": "park" - }, - { - "name": "water", - "match": { - "type": [ - "area" - ], - "tags": { - "natural": "water" - }, - "terms": [] - }, - "form": [ - { - "key": "water", - "type": "combo" - } - ], - "icon": "" - }, - { - "name": "lake", - "match": { - "type": [ - "area" - ], - "tags": { - "natural": "water", - "water": "lake" - }, - "terms": [ - "lakelet", - "loch", - "mere" - ] - }, - "icon": "" - }, - { - "name": "pond", - "match": { - "type": [ - "area" - ], - "tags": { - "natural": "water", - "water": "pond" - }, - "terms": [ - "lakelet", - "millpond", - "tarn", - "pool", - "mere" - ] - }, - "icon": "" - }, - { - "name": "reservoir", - "match": { - "type": [ - "area" - ], - "tags": { - "natural": "water", - "water": "reservoir" - }, - "terms": [] - }, - "icon": "" - }, - { - "name": "wetland", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "natural": "wetland" - }, - "terms": [] - }, - "form": [ - { - "key": "wetland", - "type": "combo" - } - ], - "icon": "" - }, - { - "name": "wood", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "natural": "wood" - }, - "terms": [] - }, - "form": [ - { - "key": "wood", - "type": "combo" - } - ], - "icon": "park2" - }, - { - "name": "island", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "archipelago", - "atoll", - "bar", - "cay", - "isle", - "islet", - "key", - "reef" - ], - "tags": { - "place": "island" - } - }, - "icon": "" - }, - { - "name": "supermarket", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "bazaar", - "boutique", - "chain", - "co-op", - "cut-rate store", - "discount store", - "five-and-dime", - "flea market", - "galleria", - "mall", - "mart", - "outlet", - "outlet store", - "shop", - "shopping center", - "shopping plaza", - "stand", - "store", - "supermarket", - "thrift shop" - ], - "tags": { - "shop": "supermarket" - } - }, - "icon": "grocery", - "form": [ - "operator", - "building_area", - "address" - ] - }, - { - "name": "restaurant", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "bar", - "cafeteria", - "café", - "canteen", - "chophouse", - "coffee shop", - "diner", - "dining room", - "dive*", - "doughtnut shop", - "drive-in", - "eatery", - "eating house", - "eating place", - "fast-food place", - "greasy spoon", - "grill", - "hamburger stand", - "hashery", - "hideaway", - "hotdog stand", - "inn", - "joint*", - "luncheonette", - "lunchroom", - "night club", - "outlet*", - "pizzeria", - "saloon", - "soda fountain", - "watering hole" - ], - "tags": { - "amenity": "restaurant" - } - }, - "icon": "restaurant", - "form": [ - "cuisine", - "building_area", - "address" - ] - }, - { - "name": "place of worship", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "abbey", - "basilica", - "bethel", - "cathedral", - "chancel", - "chantry", - "chapel", - "church", - "fold", - "house of God", - "house of prayer", - "house of worship", - "minster", - "mission", - "mosque", - "oratory", - "parish", - "sacellum", - "sanctuary", - "shrine", - "synagogue", - "tabernacle", - "temple" - ], - "tags": { - "amenity": "place_of_worship" - } - }, - "icon": "place-of-worship", - "form": [ - "religion", - "denomination", - "building", - "address" - ] - }, - { - "name": "church", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "christian", - "abbey", - "basilica", - "bethel", - "cathedral", - "chancel", - "chantry", - "chapel", - "church", - "fold", - "house of God", - "house of prayer", - "house of worship", - "minster", - "mission", - "oratory", - "parish", - "sacellum", - "sanctuary", - "shrine", - "tabernacle", - "temple" - ], - "tags": { - "amenity": "place_of_worship", - "religion": "christian" - } - }, - "icon": "religious-christian", - "form": [ - "denomination", - "building", - "address" - ] - }, - { - "name": "synagogue", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "jewish", - "synagogue" - ], - "tags": { - "amenity": "place_of_worship", - "religion": "jewish" - } - }, - "icon": "religious-jewish", - "form": [ - "denomination", - "building", - "address" - ] - }, - { - "name": "mosque", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "muslim", - "mosque" - ], - "tags": { - "amenity": "place_of_worship", - "religion": "muslim" - } - }, - "icon": "religious-muslim", - "form": [ - "denomination", - "building", - "address" - ] - }, - { - "name": "school", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "academy", - "alma mater", - "blackboard", - "college", - "department", - "discipline", - "establishment", - "faculty", - "hall", - "halls of ivy", - "institute", - "institution", - "jail*", - "schoolhouse", - "seminary", - "university" - ], - "tags": { - "amenity": "school" - } - }, - "icon": "school", - "form": [ - "operator", - "building", - "address" - ] - }, - { - "name": "university", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "amenity": "university" - }, - "terms": [] - }, - "icon": "college", - "form": [ - "operator", - "address" - ] - }, - { - "name": "parking", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "amenity": "parking" - }, - "terms": [] - }, - "icon": "parking", - "form": [ - "fee", - "access", - "address" - ] - }, - { - "name": "bank", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "coffer", - "countinghouse", - "credit union", - "depository", - "exchequer", - "fund", - "hoard", - "investment firm", - "repository", - "reserve", - "reservoir", - "safe", - "savings", - "stock", - "stockpile", - "store", - "storehouse", - "thrift", - "treasury", - "trust company", - "vault" - ], - "tags": { - "amenity": "bank" - } - }, - "icon": "bank", - "form": [ - "atm", - "building_area", - "address" - ] - }, - { - "name": "fast food", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "amenity": "fast_food" - }, - "terms": [] - }, - "icon": "fast-food", - "form": [ - "cuisine", - "building_area", - "address" - ] - }, - { - "name": "bar", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "amenity": "bar" - }, - "terms": [] - }, - "icon": "bar", - "form": [ - "building_area", - "address" - ] - }, - { - "name": "pub", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "amenity": "pub" - }, - "terms": [] - }, - "icon": "beer", - "form": [ - "building_area", - "address" - ] - }, - { - "name": "cinema", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "big screen", - "bijou", - "cine", - "drive-in", - "film", - "flicks", - "motion pictures", - "movie house", - "movie theater", - "moving pictures", - "nabes", - "photoplay", - "picture show", - "pictures", - "playhouse", - "show", - "silver screen" - ], - "tags": { - "amenity": "cinema" - } - }, - "icon": "cinema", - "form": [ - "building_area", - "address" - ] - }, - { - "name": "hospital", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "clinic", - "emergency room", - "health service", - "hospice", - "infirmary", - "institution", - "nursing home", - "rest home", - "sanatorium", - "sanitarium", - "sick bay", - "surgery", - "ward" - ], - "tags": { - "amenity": "hospital" - } - }, - "icon": "hospital", - "form": [ - "emergency", - "building_area", - "address" - ] - }, - { - "name": "pharmacy", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "amenity": "pharmacy" - }, - "terms": [] - }, - "icon": "pharmacy", - "form": [ - "dispensing", - "operator", - "building_area", - "address" - ] - }, - { - "name": "fire station", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "amenity": "fire_station" - }, - "terms": [] - }, - "icon": "fire-station", - "form": [ - "operator", - "building_area", - "address" - ] - }, - { - "name": "police", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "badge", - "bear", - "blue", - "bluecoat", - "bobby", - "boy scout", - "bull", - "constable", - "constabulary", - "cop", - "copper", - "corps", - "county mounty", - "detective", - "fed", - "flatfoot", - "force", - "fuzz", - "gendarme", - "gumshoe", - "heat", - "law", - "law enforcement", - "man", - "narc", - "officers", - "patrolman", - "police" - ], - "tags": { - "amenity": "police" - } - }, - "icon": "police", - "form": [ - "operator", - "building_area", - "address" - ] - }, - { - "name": "post box", - "match": { - "type": [ - "point" - ], - "tags": { - "amenity": "post_box" - }, - "terms": [ - "letter drop", - "letterbox", - "mail drop", - "mailbox", - "pillar box", - "postbox" - ] - }, - "icon": "post", - "form": [ - "address", - "operator", - { - "key": "collection_times", - "type": "text" - } - ] - }, - { - "name": "library", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "amenity": "library" - }, - "terms": [] - }, - "icon": "library", - "form": [ - "operator", - "building_area", - "address" - ] - }, - { - "name": "toilets", - "match": { - "type": [ - "point", - "area" - ], - "terms": [], - "tags": { - "amenity": "toilets" - } - }, - "icon": "", - "form": [ - "operator", - "building", - "address" - ] - }, - { - "name": "hotel", - "match": { - "type": [ - "point", - "area" - ], - "terms": [], - "tags": { - "tourism": "hotel" - } - }, - "icon": "lodging", - "form": [ - "operator", - "building_area", - "address" - ] - }, - { - "name": "museum", - "match": { - "type": [ - "point", - "area" - ], - "terms": [ - "exhibition", - "exhibits archive", - "foundation", - "gallery", - "hall", - "institution", - "library", - "menagerie", - "repository", - "salon", - "storehouse", - "treasury", - "vault" - ], - "tags": { - "tourism": "museum" - } - }, - "icon": "museum", - "form": [ - "operator", - "building_area", - "address" - ] - }, - { - "name": "picnic site", - "match": { - "type": [ - "point", - "area" - ], - "terms": [], - "tags": { - "tourism": "picnic_site" - } - }, - "icon": "", - "form": [ - "operator", - "building_area", - "address" - ] - }, - { - "name": "town hall", - "match": { - "type": [ - "point", - "areea" - ], - "terms": [ - "village hall", - "city government", - "courthouse", - "municipal building", - "municipal center" - ], - "tags": { - "amenity": "townhall" - } - }, - "icon": "town-hall", - "form": [ - "building_area", - "address" - ] - }, - { - "name": "golf course", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "leisure": "golf_course" - }, - "terms": [] - }, - "icon": "golf", - "form": [ - "operator", - "address" - ] - }, - { - "name": "river", - "match": { - "type": [ - "line" - ], - "terms": [ - "beck", - "branch", - "brook", - "course", - "creek", - "estuary", - "rill", - "rivulet", - "run", - "runnel", - "stream", - "tributary", - "watercourse" - ], - "tags": { - "waterway": "river" - } - }, - "icon": "waterway-river" - }, - { - "name": "stream", - "match": { - "type": [ - "line" - ], - "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" - ], - "tags": { - "waterway": "stream" - } - }, - "icon": "waterway-river", - "form": [ - "layer" - ] - }, - { - "name": "motorway", - "match": { - "type": [ - "line" - ], - "tags": { - "highway": "motorway" - }, - "terms": [] - }, - "icon": "highway-motorway", - "form": [ - "oneway", - "bridge", - "tunnel", - "access", - "maxspeed", - "surface" - ] - }, - { - "name": "residential road", - "match": { - "type": [ - "line" - ], - "tags": { - "highway": "residential" - }, - "terms": [] - }, - "icon": "highway-residential", - "form": [ - "oneway", - "bridge", - "tunnel", - "access", - "maxspeed", - "surface" - ] - }, - { - "name": "primary road", - "match": { - "type": [ - "line" - ], - "tags": { - "highway": "primary" - }, - "terms": [] - }, - "icon": "highway-primary", - "form": [ - "oneway", - "bridge", - "tunnel", - "access", - "maxspeed", - "surface" - ] - }, - { - "name": "secondary road", - "match": { - "type": [ - "line" - ], - "tags": { - "highway": "secondary" - }, - "terms": [] - }, - "icon": "highway-secondary", - "form": [ - "oneway", - "bridge", - "tunnel", - "access", - "maxspeed", - "surface" - ] - }, - { - "name": "tertiary road", - "match": { - "type": [ - "line" - ], - "tags": { - "highway": "tertiary" - }, - "terms": [] - }, - "icon": "highway-tertiary", - "form": [ - "oneway", - "bridge", - "tunnel", - "access", - "maxspeed", - "surface" - ] - }, - { - "name": "service road", - "match": { - "type": [ - "line" - ], - "tags": { - "highway": "service" - }, - "terms": [] - }, - "icon": "highway-service", - "form": [ - { - "key": "service", - "type": "select", - "options": [ - "parking_aisle", - "driveway", - "alley", - "drive-through", - "emergency_access" - ] - }, - "oneway", - "bridge", - "tunnel", - "access", - "maxspeed", - "surface" - ] - }, - { - "name": "path", - "match": { - "type": [ - "line" - ], - "tags": { - "highway": "path" - }, - "terms": [] - }, - "icon": "highway-path", - "form": [ - "oneway", - "bridge", - "tunnel", - "access", - "maxspeed", - "surface" - ] - }, - { - "name": "track", - "match": { - "type": [ - "line" - ], - "tags": { - "highway": "track" - }, - "terms": [] - }, - "icon": "highway-track", - "form": [ - "oneway", - "bridge", - "tunnel", - "access", - "maxspeed", - "surface" - ] - }, - { - "name": "steps", - "match": { - "type": [ - "line" - ], - "tags": { - "highway": "steps" - }, - "terms": [ - "stairs", - "staircase" - ] - }, - "icon": "", - "form": [ - "access", - "surface" - ] - }, - { - "name": "allotments", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "allotments" - }, - "terms": [] - }, - "form": [], - "icon": "" - }, - { - "name": "cemetery", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "cemetery" - }, - "terms": [] - }, - "form": [], - "icon": "cemetery" - }, - { - "name": "commercial", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "commercial" - }, - "terms": [] - }, - "form": [], - "icon": "" - }, - { - "name": "construction", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "construction" - }, - "terms": [] - }, - "form": [ - { - "key": "construction", - "type": "combo" - }, - "operator" - ], - "icon": "" - }, - { - "name": "farm", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "farm" - }, - "terms": [] - }, - "form": [], - "icon": "" - }, - { - "name": "farmyard", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "farmyard" - }, - "terms": [] - }, - "form": [], - "icon": "" - }, - { - "name": "forest", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "landuse": "forest" - }, - "terms": [] - }, - "form": [ - { - "key": "wood", - "type": "combo" - } - ], - "icon": "park2" - }, - { - "name": "grass", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "grass" - }, - "terms": [] - }, - "form": [], - "icon": "" - }, - { - "name": "industrial", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "industrial" - }, - "terms": [] - }, - "form": [], - "icon": "" - }, - { - "name": "meadow", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "meadow" - }, - "terms": [] - }, - "form": [], - "icon": "" - }, - { - "name": "orchard", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "orchard" - }, - "terms": [] - }, - "form": [], - "icon": "" - }, - { - "name": "quarry", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "quarry" - }, - "terms": [] - }, - "form": [], - "icon": "" - }, - { - "name": "residential", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "residential" - }, - "terms": [] - }, - "form": [], - "icon": "" - }, - { - "name": "vineyard", - "match": { - "type": [ - "area" - ], - "tags": { - "landuse": "vineyard" - }, - "terms": [] - }, - "form": [], - "icon": "" - }, - { - "name": "rail", - "match": { - "type": [ - "line" - ], - "tags": { - "railway": "rail" - }, - "terms": [] - }, - "icon": "railway-rail" - }, - { - "name": "subway", - "match": { - "type": [ - "line" - ], - "tags": { - "railway": "subway" - }, - "terms": [] - }, - "icon": "railway-rail" - }, - { - "name": "subway entrance", - "match": { - "type": [ - "point" - ], - "tags": { - "railway": "subway_entrance" - }, - "terms": [] - }, - "icon": "rail-underground" - }, - { - "name": "trunk highway", - "match": { - "type": [ - "line" - ], - "tags": { - "highway": "trunk" - }, - "terms": [] - }, - "icon": "highway-trunk", - "form": [ - "oneway", - "bridge", - "tunnel", - "access", - "maxspeed", - "surface" - ] - }, - { - "name": "foot path", - "match": { - "type": [ - "line" - ], - "terms": [ - "beaten path", - "boulevard", - "clearing", - "course", - "cut*", - "drag*", - "footpath", - "highway", - "lane", - "line", - "orbit", - "passage", - "pathway", - "rail", - "rails", - "road", - "roadway", - "route", - "street", - "thoroughfare", - "trackway", - "trail", - "trajectory", - "walk" - ], - "tags": { - "highway": "footway" - } - }, - "icon": "highway-footway", - "form": [ - "access", - "surface" - ] - }, - { - "name": "cycle path", - "match": { - "type": [ - "line" - ], - "tags": { - "highway": "cycleway" - }, - "terms": [] - }, - "icon": "highway-cycleway", - "form": [ - "oneway", - "bridge", - "tunnel", - "access", - "maxspeed", - "surface" - ] - }, - { - "name": "sport pitch", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "leisure": "pitch" - }, - "terms": [] - }, - "icon": "pitch", - "form": [ - "surface" - ] - }, - { - "name": "baseball diamond", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "leisure": "pitch", - "sport": "baseball" - }, - "terms": [] - }, - "icon": "baseball", - "form": [ - "surface" - ] - }, - { - "name": "soccer field", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "leisure": "pitch", - "sport": "soccer" - }, - "terms": [] - }, - "icon": "soccer", - "form": [ - "surface" - ] - }, - { - "name": "tennis court", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "leisure": "pitch", - "sport": "tennis" - }, - "terms": [] - }, - "icon": "tennis", - "form": [ - "surface" - ] - }, - { - "name": "basketball court", - "match": { - "type": [ - "point", - "area" - ], - "tags": { - "leisure": "pitch", - "sport": "basketball" - }, - "terms": [] - }, - "icon": "basketball", - "form": [ - "surface" - ] - }, - { - "name": "building", - "match": { - "type": [ - "area" - ], - "tags": { - "building": "*" - }, - "terms": [] - }, - "icon": "warehouse", - "form": [ - "building_yes", - "address" - ] - }, - { - "name": "bus stop", - "match": { - "type": [ - "point" - ], - "tags": { - "highway": "bus_stop" - }, - "terms": [] - }, - "icon": "bus", - "form": [ - "operator", - "shelter" - ] - }, - { - "name": "turning circle", - "match": { - "type": [ - "vertex" - ], - "tags": { - "highway": "turning_circle" - }, - "terms": [] - }, - "icon": "circle" - }, - { - "name": "crossing", - "match": { - "type": [ - "vertex" - ], - "tags": { - "highway": "crossing" - }, - "terms": [ - "crosswalk", - "zebra crossing" - ] - }, - "icon": "", - "form": [ - { - "key": "crossing", - "type": "combo" - } - ] - } -] \ No newline at end of file +[{"name":"airport","match":{"type":["point","area"],"terms":["airplane","airport","aerodrome"],"tags":{"aeroway":"aerodrome"}},"icon":"airport","form":[]},{"name":"helipad","match":{"type":["point","area"],"terms":["helicopter","helipad","heliport"],"tags":{"aeroway":"helipad"}},"icon":"heliport","form":[]},{"name":"bank","match":{"type":["point","area"],"terms":["coffer","countinghouse","credit union","depository","exchequer","fund","hoard","investment firm","repository","reserve","reservoir","safe","savings","stock","stockpile","store","storehouse","thrift","treasury","trust company","vault"],"tags":{"amenity":"bank"}},"icon":"bank","form":["atm","building_area","address"]},{"name":"bar","match":{"type":["point","area"],"tags":{"amenity":"bar"},"terms":[]},"icon":"bar","form":["building_area","address"]},{"name":"cafe","match":{"type":["point","area"],"terms":["coffee","tea","coffee shop"],"tags":{"amenity":"cafe"}},"icon":"cafe","form":["cuisine","internet_access","building_area","address"]},{"name":"cinema","match":{"type":["point","area"],"terms":["big screen","bijou","cine","drive-in","film","flicks","motion pictures","movie house","movie theater","moving pictures","nabes","photoplay","picture show","pictures","playhouse","show","silver screen"],"tags":{"amenity":"cinema"}},"icon":"cinema","form":["building_area","address"]},{"name":"fast food","match":{"type":["point","area"],"tags":{"amenity":"fast_food"},"terms":[]},"icon":"fast-food","form":["cuisine","building_area","address"]},{"name":"fire station","match":{"type":["point","area"],"tags":{"amenity":"fire_station"},"terms":[]},"icon":"fire-station","form":["operator","building_area","address"]},{"name":"hospital","match":{"type":["point","area"],"terms":["clinic","emergency room","health service","hospice","infirmary","institution","nursing home","rest home","sanatorium","sanitarium","sick bay","surgery","ward"],"tags":{"amenity":"hospital"}},"icon":"hospital","form":["emergency","building_area","address"]},{"name":"library","match":{"type":["point","area"],"tags":{"amenity":"library"},"terms":[]},"icon":"library","form":["operator","building_area","address"]},{"name":"parking","match":{"type":["point","area"],"tags":{"amenity":"parking"},"terms":[]},"icon":"parking","form":["fee","access","address"]},{"name":"pharmacy","match":{"type":["point","area"],"tags":{"amenity":"pharmacy"},"terms":[]},"icon":"pharmacy","form":["dispensing","operator","building_area","address"]},{"name":"place of worship","match":{"type":["point","area"],"terms":["abbey","basilica","bethel","cathedral","chancel","chantry","chapel","church","fold","house of God","house of prayer","house of worship","minster","mission","mosque","oratory","parish","sacellum","sanctuary","shrine","synagogue","tabernacle","temple"],"tags":{"amenity":"place_of_worship"}},"icon":"place-of-worship","form":["religion","denomination","building","address"]},{"name":"church","match":{"type":["point","area"],"terms":["christian","abbey","basilica","bethel","cathedral","chancel","chantry","chapel","church","fold","house of God","house of prayer","house of worship","minster","mission","oratory","parish","sacellum","sanctuary","shrine","tabernacle","temple"],"tags":{"amenity":"place_of_worship","religion":"christian"}},"icon":"religious-christian","form":["denomination","building","address"]},{"name":"synagogue","match":{"type":["point","area"],"terms":["jewish","synagogue"],"tags":{"amenity":"place_of_worship","religion":"jewish"}},"icon":"religious-jewish","form":["denomination","building","address"]},{"name":"mosque","match":{"type":["point","area"],"terms":["muslim","mosque"],"tags":{"amenity":"place_of_worship","religion":"muslim"}},"icon":"religious-muslim","form":["denomination","building","address"]},{"name":"police","match":{"type":["point","area"],"terms":["badge","bear","blue","bluecoat","bobby","boy scout","bull","constable","constabulary","cop","copper","corps","county mounty","detective","fed","flatfoot","force","fuzz","gendarme","gumshoe","heat","law","law enforcement","man","narc","officers","patrolman","police"],"tags":{"amenity":"police"}},"icon":"police","form":["operator","building_area","address"]},{"name":"post box","match":{"type":["point"],"tags":{"amenity":"post_box"},"terms":["letter drop","letterbox","mail drop","mailbox","pillar box","postbox"]},"icon":"post","form":["address","operator",{"key":"collection_times","type":"text"}]},{"name":"pub","match":{"type":["point","area"],"tags":{"amenity":"pub"},"terms":[]},"icon":"beer","form":["building_area","address"]},{"name":"restaurant","match":{"type":["point","area"],"terms":["bar","cafeteria","café","canteen","chophouse","coffee shop","diner","dining room","dive*","doughtnut shop","drive-in","eatery","eating house","eating place","fast-food place","greasy spoon","grill","hamburger stand","hashery","hideaway","hotdog stand","inn","joint*","luncheonette","lunchroom","night club","outlet*","pizzeria","saloon","soda fountain","watering hole"],"tags":{"amenity":"restaurant"}},"icon":"restaurant","form":["cuisine","building_area","address"]},{"name":"school","match":{"type":["point","area"],"terms":["academy","alma mater","blackboard","college","department","discipline","establishment","faculty","hall","halls of ivy","institute","institution","jail*","schoolhouse","seminary","university"],"tags":{"amenity":"school"}},"icon":"school","form":["operator","building","address"]},{"name":"toilets","match":{"type":["point","area"],"terms":[],"tags":{"amenity":"toilets"}},"icon":"","form":["operator","building","address"]},{"name":"town hall","match":{"type":["point","areea"],"terms":["village hall","city government","courthouse","municipal building","municipal center"],"tags":{"amenity":"townhall"}},"icon":"town-hall","form":["building_area","address"]},{"name":"university","match":{"type":["point","area"],"tags":{"amenity":"university"},"terms":[]},"icon":"college","form":["operator","address"]},{"name":"building","match":{"type":["area"],"tags":{"building":"*"},"terms":[]},"icon":"warehouse","form":["building_yes","levels","address"]},{"name":"bus stop","match":{"type":["point"],"tags":{"highway":"bus_stop"},"terms":[]},"icon":"bus","form":["operator","shelter"]},{"name":"crossing","match":{"type":["vertex"],"tags":{"highway":"crossing"},"terms":["crosswalk","zebra crossing"]},"icon":"","form":[{"key":"crossing","type":"combo"}]},{"name":"cycle path","match":{"type":["line"],"tags":{"highway":"cycleway"},"terms":[]},"icon":"highway-cycleway","form":["oneway","bridge","tunnel","access","maxspeed","surface"]},{"name":"foot path","match":{"type":["line"],"terms":["beaten path","boulevard","clearing","course","cut*","drag*","footpath","highway","lane","line","orbit","passage","pathway","rail","rails","road","roadway","route","street","thoroughfare","trackway","trail","trajectory","walk"],"tags":{"highway":"footway"}},"icon":"highway-footway","form":["access","surface"]},{"name":"motorway","match":{"type":["line"],"tags":{"highway":"motorway"},"terms":[]},"icon":"highway-motorway","form":["oneway","bridge","tunnel","access","maxspeed","surface"]},{"name":"path","match":{"type":["line"],"tags":{"highway":"path"},"terms":[]},"icon":"highway-path","form":["oneway","bridge","tunnel","access","maxspeed","surface"]},{"name":"primary road","match":{"type":["line"],"tags":{"highway":"primary"},"terms":[]},"icon":"highway-primary","form":["oneway","bridge","tunnel","access","maxspeed","surface"]},{"name":"residential road","match":{"type":["line"],"tags":{"highway":"residential"},"terms":[]},"icon":"highway-residential","form":["oneway","bridge","tunnel","access","maxspeed","surface"]},{"name":"secondary road","match":{"type":["line"],"tags":{"highway":"secondary"},"terms":[]},"icon":"highway-secondary","form":["oneway","bridge","tunnel","access","maxspeed","surface"]},{"name":"service road","match":{"type":["line"],"tags":{"highway":"service"},"terms":[]},"icon":"highway-service","form":[{"key":"service","type":"select","options":["parking_aisle","driveway","alley","drive-through","emergency_access"]},"oneway","bridge","tunnel","access","maxspeed","surface"]},{"name":"steps","match":{"type":["line"],"tags":{"highway":"steps"},"terms":["stairs","staircase"]},"icon":"","form":["access","surface"]},{"name":"tertiary road","match":{"type":["line"],"tags":{"highway":"tertiary"},"terms":[]},"icon":"highway-tertiary","form":["oneway","bridge","tunnel","access","maxspeed","surface"]},{"name":"track","match":{"type":["line"],"tags":{"highway":"track"},"terms":[]},"icon":"highway-track","form":["oneway","bridge","tunnel","access","maxspeed","surface"]},{"name":"trunk highway","match":{"type":["line"],"tags":{"highway":"trunk"},"terms":[]},"icon":"highway-trunk","form":["oneway","bridge","tunnel","access","maxspeed","surface"]},{"name":"turning circle","match":{"type":["vertex"],"tags":{"highway":"turning_circle"},"terms":[]},"icon":"circle"},{"name":"allotments","match":{"type":["area"],"tags":{"landuse":"allotments"},"terms":[]},"form":[],"icon":""},{"name":"cemetery","match":{"type":["area"],"tags":{"landuse":"cemetery"},"terms":[]},"form":[],"icon":"cemetery"},{"name":"commercial","match":{"type":["area"],"tags":{"landuse":"commercial"},"terms":[]},"form":[],"icon":""},{"name":"construction","match":{"type":["area"],"tags":{"landuse":"construction"},"terms":[]},"form":[{"key":"construction","type":"combo"},"operator"],"icon":""},{"name":"farm","match":{"type":["area"],"tags":{"landuse":"farm"},"terms":[]},"form":[],"icon":""},{"name":"farmyard","match":{"type":["area"],"tags":{"landuse":"farmyard"},"terms":[]},"form":[],"icon":""},{"name":"forest","match":{"type":["point","area"],"tags":{"landuse":"forest"},"terms":[]},"form":[{"key":"wood","type":"combo"}],"icon":"park2"},{"name":"grass","match":{"type":["area"],"tags":{"landuse":"grass"},"terms":[]},"form":[],"icon":""},{"name":"industrial","match":{"type":["area"],"tags":{"landuse":"industrial"},"terms":[]},"form":[],"icon":""},{"name":"meadow","match":{"type":["area"],"tags":{"landuse":"meadow"},"terms":[]},"form":[],"icon":""},{"name":"orchard","match":{"type":["area"],"tags":{"landuse":"orchard"},"terms":[]},"form":[],"icon":""},{"name":"quarry","match":{"type":["area"],"tags":{"landuse":"quarry"},"terms":[]},"form":[],"icon":""},{"name":"residential","match":{"type":["area"],"tags":{"landuse":"residential"},"terms":[]},"form":[],"icon":""},{"name":"vineyard","match":{"type":["area"],"tags":{"landuse":"vineyard"},"terms":[]},"form":[],"icon":""},{"name":"golf course","match":{"type":["point","area"],"tags":{"leisure":"golf_course"},"terms":[]},"icon":"golf","form":["operator","address"]},{"name":"park","match":{"type":["point","area"],"terms":["esplanade","estate","forest","garden","grass","green","grounds","lawn","lot","meadow","parkland","place","playground","plaza","pleasure garden","recreation area","square","tract","village green","woodland"],"tags":{"leisure":"park"}},"icon":"park"},{"name":"sport pitch","match":{"type":["point","area"],"tags":{"leisure":"pitch"},"terms":[]},"icon":"pitch","form":["surface"]},{"name":"baseball diamond","match":{"type":["point","area"],"tags":{"leisure":"pitch","sport":"baseball"},"terms":[]},"icon":"baseball","form":["surface"]},{"name":"basketball court","match":{"type":["point","area"],"tags":{"leisure":"pitch","sport":"basketball"},"terms":[]},"icon":"basketball","form":["surface"]},{"name":"soccer field","match":{"type":["point","area"],"tags":{"leisure":"pitch","sport":"soccer"},"terms":[]},"icon":"soccer","form":["surface"]},{"name":"tennis court","match":{"type":["point","area"],"tags":{"leisure":"pitch","sport":"tennis"},"terms":[]},"icon":"tennis","form":["surface"]},{"name":"bay","match":{"type":["point","area"],"terms":[],"tags":{"natural":"bay"}},"icon":""},{"name":"beach","match":{"type":["point","area"],"terms":[],"tags":{"natural":"beach"}},"form":["surface"],"icon":""},{"name":"cliff","match":{"type":["point","vertex","line","area"],"terms":[],"tags":{"natural":"cliff"}},"icon":""},{"name":"coastline","match":{"type":["line"],"terms":["shore"],"tags":{"natural":"coastline"}},"icon":""},{"name":"glacier","match":{"type":["area"],"terms":[],"tags":{"natural":"glacier"}},"icon":""},{"name":"grassland","match":{"type":["point","area"],"terms":[],"tags":{"natural":"grassland"}},"icon":""},{"name":"heath","match":{"type":["area"],"terms":[],"tags":{"natural":"heath"}},"icon":""},{"name":"peak","match":{"type":["point","vertex"],"tags":{"natural":"peak"},"terms":["acme","aiguille","alp","climax","crest","crown","hill","mount","mountain","pinnacle","summit","tip","top"]},"icon":""},{"name":"scrub","match":{"type":["area"],"tags":{"natural":"scrub"},"terms":[]},"icon":""},{"name":"spring","match":{"type":["point","vertex"],"terms":[],"tags":{"natural":"spring"}},"icon":""},{"name":"tree","match":{"type":["point","vertex"],"terms":[],"tags":{"natural":"tree"}},"form":[{"key":"denotation","type":"combo"}],"icon":"park"},{"name":"water","match":{"type":["area"],"tags":{"natural":"water"},"terms":[]},"form":[{"key":"water","type":"combo"}],"icon":""},{"name":"lake","match":{"type":["area"],"tags":{"natural":"water","water":"lake"},"terms":["lakelet","loch","mere"]},"icon":""},{"name":"pond","match":{"type":["area"],"tags":{"natural":"water","water":"pond"},"terms":["lakelet","millpond","tarn","pool","mere"]},"icon":""},{"name":"reservoir","match":{"type":["area"],"tags":{"natural":"water","water":"reservoir"},"terms":[]},"icon":""},{"name":"wetland","match":{"type":["point","area"],"tags":{"natural":"wetland"},"terms":[]},"form":[{"key":"wetland","type":"combo"}],"icon":""},{"name":"wood","match":{"type":["point","area"],"tags":{"natural":"wood"},"terms":[]},"form":[{"key":"wood","type":"combo"}],"icon":"park2"},{"name":"island","match":{"type":["point","area"],"terms":["archipelago","atoll","bar","cay","isle","islet","key","reef"],"tags":{"place":"island"}},"icon":""},{"name":"rail","match":{"type":["line"],"tags":{"railway":"rail"},"terms":[]},"icon":"railway-rail"},{"name":"subway","match":{"type":["line"],"tags":{"railway":"subway"},"terms":[]},"icon":"railway-rail"},{"name":"subway entrance","match":{"type":["point"],"tags":{"railway":"subway_entrance"},"terms":[]},"icon":"rail-underground"},{"name":"supermarket","match":{"type":["point","area"],"terms":["bazaar","boutique","chain","co-op","cut-rate store","discount store","five-and-dime","flea market","galleria","mall","mart","outlet","outlet store","shop","shopping center","shopping plaza","stand","store","supermarket","thrift shop"],"tags":{"shop":"supermarket"}},"icon":"grocery","form":["operator","building_area","address"]},{"name":"hotel","match":{"type":["point","area"],"terms":[],"tags":{"tourism":"hotel"}},"icon":"lodging","form":["operator","building_area","address"]},{"name":"museum","match":{"type":["point","area"],"terms":["exhibition","exhibits archive","foundation","gallery","hall","institution","library","menagerie","repository","salon","storehouse","treasury","vault"],"tags":{"tourism":"museum"}},"icon":"museum","form":["operator","building_area","address"]},{"name":"picnic site","match":{"type":["point","area"],"terms":[],"tags":{"tourism":"picnic_site"}},"icon":"","form":["operator","building_area","address"]},{"name":"river","match":{"type":["line"],"terms":["beck","branch","brook","course","creek","estuary","rill","rivulet","run","runnel","stream","tributary","watercourse"],"tags":{"waterway":"river"}},"icon":"waterway-river"},{"name":"stream","match":{"type":["line"],"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"],"tags":{"waterway":"stream"}},"icon":"waterway-river","form":["layer"]}] \ No newline at end of file diff --git a/data/presets/presets/building/*.json b/data/presets/presets/building/*.json index e2b62e8fe..f23d6bd5d 100644 --- a/data/presets/presets/building/*.json +++ b/data/presets/presets/building/*.json @@ -12,6 +12,7 @@ "icon": "warehouse", "form": [ "building_yes", + "levels", "address" ] -} \ No newline at end of file +} diff --git a/js/id/ui/preset.js b/js/id/ui/preset.js index 46e3f4a60..d44f6c43c 100644 --- a/js/id/ui/preset.js +++ b/js/id/ui/preset.js @@ -80,6 +80,13 @@ iD.ui.preset = function(context) { .attr('placeholder', 'http://example.com/') .call(iD.behavior.accept().on('accept', event.close)); break; + case 'number': + i = this.append('input') + .attr('type', 'number') + .attr('id', 'input-' + d.key) + .attr('placeholder', '0') + .call(iD.behavior.accept().on('accept', event.close)); + break; case 'check': wrap = this.append('span').attr('class', 'input-wrap-position'), i = wrap.append('input').attr('type', 'text'); @@ -87,7 +94,6 @@ iD.ui.preset = function(context) { wrap.call(check); event.on('setTags.' + d.key, check.update); break; - case 'select': wrap = this.append('span').attr('class', 'input-wrap-position'), i = wrap.append('input').attr('type', 'text'); @@ -122,6 +128,8 @@ iD.ui.preset = function(context) { })); }); break; + default: + throw 'Unknown input type ' + d.type; } if (i) { i.on('change', key); diff --git a/package.json b/package.json index 802ca7a5d..b3ab847f7 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "license": "WTFPL", "devDependencies": { "uglify-js": "~2.2.2", - "mocha-phantomjs": "~1.1.1" + "mocha-phantomjs": "~1.1.1", + "glob": "~3.1.21" } }