From: Tom Hughes Date: Sun, 1 Feb 2015 11:32:02 +0000 (+0000) Subject: Merge branch 'master' into routing X-Git-Tag: live~4276^2~5^2~7 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/13d650e2dcbe2467a82253097e10d58dddf9d9d2?hp=-c Merge branch 'master' into routing --- 13d650e2dcbe2467a82253097e10d58dddf9d9d2 diff --combined app/assets/stylesheets/common.scss index 8d40bbe39,36e0278e6..ff16ad66b --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@@ -907,15 -907,13 +907,15 @@@ nav.secondary } } -/* Rules for the search box */ +/* Rules for the search and direction forms */ -header .search_form { +header .search_forms, +.directions_form { display: none; } -.search_form { +.search_form, +.directions_form { position: relative; padding: $lineheight/2; background-color: $lightgrey; @@@ -929,37 -927,23 +929,37 @@@ input[type=text] { width: 100%; height: 30px; - border-right: none; - transition: 300ms linear; } + input[type=text].overflow { + border-right: none; + } + input:focus { outline: none; box-shadow: 0px 0px 7px #9ED485; } - input[type=submit] { + input[type=submit].float { float: right; width: auto; min-width: 0; border-radius: 0 2px 2px 0; } + select { + /* this next line is to polyfill the vertical alignment of text within a select element, + * which is different between firefox and chrome. */ + padding: 0.3em 0; + } + + .query_options { + text-align: right; + font-size: 10px; + color: $blue; + } + .describe_location { position: absolute; top: 6px; @@@ -967,33 -951,6 +967,33 @@@ font-size: 10px; color: $blue; } + + .switch_link { + float: right; + width: auto; + min-width: 0; + margin-left: 6px; + } + + img.button { + display: block; + } + + span.force_width { + width: 100%; + padding-right: 25px; + display: block; + } + + select.routing_engines { + min-height: 30px; + margin: 0px 0px 5px 25px; + } + + div.line { + width: 100%; + margin: 0px 0px 5px 0px; + } } /* Rules for the map key which appears in the popout sidebar */ @@@ -1016,7 -973,7 +1016,7 @@@ border-bottom: $keyline; cursor: pointer; &:first-child { border-top: $keyline; } - &.selected { background: #FFFFE6; } + &.selected { background: $list-highlight; } } .search_details { @@@ -1032,47 -989,6 +1032,47 @@@ color: #f00; } +/* Rules for routing */ + +#sidebar_content>table { + padding: 5px 20px 10px 15px; + width: 100%; + border-collapse: separate; +} + +div.direction { + background-image: image-url('routing-sprite.png'); + width: 20px; + height: 20px; + background-repeat: no-repeat; +} +@for $i from 1 through 17 { +div.direction.i#{$i} { background-position: #{($i)*-20+20}px 0px; } +} + +p#routing_summary { + padding: 0 $lineheight $lineheight/4; +} + +td.instruction, td.distance { + padding-top: $lineheight/5; + padding-bottom: $lineheight/5; + border-bottom: 1px solid #DDD; +} +td.distance { + color: #BBB; + text-align: right; + font-size: x-small; +} +tr.turn { + cursor: pointer; +} +tr.turn:hover { + background: $list-highlight; +} +.routing_engines, #route_from, #route_to { margin-left: 25px; } +.routing_marker { width: 15px; position: absolute; } + /* Rules for entity history */ #sidebar_content { @@@ -1094,7 -1010,7 +1094,7 @@@ border-bottom: 1px solid #ddd; cursor: pointer; - &.selected { background: #FFFFE6; } + &.selected { background: $list-highlight; } /* color is derived from changeset bbox fillColor in history.js */ } @@@ -1251,7 -1167,7 +1251,7 @@@ } &.selected { - background: #FFFFE6; + background: $list-highlight; } } } @@@ -1312,15 -1228,6 +1312,15 @@@ } } +/* Rules for the routing sidebar */ + +#sidebar_content { + #routing_credit { + text-align: center; + padding: 0.5em; + } +} + /* Rules for edit pages */ .site-edit { @@@ -1954,6 -1861,10 +1954,10 @@@ display: block; } + select { + padding: 2px; + } + input[type="checkbox"], input[type="radio"] { margin-right: 5px; @@@ -1964,6 -1875,7 +1968,7 @@@ input[type="email"] input[type="url"], input[type="password"], textarea { + background-color: #fff; border: 1px solid #ccc; padding: 2px 5px; margin: 0; diff --combined app/assets/stylesheets/small.scss index 950e1214d,e9d0a4779..950e1214d --- a/app/assets/stylesheets/small.scss +++ b/app/assets/stylesheets/small.scss @@@ -36,12 -36,12 +36,12 @@@ header display: none; } - .search_form { + .search_forms { display: block; } } -#sidebar .search_form, +#sidebar .search_forms, #edit_tab, #export_tab { display: none; diff --combined config/locales/en.yml index d2797511b,9424b7fde..88d42282c --- a/config/locales/en.yml +++ b/config/locales/en.yml @@@ -375,8 -375,10 +375,10 @@@ en prefix_format: "%{name}" prefix: aerialway: + cable_car: "Cable Car" chair_lift: "Chair Lift" drag_lift: "Drag Lift" + gondola: "Gondola Lift" station: "Aerialway Station" aeroway: aerodrome: "Aerodrome" @@@ -387,11 -389,9 +389,9 @@@ taxiway: "Taxiway" terminal: "Terminal" amenity: - airport: "Airport" + animal_shelter: "Animal Shelter" arts_centre: "Arts Centre" - artwork: "Artwork" atm: "ATM" - auditorium: "Auditorium" bank: "Bank" bar: "Bar" bbq: "BBQ" @@@ -399,6 -399,7 +399,7 @@@ bicycle_parking: "Cycle Parking" bicycle_rental: "Cycle Rental" biergarten: "Beer Garden" + boat_rental: "Boat Rental" brothel: "Brothel" bureau_de_change: "Bureau de Change" bus_station: "Bus Station" @@@ -408,9 -409,10 +409,10 @@@ car_wash: "Car Wash" casino: "Casino" charging_station: "Charging Station" + childcare: "Childcare" cinema: "Cinema" clinic: "Clinic" - club: "Club" + clock: "Clock" college: "College" community_centre: "Community Centre" courthouse: "Courthouse" @@@ -429,25 -431,25 +431,25 @@@ food_court: "Food Court" fountain: "Fountain" fuel: "Fuel" + gambling: "Gambling" grave_yard: "Grave Yard" gym: "Fitness Centre / Gym" - hall: "Hall" health_centre: "Health Centre" hospital: "Hospital" - hotel: "Hotel" hunting_stand: "Hunting Stand" ice_cream: "Ice Cream" kindergarten: "Kindergarten" library: "Library" market: "Market" marketplace: "Marketplace" - mountain_rescue: "Mountain Rescue" + monastery: "Monastery" + motorcycle_parking: "Motorcycle Parking" nightclub: "Night Club" nursery: "Nursery" nursing_home: "Nursing Home" office: "Office" - park: "Park" parking: "Parking" + parking_entrance: "Parking Entrance" pharmacy: "Pharmacy" place_of_worship: "Place of Worship" police: "Police" @@@ -457,7 -459,6 +459,6 @@@ prison: "Prison" pub: "Pub" public_building: "Public Building" - public_market: "Public Market" reception_area: "Reception Area" recycling: "Recycling Point" restaurant: "Restaurant" @@@ -466,13 -467,11 +467,11 @@@ school: "School" shelter: "Shelter" shop: "Shop" - shopping: "Shopping" shower: "Shower" social_centre: "Social Centre" social_club: "Social Club" social_facility: "Social Facility" studio: "Studio" - supermarket: "Supermarket" swimming_pool: "Swimming Pool" taxi: "Taxi" telephone: "Public Telephone" @@@ -484,8 -483,7 +483,7 @@@ veterinary: "Veterinary Surgery" village_hall: "Village Hall" waste_basket: "Waste Basket" - wifi: "WiFi Access" - WLAN: "WiFi Access" + waste_disposal: "Waste Disposal" youth_centre: "Youth Centre" boundary: administrative: "Administrative Boundary" @@@ -500,22 -498,35 +498,35 @@@ "yes": "Bridge" building: "yes": "Building" + craft: + brewery: "Brewery" + carpenter: "Carpenter" + electrician: "Electrician" + gardener: "Gardener" + painter: "Painter" + photographer: "Photographer" + plumber: "Plumber" + shoemaker: "Shoemaker" + tailor: "Tailor" + "yes": "Craft Shop" emergency: - fire_hydrant: "Fire Hydrant" + ambulance_station: "Ambulance Station" + defibrillator: "Defibrillator" + landing_site: "Emergency Landing Site" phone: "Emergency Phone" highway: + abandoned: "Abandoned Highway" bridleway: "Bridleway" bus_guideway: "Guided Bus Lane" bus_stop: "Bus Stop" - byway: "Byway" construction: "Highway under Construction" cycleway: "Cycle Path" + elevator: "Elevator" emergency_access_point: "Emergency Access Point" footway: "Footpath" ford: "Ford" living_street: "Living Street" milestone: "Milestone" - minor: "Minor Road" motorway: "Motorway" motorway_junction: "Motorway Junction" motorway_link: "Motorway Road" @@@ -536,37 -547,44 +547,44 @@@ speed_camera: "Speed Camera" steps: "Steps" street_lamp: "Street Lamp" - stile: "Stile" tertiary: "Tertiary Road" tertiary_link: "Tertiary Road" track: "Track" + traffic_signals: "Traffic Signals" trail: "Trail" trunk: "Trunk Road" trunk_link: "Trunk Road" unclassified: "Unclassified Road" unsurfaced: "Unsurfaced Road" + "yes" : "Road" historic: archaeological_site: "Archaeological Site" battlefield: "Battlefield" boundary_stone: "Boundary Stone" - building: "Building" + building: "Historic Building" + bunker: "Bunker" castle: "Castle" church: "Church" + city_gate: "City Gate" citywalls: "City Walls" fort: "Fort" + heritage: "Heritage Site" house: "House" icon: "Icon" manor: "Manor" memorial: "Memorial" mine: "Mine" monument: "Monument" - museum: "Museum" + roman_road: "Roman Road" ruins: "Ruins" + stone: "Stone" tomb: "Tomb" tower: "Tower" wayside_cross: "Wayside Cross" wayside_shrine: "Wayside Shrine" wreck: "Wreck" + junction: + "yes": "Junction" landuse: allotments: "Allotments" basin: "Basin" @@@ -588,9 -606,6 +606,6 @@@ military: "Military Area" mine: "Mine" orchard: "Orchard" - nature_reserve: "Nature Reserve" - park: "Park" - piste: "Piste" quarry: "Quarry" railway: "Railway" recreation_ground: "Recreation Ground" @@@ -601,16 -616,19 +616,19 @@@ road: "Road Area" village_green: "Village Green" vineyard: "Vineyard" - wetland: "Wetland" - wood: "Wood" + "yes": "Landuse" leisure: beach_resort: "Beach Resort" bird_hide: "Bird Hide" + club: "Club" common: "Common Land" + dog_park: "Dog Park" fishing: "Fishing Area" + fitness_centre: "Fitness Centre" fitness_station: "Fitness Station" garden: "Garden" golf_course: "Golf Course" + horse_riding: "Horse Riding" ice_rink: "Ice Rink" marina: "Marina" miniature_golf: "Miniature Golf" @@@ -619,6 -637,7 +637,7 @@@ pitch: "Sports Pitch" playground: "Playground" recreation_ground: "Recreation Ground" + resort: "Resort" sauna: "Sauna" slipway: "Slipway" sports_centre: "Sports Centre" @@@ -626,6 -645,13 +645,13 @@@ swimming_pool: "Swimming Pool" track: "Running Track" water_park: "Water Park" + "yes": "Leisure" + man_made: + lighthouse: "Lighthouse" + pipeline: "Pipeline" + tower: "Tower" + works: "Factory" + "yes": "Man-made" military: airfield: "Military Airfield" barracks: "Barracks" @@@ -637,16 -663,15 +663,15 @@@ beach: "Beach" cape: "Cape" cave_entrance: "Cave Entrance" - channel: "Channel" cliff: "Cliff" crater: "Crater" dune: "Dune" - feature: "Feature" fell: "Fell" fjord: "Fjord" forest: "Forest" geyser: "Geyser" glacier: "Glacier" + grassland: "Grassland" heath: "Heath" hill: "Hill" island: "Island" @@@ -658,11 -683,11 +683,11 @@@ point: "Point" reef: "Reef" ridge: "Ridge" - river: "River" rock: "Rock" + saddle: "Saddle" + sand: "Sand" scree: "Scree" scrub: "Scrub" - shoal: "Shoal" spring: "Spring" stone: "Stone" strait: "Strait" @@@ -671,10 -696,10 +696,10 @@@ volcano: "Volcano" water: "Water" wetland: "Wetland" - wetlands: "Wetlands" wood: "Wood" office: accountant: "Accountant" + administrative: "Admininstration" architect: "Architect" company: "Company" employment_agency: "Employment Agency" @@@ -687,6 -712,8 +712,8 @@@ travel_agent: "Travel Agency" "yes": "Office" place: + allotments: "Allotments" + block: "Block" airport: "Airport" city: "City" country: "Country" @@@ -711,6 -738,7 +738,7 @@@ town: "Town" unincorporated_area: "Unincorporated Area" village: "Village" + "yes": "Place" railway: abandoned: "Abandoned Railway" construction: "Railway under Construction" @@@ -736,9 -764,6 +764,6 @@@ switch: "Railway Points" tram: "Tramway" tram_stop: "Tram Stop" - yard: "Railway Yard" - route: - bus: "Bus Route" shop: alcohol: "Off License" antiques: "Antiques" @@@ -817,6 -842,7 +842,7 @@@ "yes": "Shop" tourism: alpine_hut: "Alpine Hut" + apartment: "Apartment" artwork: "Artwork" attraction: "Attraction" bed_and_breakfast: "Bed and Breakfast" @@@ -824,16 -850,15 +850,15 @@@ camp_site: "Camp Site" caravan_site: "Caravan Site" chalet: "Chalet" + gallery: "Gallery" guest_house: "Guest House" hostel: "Hostel" hotel: "Hotel" information: "Information" - lean_to: "Lean To" motel: "Motel" museum: "Museum" picnic_site: "Picnic Site" theme_park: "Theme Park" - valley: "Valley" viewpoint: "Viewpoint" zoo: "Zoo" tunnel: @@@ -843,7 -868,6 +868,6 @@@ artificial: "Artificial Waterway" boatyard: "Boatyard" canal: "Canal" - connector: "Waterway Connector" dam: "Dam" derelict_canal: "Derelict Canal" ditch: "Ditch" @@@ -851,16 -875,14 +875,14 @@@ drain: "Drain" lock: "Lock" lock_gate: "Lock Gate" - mineral_spring: "Mineral Spring" mooring: "Mooring" rapids: "Rapids" river: "River" - riverbank: "Riverbank" stream: "Stream" wadi: "Wadi" waterfall: "Waterfall" - water_point: "Water Point" weir: "Weir" + "yes": "Waterway" admin_levels: level2: "Country Boundary" level4: "State Boundary" @@@ -1356,12 -1378,6 +1378,12 @@@ close: Close search: search: Search + get_directions: "Get directions" + get_directions_title: "Find directions between two points" + close_directions: "Close directions" + close_directions_title: "Close the directions panel" + from: "From" + to: "To" where_am_i: "Where am I?" where_am_i_title: Describe the current location using the search engine submit_text: "Go" @@@ -2156,40 -2172,6 +2178,40 @@@ comment_and_resolve: Comment & Resolve comment: Comment edit_help: Move the map and zoom in on a location you want to edit, then click here. + directions: + engines: + graphhopper_bicycle: "Bicycle (GraphHopper)" + graphhopper_foot: "Foot (GraphHopper)" + mapquest_bicycle: "Bicycle (MapQuest)" + mapquest_car: "Car (MapQuest)" + mapquest_foot: "Foot (MapQuest)" + osrm_car: "Car (OSRM)" + directions: "Directions" + distance: "Distance" + errors: + no_route: "Couldn't find a route between those two places." + no_place: "Sorry - couldn't find that place." + instructions: + continue_on: "Continue on " + slight_right: "Slight right onto " + turn_right: "Turn right onto " + sharp_right: "Sharp right onto " + uturn: "U-turn along " + sharp_left: "Sharp left onto " + turn_left: "Turn left onto " + slight_left: "Slight left onto " + via_point: "(via point) " + follow: "Follow " + roundabout: "At roundabout take " + leave_roundabout: "Leave roundabout - " + stay_roundabout: "Stay on roundabout - " + start: "Start at end of " + destination: "Reach destination" + against_oneway: "Go against one-way on " + end_oneway: "End of one-way on " + unnamed: "(unnamed)" + courtesy: "Directions courtesy of %{link}" + time: "Time" query: node: Node way: Way