diff --git a/.travis.yml b/.travis.yml index 2463156b2..e46f7d27c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,7 @@ node_js: - "6" - "8" sudo: required +before_script: + - npm run all after_success: - ./scripts/txpush.sh diff --git a/README.md b/README.md index 26aa6f85e..70a0cef23 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,26 @@ This is only necessary the first time so that the build process can create symbo To run the current development version of iD on your own computer: -1. Create a local `git clone` of the project, then `cd` into the project folder -2. Run `npm install` (this will run the `prepublish` script that builds everything) +#### Cloning the repository + +The repository is reasonably large. and it's unlikely that you need the full history. If you are happy to wait for it all to download, run: + +``` +git clone https://github.com/openstreetmap/iD.git +``` + +To clone only the most recent version, instead use a 'shallow clone': + +``` +git clone --depth=1 https://github.com/openstreetmap/iD.git +``` + +If you want to add in the full history later on, perhaps to run `git blame` or `git log`, run `git fetch --depth=1000000` + +#### Building iD +1. `cd` into the newly cloned project folder +2. Run `npm install` +3. Run `npm run all` 3. Run `npm start` 4. Open `http://localhost:8080/` in a web browser diff --git a/data/address-formats.json b/data/address-formats.json index ea64be59e..e17b00877 100644 --- a/data/address-formats.json +++ b/data/address-formats.json @@ -53,7 +53,7 @@ { "countryCodes": ["vn"], "format": [ - ["housenumber", "street","unit"], + ["housenumber", "street"], ["subdistrict"], ["district"], ["city"], @@ -122,8 +122,7 @@ "countryCodes": ["cn"], "format": [ ["postcode", "province"], - ["city", "unit"], - ["district"], + ["city", "district"], ["street", "housenumber"] ] } diff --git a/data/presets.yaml b/data/presets.yaml index 617d37613..f710a6199 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1707,7 +1707,7 @@ en: amenity/doctors: # amenity=doctors name: Doctor - # 'terms: medic*' + # 'terms: medic*,physician' terms: '' amenity/dojo: # amenity=dojo @@ -1958,6 +1958,11 @@ en: name: Shelter # 'terms: lean-to,gazebo,picnic' terms: '' + amenity/shower: + # amenity=shower + name: Shower + # 'terms: rain closet' + terms: '' amenity/social_facility: # amenity=social_facility name: Social Facility @@ -2112,6 +2117,71 @@ en: # 'area:highway=*' name: Road Surface terms: '' + attraction/amusement_ride: + # attraction=amusement_ride + name: Amusement Ride + # 'terms: theme park,carnival ride' + terms: '' + attraction/animal: + # attraction=animal + name: Animal + # 'terms: zoo,theme park,animal park,lion,tiger,bear' + terms: '' + attraction/big_wheel: + # attraction=big_wheel + name: Big Wheel + # 'terms: ferris wheel,theme park,amusement ride' + terms: '' + attraction/bumper_car: + # attraction=bumper_car + name: Bumper Car + # 'terms: theme park,dodgem cars,autoscooter' + terms: '' + attraction/bungee_jumping: + # attraction=bungee_jumping + name: Bungee Jumping + # 'terms: theme park,bungy jumping,jumping platform' + terms: '' + attraction/carousel: + # attraction=carousel + name: Carousel + # 'terms: theme park,roundabout,merry-go-round,galloper,jumper,horseabout,flying horses' + terms: '' + attraction/dark_ride: + # attraction=dark_ride + name: Dark Ride + # 'terms: theme park,ghost train' + terms: '' + attraction/drop_tower: + # attraction=drop_tower + name: Drop Tower + # 'terms: theme park,amusement ride,gondola,tower,big drop' + terms: '' + attraction/pirate_ship: + # attraction=pirate_ship + name: Pirate Ship + # 'terms: theme park,carnival ride,amusement ride' + terms: '' + attraction/river_rafting: + # attraction=river_rafting + name: River Rafting + # 'terms: theme park,aquatic park,water park,rafting simulator,river rafting ride,river rapids ride' + terms: '' + attraction/roller_coaster: + # attraction=roller_coaster + name: Roller Coaster + # 'terms: theme park,amusement ride' + terms: '' + attraction/train: + # attraction=train + name: Tourist Train + # 'terms: theme park,rackless train,road train,Tschu-Tschu train,dotto train,park train' + terms: '' + attraction/water_slide: + # attraction=water_slide + name: Water Slide + # 'terms: theme park,aquatic park,water park,flumes,water chutes,hydroslides' + terms: '' barrier: # barrier=* name: Barrier @@ -2580,6 +2650,11 @@ en: name: Fire Hydrant # 'terms: fire plug' terms: '' + emergency/life_ring: + # emergency=life_ring + name: Life Ring + # 'terms: life buoy,kisby ring,kisbie ring,perry buoy' + terms: '' emergency/no: # emergency=no name: Emergency Access No @@ -3658,7 +3733,6 @@ en: office/physician: # office=physician name: Physician - terms: '' office/political_party: # office=political_party name: Political Party diff --git a/data/presets/presets.json b/data/presets/presets.json index 38e6f8317..6c567ea69 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -1316,7 +1316,8 @@ "area" ], "terms": [ - "medic*" + "medic*", + "physician" ], "tags": { "amenity": "doctors" @@ -2565,6 +2566,28 @@ }, "name": "Shelter" }, + "amenity/shower": { + "icon": "water", + "fields": [ + "operator", + "opening_hours", + "fee", + "supervised", + "building_area" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "terms": [ + "rain closet" + ], + "tags": { + "amenity": "shower" + }, + "name": "Shower" + }, "amenity/social_facility": { "icon": "poi-social-facility", "fields": [ @@ -3317,6 +3340,296 @@ }, "name": "Road Surface" }, + "attraction/amusement_ride": { + "icon": "amusement-park", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "theme park", + "carnival ride" + ], + "tags": { + "attraction": "amusement_ride" + }, + "name": "Amusement Ride" + }, + "attraction/animal": { + "icon": "zoo", + "fields": [ + "name", + "operator" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "zoo", + "theme park", + "animal park", + "lion", + "tiger", + "bear" + ], + "tags": { + "attraction": "animal" + }, + "name": "Animal" + }, + "attraction/big_wheel": { + "icon": "amusement-park", + "fields": [ + "name", + "operator", + "height", + "opening_hours" + ], + "geometry": [ + "point" + ], + "terms": [ + "ferris wheel", + "theme park", + "amusement ride" + ], + "tags": { + "attraction": "big_wheel" + }, + "name": "Big Wheel" + }, + "attraction/bumper_car": { + "icon": "car", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "theme park", + "dodgem cars", + "autoscooter" + ], + "tags": { + "attraction": "bumper_car" + }, + "name": "Bumper Car" + }, + "attraction/bungee_jumping": { + "icon": "pitch", + "fields": [ + "name", + "operator", + "height", + "opening_hours" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "theme park", + "bungy jumping", + "jumping platform" + ], + "tags": { + "attraction": "bungee_jumping" + }, + "name": "Bungee Jumping" + }, + "attraction/carousel": { + "icon": "horse-riding", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "theme park", + "roundabout", + "merry-go-round", + "galloper", + "jumper", + "horseabout", + "flying horses" + ], + "tags": { + "attraction": "carousel" + }, + "name": "Carousel" + }, + "attraction/dark_ride": { + "icon": "rail-metro", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point", + "line", + "area" + ], + "terms": [ + "theme park", + "ghost train" + ], + "tags": { + "attraction": "dark_ride" + }, + "name": "Dark Ride" + }, + "attraction/drop_tower": { + "icon": "poi-tower", + "fields": [ + "name", + "operator", + "height", + "opening_hours" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "theme park", + "amusement ride", + "gondola", + "tower", + "big drop" + ], + "tags": { + "attraction": "drop_tower" + }, + "name": "Drop Tower" + }, + "attraction/pirate_ship": { + "icon": "amusement-park", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point" + ], + "terms": [ + "theme park", + "carnival ride", + "amusement ride" + ], + "tags": { + "attraction": "pirate_ship" + }, + "name": "Pirate Ship" + }, + "attraction/river_rafting": { + "icon": "ferry", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point", + "line" + ], + "terms": [ + "theme park", + "aquatic park", + "water park", + "rafting simulator", + "river rafting ride", + "river rapids ride" + ], + "tags": { + "attraction": "river_rafting" + }, + "name": "River Rafting" + }, + "attraction/roller_coaster": { + "icon": "amusement-park", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "theme park", + "amusement ride" + ], + "tags": { + "attraction": "roller_coaster" + }, + "name": "Roller Coaster" + }, + "attraction/train": { + "icon": "rail", + "fields": [ + "name", + "operator", + "fee", + "opening_hours" + ], + "geometry": [ + "point", + "line" + ], + "terms": [ + "theme park", + "rackless train", + "road train", + "Tschu-Tschu train", + "dotto train", + "park train" + ], + "tags": { + "attraction": "train" + }, + "name": "Tourist Train" + }, + "attraction/water_slide": { + "icon": "swimming", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "line", + "area" + ], + "terms": [ + "theme park", + "aquatic park", + "water park", + "flumes", + "water chutes", + "hydroslides" + ], + "tags": { + "attraction": "water_slide" + }, + "name": "Water Slide" + }, "barrier": { "icon": "roadblock", "geometry": [ @@ -5380,6 +5693,27 @@ }, "name": "Fire Hydrant" }, + "emergency/life_ring": { + "icon": "circle-stroked", + "fields": [ + "ref", + "operator" + ], + "geometry": [ + "point", + "vertex" + ], + "terms": [ + "life buoy", + "kisby ring", + "kisbie ring", + "perry buoy" + ], + "tags": { + "emergency": "life_ring" + }, + "name": "Life Ring" + }, "emergency/phone": { "icon": "emergency-phone", "fields": [ @@ -5896,7 +6230,6 @@ "fields": [ "name", "oneway", - "maxspeed", "lanes", "surface", "structure", @@ -6588,7 +6921,8 @@ }, "highway/traffic_mirror": { "geometry": [ - "point" + "point", + "vertex" ], "tags": { "highway": "traffic_mirror" @@ -9761,6 +10095,25 @@ "terms": [], "name": "Office" }, + "office/physician": { + "icon": "commercial", + "fields": [ + "name", + "address", + "building_area", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "physician" + }, + "searchable": false, + "name": "Physician" + }, "office/travel_agent": { "icon": "suitcase", "fields": [ @@ -10143,25 +10496,6 @@ "terms": [], "name": "NGO Office" }, - "office/physician": { - "icon": "commercial", - "fields": [ - "name", - "address", - "building_area", - "opening_hours" - ], - "geometry": [ - "point", - "vertex", - "area" - ], - "tags": { - "office": "physician" - }, - "terms": [], - "name": "Physician" - }, "office/political_party": { "icon": "commercial", "fields": [ diff --git a/data/presets/presets/amenity/doctors.json b/data/presets/presets/amenity/doctors.json index 2a765a01d..4d0c422e3 100644 --- a/data/presets/presets/amenity/doctors.json +++ b/data/presets/presets/amenity/doctors.json @@ -11,7 +11,8 @@ "area" ], "terms": [ - "medic*" + "medic*", + "physician" ], "tags": { "amenity": "doctors" diff --git a/data/presets/presets/amenity/shower.json b/data/presets/presets/amenity/shower.json new file mode 100644 index 000000000..1d5fcbe89 --- /dev/null +++ b/data/presets/presets/amenity/shower.json @@ -0,0 +1,22 @@ +{ + "icon": "water", + "fields": [ + "operator", + "opening_hours", + "fee", + "supervised", + "building_area" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "terms": [ + "rain closet" + ], + "tags": { + "amenity": "shower" + }, + "name": "Shower" +} diff --git a/data/presets/presets/attraction/amusement_ride.json b/data/presets/presets/attraction/amusement_ride.json new file mode 100644 index 000000000..52fbe5c7a --- /dev/null +++ b/data/presets/presets/attraction/amusement_ride.json @@ -0,0 +1,20 @@ +{ + "icon": "amusement-park", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "theme park", + "carnival ride" + ], + "tags": { + "attraction": "amusement_ride" + }, + "name": "Amusement Ride" +} diff --git a/data/presets/presets/attraction/animal.json b/data/presets/presets/attraction/animal.json new file mode 100644 index 000000000..f9b36d663 --- /dev/null +++ b/data/presets/presets/attraction/animal.json @@ -0,0 +1,23 @@ +{ + "icon": "zoo", + "fields": [ + "name", + "operator" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "zoo", + "theme park", + "animal park", + "lion", + "tiger", + "bear" + ], + "tags": { + "attraction": "animal" + }, + "name": "Animal" +} diff --git a/data/presets/presets/attraction/big_wheel.json b/data/presets/presets/attraction/big_wheel.json new file mode 100644 index 000000000..b052f1c23 --- /dev/null +++ b/data/presets/presets/attraction/big_wheel.json @@ -0,0 +1,21 @@ +{ + "icon": "amusement-park", + "fields": [ + "name", + "operator", + "height", + "opening_hours" + ], + "geometry": [ + "point" + ], + "terms": [ + "ferris wheel", + "theme park", + "amusement ride" + ], + "tags": { + "attraction": "big_wheel" + }, + "name": "Big Wheel" +} diff --git a/data/presets/presets/attraction/bumper_car.json b/data/presets/presets/attraction/bumper_car.json new file mode 100644 index 000000000..d96e75f1f --- /dev/null +++ b/data/presets/presets/attraction/bumper_car.json @@ -0,0 +1,21 @@ +{ + "icon": "car", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "theme park", + "dodgem cars", + "autoscooter" + ], + "tags": { + "attraction": "bumper_car" + }, + "name": "Bumper Car" +} diff --git a/data/presets/presets/attraction/bungee_jumping.json b/data/presets/presets/attraction/bungee_jumping.json new file mode 100644 index 000000000..4604d2845 --- /dev/null +++ b/data/presets/presets/attraction/bungee_jumping.json @@ -0,0 +1,22 @@ +{ + "icon": "pitch", + "fields": [ + "name", + "operator", + "height", + "opening_hours" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "theme park", + "bungy jumping", + "jumping platform" + ], + "tags": { + "attraction": "bungee_jumping" + }, + "name": "Bungee Jumping" +} diff --git a/data/presets/presets/attraction/carousel.json b/data/presets/presets/attraction/carousel.json new file mode 100644 index 000000000..3ae2ce844 --- /dev/null +++ b/data/presets/presets/attraction/carousel.json @@ -0,0 +1,25 @@ +{ + "icon": "horse-riding", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "theme park", + "roundabout", + "merry-go-round", + "galloper", + "jumper", + "horseabout", + "flying horses" + ], + "tags": { + "attraction": "carousel" + }, + "name": "Carousel" +} diff --git a/data/presets/presets/attraction/dark_ride.json b/data/presets/presets/attraction/dark_ride.json new file mode 100644 index 000000000..bc0c9c02d --- /dev/null +++ b/data/presets/presets/attraction/dark_ride.json @@ -0,0 +1,21 @@ +{ + "icon": "rail-metro", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point", + "line", + "area" + ], + "terms": [ + "theme park", + "ghost train" + ], + "tags": { + "attraction": "dark_ride" + }, + "name": "Dark Ride" +} diff --git a/data/presets/presets/attraction/drop_tower.json b/data/presets/presets/attraction/drop_tower.json new file mode 100644 index 000000000..6e14a2eea --- /dev/null +++ b/data/presets/presets/attraction/drop_tower.json @@ -0,0 +1,24 @@ +{ + "icon": "poi-tower", + "fields": [ + "name", + "operator", + "height", + "opening_hours" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "theme park", + "amusement ride", + "gondola", + "tower", + "big drop" + ], + "tags": { + "attraction": "drop_tower" + }, + "name": "Drop Tower" +} diff --git a/data/presets/presets/attraction/pirate_ship.json b/data/presets/presets/attraction/pirate_ship.json new file mode 100644 index 000000000..cb2edd425 --- /dev/null +++ b/data/presets/presets/attraction/pirate_ship.json @@ -0,0 +1,20 @@ +{ + "icon": "amusement-park", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point" + ], + "terms": [ + "theme park", + "carnival ride", + "amusement ride" + ], + "tags": { + "attraction": "pirate_ship" + }, + "name": "Pirate Ship" +} diff --git a/data/presets/presets/attraction/river_rafting.json b/data/presets/presets/attraction/river_rafting.json new file mode 100644 index 000000000..681ee1106 --- /dev/null +++ b/data/presets/presets/attraction/river_rafting.json @@ -0,0 +1,24 @@ +{ + "icon": "ferry", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point", + "line" + ], + "terms": [ + "theme park", + "aquatic park", + "water park", + "rafting simulator", + "river rafting ride", + "river rapids ride" + ], + "tags": { + "attraction": "river_rafting" + }, + "name": "River Rafting" +} diff --git a/data/presets/presets/attraction/roller_coaster.json b/data/presets/presets/attraction/roller_coaster.json new file mode 100644 index 000000000..74b75b5a6 --- /dev/null +++ b/data/presets/presets/attraction/roller_coaster.json @@ -0,0 +1,20 @@ +{ + "icon": "amusement-park", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "theme park", + "amusement ride" + ], + "tags": { + "attraction": "roller_coaster" + }, + "name": "Roller Coaster" +} diff --git a/data/presets/presets/attraction/train.json b/data/presets/presets/attraction/train.json new file mode 100644 index 000000000..079699dc8 --- /dev/null +++ b/data/presets/presets/attraction/train.json @@ -0,0 +1,25 @@ +{ + "icon": "rail", + "fields": [ + "name", + "operator", + "fee", + "opening_hours" + ], + "geometry": [ + "point", + "line" + ], + "terms": [ + "theme park", + "rackless train", + "road train", + "Tschu-Tschu train", + "dotto train", + "park train" + ], + "tags": { + "attraction": "train" + }, + "name": "Tourist Train" +} diff --git a/data/presets/presets/attraction/water_slide.json b/data/presets/presets/attraction/water_slide.json new file mode 100644 index 000000000..692629753 --- /dev/null +++ b/data/presets/presets/attraction/water_slide.json @@ -0,0 +1,24 @@ +{ + "icon": "swimming", + "fields": [ + "name", + "operator", + "opening_hours" + ], + "geometry": [ + "line", + "area" + ], + "terms": [ + "theme park", + "aquatic park", + "water park", + "flumes", + "water chutes", + "hydroslides" + ], + "tags": { + "attraction": "water_slide" + }, + "name": "Water Slide" +} diff --git a/data/presets/presets/emergency/life_ring.json b/data/presets/presets/emergency/life_ring.json new file mode 100644 index 000000000..70895c97e --- /dev/null +++ b/data/presets/presets/emergency/life_ring.json @@ -0,0 +1,21 @@ +{ + "icon": "circle-stroked", + "fields": [ + "ref", + "operator" + ], + "geometry": [ + "point", + "vertex" + ], + "terms": [ + "life buoy", + "kisby ring", + "kisbie ring", + "perry buoy" + ], + "tags": { + "emergency": "life_ring" + }, + "name": "Life Ring" +} diff --git a/data/presets/presets/highway/living_street.json b/data/presets/presets/highway/living_street.json index 52f78ce74..d02655625 100644 --- a/data/presets/presets/highway/living_street.json +++ b/data/presets/presets/highway/living_street.json @@ -3,7 +3,6 @@ "fields": [ "name", "oneway", - "maxspeed", "lanes", "surface", "structure", diff --git a/data/presets/presets/highway/traffic_mirror.json b/data/presets/presets/highway/traffic_mirror.json index 358b13878..29ca4d78f 100644 --- a/data/presets/presets/highway/traffic_mirror.json +++ b/data/presets/presets/highway/traffic_mirror.json @@ -1,6 +1,7 @@ { "geometry": [ - "point" + "point", + "vertex" ], "tags": { "highway": "traffic_mirror" diff --git a/data/presets/presets/office/physician.json b/data/presets/presets/office/_physician.json similarity index 91% rename from data/presets/presets/office/physician.json rename to data/presets/presets/office/_physician.json index 3fac3e38c..42113ef36 100644 --- a/data/presets/presets/office/physician.json +++ b/data/presets/presets/office/_physician.json @@ -14,6 +14,6 @@ "tags": { "office": "physician" }, - "terms": [], + "searchable": false, "name": "Physician" } diff --git a/data/taginfo.json b/data/taginfo.json index 0dfc9f114..8a28a452c 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -479,6 +479,10 @@ "key": "amenity", "value": "shelter" }, + { + "key": "amenity", + "value": "shower" + }, { "key": "amenity", "value": "social_facility" @@ -606,6 +610,58 @@ { "key": "area:highway" }, + { + "key": "attraction", + "value": "amusement_ride" + }, + { + "key": "attraction", + "value": "animal" + }, + { + "key": "attraction", + "value": "big_wheel" + }, + { + "key": "attraction", + "value": "bumper_car" + }, + { + "key": "attraction", + "value": "bungee_jumping" + }, + { + "key": "attraction", + "value": "carousel" + }, + { + "key": "attraction", + "value": "dark_ride" + }, + { + "key": "attraction", + "value": "drop_tower" + }, + { + "key": "attraction", + "value": "pirate_ship" + }, + { + "key": "attraction", + "value": "river_rafting" + }, + { + "key": "attraction", + "value": "roller_coaster" + }, + { + "key": "attraction", + "value": "train" + }, + { + "key": "attraction", + "value": "water_slide" + }, { "key": "barrier" }, @@ -1066,6 +1122,10 @@ "key": "emergency", "value": "fire_hydrant" }, + { + "key": "emergency", + "value": "life_ring" + }, { "key": "emergency", "value": "phone" @@ -1930,6 +1990,10 @@ { "key": "office" }, + { + "key": "office", + "value": "physician" + }, { "key": "office", "value": "travel_agent" @@ -2002,10 +2066,6 @@ "key": "office", "value": "ngo" }, - { - "key": "office", - "value": "physician" - }, { "key": "office", "value": "political_party" diff --git a/dist/locales/en.json b/dist/locales/en.json index 477d1ec9a..a5259e55b 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2559,7 +2559,7 @@ }, "amenity/doctors": { "name": "Doctor", - "terms": "medic*" + "terms": "medic*,physician" }, "amenity/dojo": { "name": "Dojo / Martial Arts Academy", @@ -2765,6 +2765,10 @@ "name": "Shelter", "terms": "lean-to,gazebo,picnic" }, + "amenity/shower": { + "name": "Shower", + "terms": "rain closet" + }, "amenity/social_facility": { "name": "Social Facility", "terms": "" @@ -2893,6 +2897,58 @@ "name": "Road Surface", "terms": "" }, + "attraction/amusement_ride": { + "name": "Amusement Ride", + "terms": "theme park,carnival ride" + }, + "attraction/animal": { + "name": "Animal", + "terms": "zoo,theme park,animal park,lion,tiger,bear" + }, + "attraction/big_wheel": { + "name": "Big Wheel", + "terms": "ferris wheel,theme park,amusement ride" + }, + "attraction/bumper_car": { + "name": "Bumper Car", + "terms": "theme park,dodgem cars,autoscooter" + }, + "attraction/bungee_jumping": { + "name": "Bungee Jumping", + "terms": "theme park,bungy jumping,jumping platform" + }, + "attraction/carousel": { + "name": "Carousel", + "terms": "theme park,roundabout,merry-go-round,galloper,jumper,horseabout,flying horses" + }, + "attraction/dark_ride": { + "name": "Dark Ride", + "terms": "theme park,ghost train" + }, + "attraction/drop_tower": { + "name": "Drop Tower", + "terms": "theme park,amusement ride,gondola,tower,big drop" + }, + "attraction/pirate_ship": { + "name": "Pirate Ship", + "terms": "theme park,carnival ride,amusement ride" + }, + "attraction/river_rafting": { + "name": "River Rafting", + "terms": "theme park,aquatic park,water park,rafting simulator,river rafting ride,river rapids ride" + }, + "attraction/roller_coaster": { + "name": "Roller Coaster", + "terms": "theme park,amusement ride" + }, + "attraction/train": { + "name": "Tourist Train", + "terms": "theme park,rackless train,road train,Tschu-Tschu train,dotto train,park train" + }, + "attraction/water_slide": { + "name": "Water Slide", + "terms": "theme park,aquatic park,water park,flumes,water chutes,hydroslides" + }, "barrier": { "name": "Barrier", "terms": "" @@ -3357,6 +3413,10 @@ "name": "Fire Hydrant", "terms": "fire plug" }, + "emergency/life_ring": { + "name": "Life Ring", + "terms": "life buoy,kisby ring,kisbie ring,perry buoy" + }, "emergency/phone": { "name": "Emergency Phone", "terms": "" @@ -4233,6 +4293,10 @@ "name": "Office", "terms": "" }, + "office/physician": { + "name": "Physician", + "terms": "" + }, "office/travel_agent": { "name": "Travel Agency", "terms": "" @@ -4305,10 +4369,6 @@ "name": "NGO Office", "terms": "" }, - "office/physician": { - "name": "Physician", - "terms": "" - }, "office/political_party": { "name": "Political Party", "terms": "" diff --git a/modules/renderer/tile_layer.js b/modules/renderer/tile_layer.js index 164dbba38..4a1735fa4 100644 --- a/modules/renderer/tile_layer.js +++ b/modules/renderer/tile_layer.js @@ -7,7 +7,7 @@ import { utilPrefixCSSProperty } from '../util'; export function rendererTileLayer(context) { var tileSize = 256, - tile = d3geoTile(), + geotile = d3geoTile(), projection, cache = {}, tileOrigin, @@ -40,7 +40,8 @@ export function rendererTileLayer(context) { return [ Math.floor(t[0] * power), Math.floor(t[1] * power), - t[2] + distance]; + t[2] + distance + ]; } @@ -74,14 +75,31 @@ export function rendererTileLayer(context) { // Update tiles based on current state of `projection`. function background(selection) { - tile.scale(projection.scale() * 2 * Math.PI) - .translate(projection.translate()); + z = Math.max(Math.log(projection.scale() * 2 * Math.PI) / Math.log(2) - 8, 0); + + var pixelOffset; + if (source) { + pixelOffset = [ + source.offset()[0] * Math.pow(2, z), + source.offset()[1] * Math.pow(2, z) + ]; + } else { + pixelOffset = [0, 0]; + } + + var translate = [ + projection.translate()[0] + pixelOffset[0], + projection.translate()[1] + pixelOffset[1] + ]; + + geotile + .scale(projection.scale() * 2 * Math.PI) + .translate(translate); tileOrigin = [ - projection.scale() * Math.PI - projection.translate()[0], - projection.scale() * Math.PI - projection.translate()[1]]; - - z = Math.max(Math.log(projection.scale() * 2 * Math.PI) / Math.log(2) - 8, 0); + projection.scale() * Math.PI - translate[0], + projection.scale() * Math.PI - translate[1] + ]; render(selection); } @@ -96,7 +114,7 @@ export function rendererTileLayer(context) { var showDebug = context.getDebug('tile') && !source.overlay; if (source.validZoom(z)) { - tile().forEach(function(d) { + geotile().forEach(function(d) { addSource(d); if (d[3] === '') return; if (typeof d[3] !== 'string') return; // Workaround for #2295 @@ -115,11 +133,6 @@ export function rendererTileLayer(context) { }); } - var pixelOffset = [ - source.offset()[0] * Math.pow(2, z), - source.offset()[1] * Math.pow(2, z) - ]; - function load(d) { cache[d[3]] = true; @@ -143,16 +156,16 @@ export function rendererTileLayer(context) { var _ts = tileSize * Math.pow(2, z - d[2]); var scale = tileSizeAtZoom(d, z); return 'translate(' + - ((d[0] * _ts) - tileOrigin[0] + pixelOffset[0]) + 'px,' + - ((d[1] * _ts) - tileOrigin[1] + pixelOffset[1]) + 'px)' + + ((d[0] * _ts) - tileOrigin[0]) + 'px,' + + ((d[1] * _ts) - tileOrigin[1]) + 'px) ' + 'scale(' + scale + ',' + scale + ')'; } function tileCenter(d) { var _ts = tileSize * Math.pow(2, z - d[2]); return [ - ((d[0] * _ts) - tileOrigin[0] + pixelOffset[0] + (_ts / 2)), - ((d[1] * _ts) - tileOrigin[1] + pixelOffset[1] + (_ts / 2)) + ((d[0] * _ts) - tileOrigin[0] + (_ts / 2)), + ((d[1] * _ts) - tileOrigin[1] + (_ts / 2)) ]; } @@ -164,7 +177,7 @@ export function rendererTileLayer(context) { // Pick a representative tile near the center of the viewport // (This is useful for sampling the imagery vintage) - var dims = tile.size(), + var dims = geotile.size(), mapCenter = [dims[0] / 2, dims[1] / 2], minDist = Math.max(dims[0], dims[1]), nearCenter; @@ -261,8 +274,8 @@ export function rendererTileLayer(context) { background.dimensions = function(_) { - if (!arguments.length) return tile.size(); - tile.size(_); + if (!arguments.length) return geotile.size(); + geotile.size(_); return background; }; @@ -271,7 +284,7 @@ export function rendererTileLayer(context) { if (!arguments.length) return source; source = _; cache = {}; - tile.scaleExtent(source.scaleExtent); + geotile.scaleExtent(source.scaleExtent); return background; }; diff --git a/modules/ui/source_switch.js b/modules/ui/source_switch.js index 3a534bec0..5b6af31c9 100644 --- a/modules/ui/source_switch.js +++ b/modules/ui/source_switch.js @@ -16,9 +16,8 @@ export function uiSourceSwitch(context) { var live = d3.select(this) .classed('live'); - context.connection() - .switch(live ? keys[1] : keys[0]); - + context.history().clearSaved(); + context.connection().switch(live ? keys[1] : keys[0]); context.enter(modeBrowse(context)); context.flush(); diff --git a/package.json b/package.json index e81347773..0d4942b43 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "dist:svg:id": "node svg/spriteify.js --svg svg/iD-sprite.src.svg --json svg/iD-sprite.json > dist/img/iD-sprite.svg", "imagery": "node data/update_imagery", "lint": "eslint *.js js/id test/spec modules", - "prepublish": "npm run all", "start": "node development_server.js develop", "test": "npm-run-all -s lint build test:**", "test:phantom": "phantomjs --web-security=no node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js test/index.html spec", @@ -33,7 +32,7 @@ "marked": "0.3.6", "osm-auth": "1.0.2", "rbush": "2.0.1", - "@mapbox/sexagesimal": "1.0.0", + "@mapbox/sexagesimal": "1.1.0", "@mapbox/togeojson": "0.16.0", "wmf-sitematrix": "0.1.4" }, @@ -60,13 +59,13 @@ "phantomjs-prebuilt": "~2.1.11", "request": "^2.81.0", "rollup": "0.45.2", - "rollup-plugin-commonjs": "8.1.0", + "rollup-plugin-commonjs": "8.1.1", "rollup-plugin-json": "2.2.0", "rollup-plugin-node-resolve": "3.0.0", "shelljs": "^0.7.5", "shx": "^0.2.1", - "sinon": "^2.3.0", - "sinon-chai": "^2.12.0", + "sinon": "^3.2.1", + "sinon-chai": "^2.13.0", "smash": "0.0", "svg-sprite": "1.3.7", "uglify-js": "^3.0.0",