Merge pull request #33 from tomhughes/routing

Routing tweaks
This commit is contained in:
Richard Fairhurst 2015-02-01 15:22:15 +00:00
commit 1f0884a34c
35 changed files with 532 additions and 259 deletions

View file

@ -33,6 +33,10 @@ folder 'vendor/assets' do
from 'git://github.com/jfirebaugh/leaflet-osm.git' do from 'git://github.com/jfirebaugh/leaflet-osm.git' do
file 'leaflet.osm.js', 'leaflet-osm.js' file 'leaflet.osm.js', 'leaflet-osm.js'
end end
from 'git://github.com/jieter/Leaflet.encoded.git' do
file 'leaflet.polyline.js', 'Polyline.encoded.js'
end
end end
folder 'ohauth' do folder 'ohauth' do

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1,5 +1,5 @@
//= require_self //= require_self
//= require_tree ./directions_engines //= require_tree ./directions
OSM.Directions = function (map) { OSM.Directions = function (map) {
var awaitingGeocode; // true if the user has requested a route, but we're waiting on a geocode result var awaitingGeocode; // true if the user has requested a route, but we're waiting on a geocode result
@ -55,12 +55,13 @@ OSM.Directions = function (map) {
// make text the same in both text boxes // make text the same in both text boxes
var value = e.target.value; var value = e.target.value;
endpoint.setValue(value) endpoint.setValue(value)
endpoint.getGeocode();
}); });
endpoint.setValue = function(value) { endpoint.setValue = function(value) {
endpoint.value = value; endpoint.value = value;
delete endpoint.latlng;
input.val(value); input.val(value);
endpoint.getGeocode();
} }
endpoint.getGeocode = function() { endpoint.getGeocode = function() {
@ -338,6 +339,10 @@ OSM.Directions = function (map) {
if (params.from) { if (params.from) {
endpoints[0].setValue(params.from); endpoints[0].setValue(params.from);
endpoints[1].setValue("");
} else {
endpoints[0].setValue("");
endpoints[1].setValue("");
} }
var o = route[0] && L.latLng(route[0].split(',')), var o = route[0] && L.latLng(route[0].split(',')),

View file

@ -54,11 +54,9 @@ function OSRMEngine() {
previousPoints = points; previousPoints = points;
hintData = data.hint_data; hintData = data.hint_data;
var line = L.PolylineUtil.decode(data.route_geometry); var line = L.PolylineUtil.decode(data.route_geometry, {
for (var i = 0; i < line.length; i++) { precision: 6
line[i].lat /= 10; });
line[i].lng /= 10;
}
var steps = []; var steps = [];
for (i = 0; i < data.route_instructions.length; i++) { for (i = 0; i < data.route_instructions.length; i++) {

View file

@ -990,6 +990,11 @@ header .search_forms,
margin: 0px 0px 5px 25px; margin: 0px 0px 5px 25px;
} }
input.routing_go {
min-width: 100px;
float: right;
}
div.line { div.line {
width: 100%; width: 100%;
margin: 0px 0px 5px 0px; margin: 0px 0px 5px 0px;
@ -1954,6 +1959,10 @@ tr.turn:hover {
display: block; display: block;
} }
select {
padding: 2px;
}
input[type="checkbox"], input[type="checkbox"],
input[type="radio"] { input[type="radio"] {
margin-right: 5px; margin-right: 5px;
@ -1964,6 +1973,8 @@ input[type="email"],
input[type="url"], input[type="url"],
input[type="password"], input[type="password"],
textarea { textarea {
color: #222;
background-color: #fff;
border: 1px solid #ccc; border: 1px solid #ccc;
padding: 2px 5px; padding: 2px 5px;
margin: 0; margin: 0;

View file

@ -1 +0,0 @@
../common.css.scss

View file

@ -0,0 +1 @@
../common.scss

View file

@ -1 +0,0 @@
../small.css.scss

View file

@ -0,0 +1 @@
../small.scss

View file

@ -1 +0,0 @@
../common.css.scss

View file

@ -0,0 +1 @@
../common.scss

View file

@ -1 +0,0 @@
../small.css.scss

View file

@ -0,0 +1 @@
../small.scss

View file

@ -276,12 +276,13 @@ class UserController < ApplicationController
def login def login
if params[:username] or using_open_id? if params[:username] or using_open_id?
session[:remember_me] ||= params[:remember_me]
session[:referer] ||= params[:referer] session[:referer] ||= params[:referer]
if using_open_id? if using_open_id?
session[:remember_me] ||= params[:remember_me_openid]
openid_authentication(params[:openid_url]) openid_authentication(params[:openid_url])
else else
session[:remember_me] ||= params[:remember_me]
password_authentication(params[:username], params[:password]) password_authentication(params[:username], params[:password])
end end
end end

View file

@ -12,15 +12,18 @@
<div style="width:100%; text-align:right; height:30px;"><%= link_to tag('span', { :class => "icon close"}), root_path, { :title => t('site.search.close_directions_title'), :class => "directions_close" } %></div> <div style="width:100%; text-align:right; height:30px;"><%= link_to tag('span', { :class => "icon close"}), root_path, { :title => t('site.search.close_directions_title'), :class => "directions_close" } %></div>
<div class="line"> <div class="line">
<%= image_tag "marker-green.png", :class => 'routing_marker', :id => 'marker_from', :draggable => 'true' %> <%= image_tag "marker-green.png", :class => "routing_marker", :id => "marker_from", :draggable => "true" %>
<span class="force_width"><%= text_field_tag "route_from", params[:from], :placeholder => t('site.search.from') %></span> <span class="force_width"><%= text_field_tag "route_from", params[:from], :placeholder => t('site.search.from') %></span>
</div> </div>
<div class="line"> <div class="line">
<%= image_tag "marker-red.png" , :class => 'routing_marker', :id => 'marker_to' , :draggable => 'true' %> <%= image_tag "marker-red.png", :class => "routing_marker", :id => "marker_to", :draggable => "true" %>
<span class="force_width"><%= text_field_tag "route_to" , params[:to] , :placeholder => t('site.search.to') %></span> <span class="force_width"><%= text_field_tag "route_to" , params[:to] , :placeholder => t('site.search.to') %></span>
</div> </div>
<select class='routing_engines' name='routing_engines'></select> <div class="line">
<div style="width:100%; text-align:right;"><%= submit_tag t('site.search.submit_text') %></div> <select class="routing_engines" name="routing_engines"></select>
<%= submit_tag t('site.search.submit_text'), :class => "routing_go" %>
</div>
<div class="loader_copy" style="display:none;"><div class="loader"><%= image_tag "searching.gif", :style => "vertical-align: middle;" %></div></div> <div class="loader_copy" style="display:none;"><div class="loader"><%= image_tag "searching.gif", :style => "vertical-align: middle;" %></div></div>
</form> </form>
</div> </div>

View file

@ -54,7 +54,7 @@
<span class="minorNote">(<a href="<%= t 'user.account.openid.link' %>" target="_new"><%= t 'user.account.openid.link text' %></a>)</span> <span class="minorNote">(<a href="<%= t 'user.account.openid.link' %>" target="_new"><%= t 'user.account.openid.link text' %></a>)</span>
</div> </div>
<div id="remember_me_openid" class='form-row'> <div class='form-row'>
<%= check_box_tag "remember_me_openid", "yes", false, :tabindex => 5 %> <%= check_box_tag "remember_me_openid", "yes", false, :tabindex => 5 %>
<label class="standard-label" for="remember_me_openid"><%= t 'user.login.remember' %></label> <label class="standard-label" for="remember_me_openid"><%= t 'user.login.remember' %></label>
</div> </div>

View file

@ -10,7 +10,6 @@ Rails.application.config.assets.version = '1.0'
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
Rails.application.config.assets.precompile += %w( index.js browse.js welcome.js fixthemap.js ) Rails.application.config.assets.precompile += %w( index.js browse.js welcome.js fixthemap.js )
Rails.application.config.assets.precompile += %w( user.js diary_entry.js ) Rails.application.config.assets.precompile += %w( user.js diary_entry.js )
Rails.application.config.assets.precompile += %w( routing.js )
Rails.application.config.assets.precompile += %w( large-ltr.css small-ltr.css print-ltr.css ) Rails.application.config.assets.precompile += %w( large-ltr.css small-ltr.css print-ltr.css )
Rails.application.config.assets.precompile += %w( large-rtl.css small-rtl.css print-rtl.css ) Rails.application.config.assets.precompile += %w( large-rtl.css small-rtl.css print-rtl.css )
Rails.application.config.assets.precompile += %w( leaflet-all.css leaflet.ie.css ) Rails.application.config.assets.precompile += %w( leaflet-all.css leaflet.ie.css )

View file

@ -547,7 +547,7 @@ br:
primary_link: Pennhent primary_link: Pennhent
proposed: Hent kinniget proposed: Hent kinniget
raceway: Redva raceway: Redva
residential: Takad annezet residential: Straed annezet
rest_area: Leur diskuizh rest_area: Leur diskuizh
road: Hent road: Hent
secondary: Hent eil renk secondary: Hent eil renk
@ -1278,8 +1278,12 @@ br:
changeset_comment_notification: changeset_comment_notification:
greeting: Demat, greeting: Demat,
commented: commented:
subject_own: '[OpenStreetMap] %{commenter} en deus addispleget unan eus ho
kemmoù'
subject_other: '[OpenStreetMap] %{commenter} en deus addispleget unan eus subject_other: '[OpenStreetMap] %{commenter} en deus addispleget unan eus
ho notennoù a sell ouzhoc''h' ho notennoù a sell ouzhoc''h'
your_changeset: '[OpenStreetMap] %{commenter} en deus addispleget unan eus
ho holladoù kemmoù krouet d''an %{time}'
partial_changeset_with_comment: gant an addispleg '%{changeset_comment}' partial_changeset_with_comment: gant an addispleg '%{changeset_comment}'
partial_changeset_without_comment: Hep evezhiadenn partial_changeset_without_comment: Hep evezhiadenn
message: message:
@ -2265,6 +2269,7 @@ br:
way: Hent way: Hent
relation: Darempred relation: Darempred
nothing_found: Arc'hweladur ebet kavet nothing_found: Arc'hweladur ebet kavet
error: Fazi o vont e daremmpred gant %{server}:%{error}
redaction: redaction:
edit: edit:
description: Deskrivadur description: Deskrivadur

View file

@ -375,8 +375,10 @@ en:
prefix_format: "%{name}" prefix_format: "%{name}"
prefix: prefix:
aerialway: aerialway:
cable_car: "Cable Car"
chair_lift: "Chair Lift" chair_lift: "Chair Lift"
drag_lift: "Drag Lift" drag_lift: "Drag Lift"
gondola: "Gondola Lift"
station: "Aerialway Station" station: "Aerialway Station"
aeroway: aeroway:
aerodrome: "Aerodrome" aerodrome: "Aerodrome"
@ -387,11 +389,9 @@ en:
taxiway: "Taxiway" taxiway: "Taxiway"
terminal: "Terminal" terminal: "Terminal"
amenity: amenity:
airport: "Airport" animal_shelter: "Animal Shelter"
arts_centre: "Arts Centre" arts_centre: "Arts Centre"
artwork: "Artwork"
atm: "ATM" atm: "ATM"
auditorium: "Auditorium"
bank: "Bank" bank: "Bank"
bar: "Bar" bar: "Bar"
bbq: "BBQ" bbq: "BBQ"
@ -399,6 +399,7 @@ en:
bicycle_parking: "Cycle Parking" bicycle_parking: "Cycle Parking"
bicycle_rental: "Cycle Rental" bicycle_rental: "Cycle Rental"
biergarten: "Beer Garden" biergarten: "Beer Garden"
boat_rental: "Boat Rental"
brothel: "Brothel" brothel: "Brothel"
bureau_de_change: "Bureau de Change" bureau_de_change: "Bureau de Change"
bus_station: "Bus Station" bus_station: "Bus Station"
@ -408,9 +409,10 @@ en:
car_wash: "Car Wash" car_wash: "Car Wash"
casino: "Casino" casino: "Casino"
charging_station: "Charging Station" charging_station: "Charging Station"
childcare: "Childcare"
cinema: "Cinema" cinema: "Cinema"
clinic: "Clinic" clinic: "Clinic"
club: "Club" clock: "Clock"
college: "College" college: "College"
community_centre: "Community Centre" community_centre: "Community Centre"
courthouse: "Courthouse" courthouse: "Courthouse"
@ -429,25 +431,25 @@ en:
food_court: "Food Court" food_court: "Food Court"
fountain: "Fountain" fountain: "Fountain"
fuel: "Fuel" fuel: "Fuel"
gambling: "Gambling"
grave_yard: "Grave Yard" grave_yard: "Grave Yard"
gym: "Fitness Centre / Gym" gym: "Fitness Centre / Gym"
hall: "Hall"
health_centre: "Health Centre" health_centre: "Health Centre"
hospital: "Hospital" hospital: "Hospital"
hotel: "Hotel"
hunting_stand: "Hunting Stand" hunting_stand: "Hunting Stand"
ice_cream: "Ice Cream" ice_cream: "Ice Cream"
kindergarten: "Kindergarten" kindergarten: "Kindergarten"
library: "Library" library: "Library"
market: "Market" market: "Market"
marketplace: "Marketplace" marketplace: "Marketplace"
mountain_rescue: "Mountain Rescue" monastery: "Monastery"
motorcycle_parking: "Motorcycle Parking"
nightclub: "Night Club" nightclub: "Night Club"
nursery: "Nursery" nursery: "Nursery"
nursing_home: "Nursing Home" nursing_home: "Nursing Home"
office: "Office" office: "Office"
park: "Park"
parking: "Parking" parking: "Parking"
parking_entrance: "Parking Entrance"
pharmacy: "Pharmacy" pharmacy: "Pharmacy"
place_of_worship: "Place of Worship" place_of_worship: "Place of Worship"
police: "Police" police: "Police"
@ -457,7 +459,6 @@ en:
prison: "Prison" prison: "Prison"
pub: "Pub" pub: "Pub"
public_building: "Public Building" public_building: "Public Building"
public_market: "Public Market"
reception_area: "Reception Area" reception_area: "Reception Area"
recycling: "Recycling Point" recycling: "Recycling Point"
restaurant: "Restaurant" restaurant: "Restaurant"
@ -466,13 +467,11 @@ en:
school: "School" school: "School"
shelter: "Shelter" shelter: "Shelter"
shop: "Shop" shop: "Shop"
shopping: "Shopping"
shower: "Shower" shower: "Shower"
social_centre: "Social Centre" social_centre: "Social Centre"
social_club: "Social Club" social_club: "Social Club"
social_facility: "Social Facility" social_facility: "Social Facility"
studio: "Studio" studio: "Studio"
supermarket: "Supermarket"
swimming_pool: "Swimming Pool" swimming_pool: "Swimming Pool"
taxi: "Taxi" taxi: "Taxi"
telephone: "Public Telephone" telephone: "Public Telephone"
@ -484,8 +483,7 @@ en:
veterinary: "Veterinary Surgery" veterinary: "Veterinary Surgery"
village_hall: "Village Hall" village_hall: "Village Hall"
waste_basket: "Waste Basket" waste_basket: "Waste Basket"
wifi: "WiFi Access" waste_disposal: "Waste Disposal"
WLAN: "WiFi Access"
youth_centre: "Youth Centre" youth_centre: "Youth Centre"
boundary: boundary:
administrative: "Administrative Boundary" administrative: "Administrative Boundary"
@ -500,22 +498,35 @@ en:
"yes": "Bridge" "yes": "Bridge"
building: building:
"yes": "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: emergency:
fire_hydrant: "Fire Hydrant" ambulance_station: "Ambulance Station"
defibrillator: "Defibrillator"
landing_site: "Emergency Landing Site"
phone: "Emergency Phone" phone: "Emergency Phone"
highway: highway:
abandoned: "Abandoned Highway"
bridleway: "Bridleway" bridleway: "Bridleway"
bus_guideway: "Guided Bus Lane" bus_guideway: "Guided Bus Lane"
bus_stop: "Bus Stop" bus_stop: "Bus Stop"
byway: "Byway"
construction: "Highway under Construction" construction: "Highway under Construction"
cycleway: "Cycle Path" cycleway: "Cycle Path"
elevator: "Elevator"
emergency_access_point: "Emergency Access Point" emergency_access_point: "Emergency Access Point"
footway: "Footpath" footway: "Footpath"
ford: "Ford" ford: "Ford"
living_street: "Living Street" living_street: "Living Street"
milestone: "Milestone" milestone: "Milestone"
minor: "Minor Road"
motorway: "Motorway" motorway: "Motorway"
motorway_junction: "Motorway Junction" motorway_junction: "Motorway Junction"
motorway_link: "Motorway Road" motorway_link: "Motorway Road"
@ -536,37 +547,44 @@ en:
speed_camera: "Speed Camera" speed_camera: "Speed Camera"
steps: "Steps" steps: "Steps"
street_lamp: "Street Lamp" street_lamp: "Street Lamp"
stile: "Stile"
tertiary: "Tertiary Road" tertiary: "Tertiary Road"
tertiary_link: "Tertiary Road" tertiary_link: "Tertiary Road"
track: "Track" track: "Track"
traffic_signals: "Traffic Signals"
trail: "Trail" trail: "Trail"
trunk: "Trunk Road" trunk: "Trunk Road"
trunk_link: "Trunk Road" trunk_link: "Trunk Road"
unclassified: "Unclassified Road" unclassified: "Unclassified Road"
unsurfaced: "Unsurfaced Road" unsurfaced: "Unsurfaced Road"
"yes" : "Road"
historic: historic:
archaeological_site: "Archaeological Site" archaeological_site: "Archaeological Site"
battlefield: "Battlefield" battlefield: "Battlefield"
boundary_stone: "Boundary Stone" boundary_stone: "Boundary Stone"
building: "Building" building: "Historic Building"
bunker: "Bunker"
castle: "Castle" castle: "Castle"
church: "Church" church: "Church"
city_gate: "City Gate"
citywalls: "City Walls" citywalls: "City Walls"
fort: "Fort" fort: "Fort"
heritage: "Heritage Site"
house: "House" house: "House"
icon: "Icon" icon: "Icon"
manor: "Manor" manor: "Manor"
memorial: "Memorial" memorial: "Memorial"
mine: "Mine" mine: "Mine"
monument: "Monument" monument: "Monument"
museum: "Museum" roman_road: "Roman Road"
ruins: "Ruins" ruins: "Ruins"
stone: "Stone"
tomb: "Tomb" tomb: "Tomb"
tower: "Tower" tower: "Tower"
wayside_cross: "Wayside Cross" wayside_cross: "Wayside Cross"
wayside_shrine: "Wayside Shrine" wayside_shrine: "Wayside Shrine"
wreck: "Wreck" wreck: "Wreck"
junction:
"yes": "Junction"
landuse: landuse:
allotments: "Allotments" allotments: "Allotments"
basin: "Basin" basin: "Basin"
@ -588,9 +606,6 @@ en:
military: "Military Area" military: "Military Area"
mine: "Mine" mine: "Mine"
orchard: "Orchard" orchard: "Orchard"
nature_reserve: "Nature Reserve"
park: "Park"
piste: "Piste"
quarry: "Quarry" quarry: "Quarry"
railway: "Railway" railway: "Railway"
recreation_ground: "Recreation Ground" recreation_ground: "Recreation Ground"
@ -601,16 +616,19 @@ en:
road: "Road Area" road: "Road Area"
village_green: "Village Green" village_green: "Village Green"
vineyard: "Vineyard" vineyard: "Vineyard"
wetland: "Wetland" "yes": "Landuse"
wood: "Wood"
leisure: leisure:
beach_resort: "Beach Resort" beach_resort: "Beach Resort"
bird_hide: "Bird Hide" bird_hide: "Bird Hide"
club: "Club"
common: "Common Land" common: "Common Land"
dog_park: "Dog Park"
fishing: "Fishing Area" fishing: "Fishing Area"
fitness_centre: "Fitness Centre"
fitness_station: "Fitness Station" fitness_station: "Fitness Station"
garden: "Garden" garden: "Garden"
golf_course: "Golf Course" golf_course: "Golf Course"
horse_riding: "Horse Riding"
ice_rink: "Ice Rink" ice_rink: "Ice Rink"
marina: "Marina" marina: "Marina"
miniature_golf: "Miniature Golf" miniature_golf: "Miniature Golf"
@ -619,6 +637,7 @@ en:
pitch: "Sports Pitch" pitch: "Sports Pitch"
playground: "Playground" playground: "Playground"
recreation_ground: "Recreation Ground" recreation_ground: "Recreation Ground"
resort: "Resort"
sauna: "Sauna" sauna: "Sauna"
slipway: "Slipway" slipway: "Slipway"
sports_centre: "Sports Centre" sports_centre: "Sports Centre"
@ -626,6 +645,13 @@ en:
swimming_pool: "Swimming Pool" swimming_pool: "Swimming Pool"
track: "Running Track" track: "Running Track"
water_park: "Water Park" water_park: "Water Park"
"yes": "Leisure"
man_made:
lighthouse: "Lighthouse"
pipeline: "Pipeline"
tower: "Tower"
works: "Factory"
"yes": "Man-made"
military: military:
airfield: "Military Airfield" airfield: "Military Airfield"
barracks: "Barracks" barracks: "Barracks"
@ -637,16 +663,15 @@ en:
beach: "Beach" beach: "Beach"
cape: "Cape" cape: "Cape"
cave_entrance: "Cave Entrance" cave_entrance: "Cave Entrance"
channel: "Channel"
cliff: "Cliff" cliff: "Cliff"
crater: "Crater" crater: "Crater"
dune: "Dune" dune: "Dune"
feature: "Feature"
fell: "Fell" fell: "Fell"
fjord: "Fjord" fjord: "Fjord"
forest: "Forest" forest: "Forest"
geyser: "Geyser" geyser: "Geyser"
glacier: "Glacier" glacier: "Glacier"
grassland: "Grassland"
heath: "Heath" heath: "Heath"
hill: "Hill" hill: "Hill"
island: "Island" island: "Island"
@ -658,11 +683,11 @@ en:
point: "Point" point: "Point"
reef: "Reef" reef: "Reef"
ridge: "Ridge" ridge: "Ridge"
river: "River"
rock: "Rock" rock: "Rock"
saddle: "Saddle"
sand: "Sand"
scree: "Scree" scree: "Scree"
scrub: "Scrub" scrub: "Scrub"
shoal: "Shoal"
spring: "Spring" spring: "Spring"
stone: "Stone" stone: "Stone"
strait: "Strait" strait: "Strait"
@ -671,10 +696,10 @@ en:
volcano: "Volcano" volcano: "Volcano"
water: "Water" water: "Water"
wetland: "Wetland" wetland: "Wetland"
wetlands: "Wetlands"
wood: "Wood" wood: "Wood"
office: office:
accountant: "Accountant" accountant: "Accountant"
administrative: "Admininstration"
architect: "Architect" architect: "Architect"
company: "Company" company: "Company"
employment_agency: "Employment Agency" employment_agency: "Employment Agency"
@ -687,6 +712,8 @@ en:
travel_agent: "Travel Agency" travel_agent: "Travel Agency"
"yes": "Office" "yes": "Office"
place: place:
allotments: "Allotments"
block: "Block"
airport: "Airport" airport: "Airport"
city: "City" city: "City"
country: "Country" country: "Country"
@ -711,6 +738,7 @@ en:
town: "Town" town: "Town"
unincorporated_area: "Unincorporated Area" unincorporated_area: "Unincorporated Area"
village: "Village" village: "Village"
"yes": "Place"
railway: railway:
abandoned: "Abandoned Railway" abandoned: "Abandoned Railway"
construction: "Railway under Construction" construction: "Railway under Construction"
@ -736,9 +764,6 @@ en:
switch: "Railway Points" switch: "Railway Points"
tram: "Tramway" tram: "Tramway"
tram_stop: "Tram Stop" tram_stop: "Tram Stop"
yard: "Railway Yard"
route:
bus: "Bus Route"
shop: shop:
alcohol: "Off License" alcohol: "Off License"
antiques: "Antiques" antiques: "Antiques"
@ -817,6 +842,7 @@ en:
"yes": "Shop" "yes": "Shop"
tourism: tourism:
alpine_hut: "Alpine Hut" alpine_hut: "Alpine Hut"
apartment: "Apartment"
artwork: "Artwork" artwork: "Artwork"
attraction: "Attraction" attraction: "Attraction"
bed_and_breakfast: "Bed and Breakfast" bed_and_breakfast: "Bed and Breakfast"
@ -824,16 +850,15 @@ en:
camp_site: "Camp Site" camp_site: "Camp Site"
caravan_site: "Caravan Site" caravan_site: "Caravan Site"
chalet: "Chalet" chalet: "Chalet"
gallery: "Gallery"
guest_house: "Guest House" guest_house: "Guest House"
hostel: "Hostel" hostel: "Hostel"
hotel: "Hotel" hotel: "Hotel"
information: "Information" information: "Information"
lean_to: "Lean To"
motel: "Motel" motel: "Motel"
museum: "Museum" museum: "Museum"
picnic_site: "Picnic Site" picnic_site: "Picnic Site"
theme_park: "Theme Park" theme_park: "Theme Park"
valley: "Valley"
viewpoint: "Viewpoint" viewpoint: "Viewpoint"
zoo: "Zoo" zoo: "Zoo"
tunnel: tunnel:
@ -843,7 +868,6 @@ en:
artificial: "Artificial Waterway" artificial: "Artificial Waterway"
boatyard: "Boatyard" boatyard: "Boatyard"
canal: "Canal" canal: "Canal"
connector: "Waterway Connector"
dam: "Dam" dam: "Dam"
derelict_canal: "Derelict Canal" derelict_canal: "Derelict Canal"
ditch: "Ditch" ditch: "Ditch"
@ -851,16 +875,14 @@ en:
drain: "Drain" drain: "Drain"
lock: "Lock" lock: "Lock"
lock_gate: "Lock Gate" lock_gate: "Lock Gate"
mineral_spring: "Mineral Spring"
mooring: "Mooring" mooring: "Mooring"
rapids: "Rapids" rapids: "Rapids"
river: "River" river: "River"
riverbank: "Riverbank"
stream: "Stream" stream: "Stream"
wadi: "Wadi" wadi: "Wadi"
waterfall: "Waterfall" waterfall: "Waterfall"
water_point: "Water Point"
weir: "Weir" weir: "Weir"
"yes": "Waterway"
admin_levels: admin_levels:
level2: "Country Boundary" level2: "Country Boundary"
level4: "State Boundary" level4: "State Boundary"

View file

@ -96,8 +96,12 @@ eu:
loading: Kargatzen... loading: Kargatzen...
tag_details: tag_details:
tags: Etiketak tags: Etiketak
wikidata_link: '%{page} elementua Wikidatan'
wikipedia_link: '%{page} artikulua Wikipedian'
note: note:
title: 'Oharra: %{id}' title: 'Oharra: %{id}'
new_note: Ohar berria
description: Deskribapena
changeset: changeset:
changeset_paging_nav: changeset_paging_nav:
showing_page: '%{page}. orrialdea' showing_page: '%{page}. orrialdea'
@ -144,6 +148,7 @@ eu:
view: Ikusi view: Ikusi
edit: Aldatu edit: Aldatu
comments: comments:
ago: Duela %{ago}
newer_comments: Iruzkin berriagoak newer_comments: Iruzkin berriagoak
older_comments: Iruzkin zaharragoak older_comments: Iruzkin zaharragoak
export: export:
@ -153,6 +158,9 @@ eu:
licence: Lizentzia licence: Lizentzia
export_details: OpenStreetMap-eko datuak <a href="http://opendatacommons.org/licenses/odbl/1.0/">Open export_details: OpenStreetMap-eko datuak <a href="http://opendatacommons.org/licenses/odbl/1.0/">Open
Data Commons Datu-base Irekiko Lizentzia</a> baimen baten mende daude. Data Commons Datu-base Irekiko Lizentzia</a> baimen baten mende daude.
too_large:
planet:
title: OSM Planeta
options: Aukerak options: Aukerak
format: Formatua format: Formatua
scale: Eskala scale: Eskala
@ -293,6 +301,7 @@ eu:
steps: Eskailera-mailak steps: Eskailera-mailak
tertiary: Hirugarren mailako errepide tertiary: Hirugarren mailako errepide
track: Pista track: Pista
unclassified: Sailkatu gabeko errepidea
historic: historic:
archaeological_site: Aztarnategi arkeologiko archaeological_site: Aztarnategi arkeologiko
building: Eraikina building: Eraikina
@ -344,6 +353,7 @@ eu:
cave_entrance: Kobazulo Sarrera cave_entrance: Kobazulo Sarrera
channel: Kanal channel: Kanal
crater: Crater crater: Crater
dune: Duna
fjord: Fiordo fjord: Fiordo
forest: Basoa forest: Basoa
geyser: Geiser geyser: Geiser
@ -487,6 +497,8 @@ eu:
cities: Hiriak cities: Hiriak
towns: Herriak towns: Herriak
places: Lekuak places: Lekuak
results:
more_results: Emaitza gehiago
distance: distance:
one: km bat inguru one: km bat inguru
zero: km bat baino gutxiago zero: km bat baino gutxiago
@ -512,6 +524,7 @@ eu:
export: Esportatu export: Esportatu
data: Datuak data: Datuak
export_data: Esportatu datuak export_data: Esportatu datuak
intro_header: Ongi etorri OpenStreetMapera!
help: Laguntza help: Laguntza
about: Honi buruz about: Honi buruz
community: Komunitatea community: Komunitatea
@ -531,6 +544,7 @@ eu:
native_link: Euskara version native_link: Euskara version
legal_babble: legal_babble:
title_html: Egile-eskubideak eta lizentzia title_html: Egile-eskubideak eta lizentzia
more_title_html: Jakin ezazu gehiago
contributors_at_html: |- contributors_at_html: |-
<strong>Austria</strong>: Honako iturrietatik ateratako datuak ditu: <strong>Austria</strong>: Honako iturrietatik ateratako datuak ditu:
<a href="http://data.wien.gv.at/">Stadt Wien</a> (<a href="http://creativecommons.org/licenses/by/3.0/at/deed.de">CC BY</a> lizentziapean), <a href="http://data.wien.gv.at/">Stadt Wien</a> (<a href="http://creativecommons.org/licenses/by/3.0/at/deed.de">CC BY</a> lizentziapean),
@ -538,13 +552,22 @@ eu:
Land Tirol (<a href="http://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/">CC BY AT zuzenketekin</a> lizentziapean). Land Tirol (<a href="http://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/">CC BY AT zuzenketekin</a> lizentziapean).
contributors_fr_html: '<strong>Frantzia</strong>: Direction Générale des Impôts-etik contributors_fr_html: '<strong>Frantzia</strong>: Direction Générale des Impôts-etik
ateratako datuak ditu.' ateratako datuak ditu.'
infringement_title_html: Egile-eskubideen urraketa
welcome_page: welcome_page:
title: Ongi etorri! title: Ongi etorri!
introduction_html: Ongi etorri OpenStreetMapera, edonork alda dezakeen munduko
mapa askera. Orain izena eman duzula, mapak editatzen has zaitezke. Hona hemen
gida laburra jakin behar dituzun gauzarik garrantzitsuenak dituena.
whats_on_the_map:
title: Mapan dagoena
questions: questions:
title: Galderarik? title: Galderarik?
fixthemap: fixthemap:
title: Arazo baten berri eman / Mapa zuzendu
how_to_help: how_to_help:
title: Nola lagundu title: Nola lagundu
other_concerns:
title: Bestelako kezkak
help_page: help_page:
welcome: welcome:
url: /welcome url: /welcome
@ -552,6 +575,9 @@ eu:
help: help:
url: https://help.openstreetmap.org/ url: https://help.openstreetmap.org/
title: help.openstreetmap.org title: help.openstreetmap.org
wiki:
url: http://wiki.openstreetmap.org/wiki/Eu:Main_Page
title: wiki.openstreetmap.org
about_page: about_page:
next: Hurrengoa next: Hurrengoa
notifier: notifier:
@ -561,6 +587,8 @@ eu:
hi: Kaixo %{to_user}, hi: Kaixo %{to_user},
gpx_notification: gpx_notification:
greeting: Kaixo, greeting: Kaixo,
signup_confirm:
subject: '[OpenStreetMap] Ongi etorri OpenStreetMapera'
email_confirm: email_confirm:
subject: '[OpenStreetMap] Baieztatu zure eposta helbidea' subject: '[OpenStreetMap] Baieztatu zure eposta helbidea'
email_confirm_plain: email_confirm_plain:
@ -626,6 +654,7 @@ eu:
motorway: Autobidea motorway: Autobidea
primary: Lehen mailako errepidea primary: Lehen mailako errepidea
secondary: Bigarren mailako errepidea secondary: Bigarren mailako errepidea
unclassified: Sailkatu gabeko errepidea
rail: Trenbidea rail: Trenbidea
subway: Metroa subway: Metroa
tram: tram:

View file

@ -2211,9 +2211,9 @@ fi:
notes: notes:
new: new:
intro: Huomasitko virheen tai puuttuvan kohteen? Ilmoita siitä muille kartoittajille, intro: Huomasitko virheen tai puuttuvan kohteen? Ilmoita siitä muille kartoittajille,
jolloin voimme korjata asian. Siirrä merkkipiste oikeaan kohtaan ja kirjoita jolloin virhe voidaan korjata. Siirrä merkkipiste oikeaan kohtaan ja kirjoita
selite ongelmasta. (Älä kirjoita yksityistietojasi tai tietoa tekijänoikeudella selite ongelmasta. (Älä kirjoita henkilötietojasi tai tietoa tekijänoikeudella
suojatuista kartoista tai kansiolistoista.) suojatuista kartoista tai muista lähteistä.)
add: Lähetä ilmoitus add: Lähetä ilmoitus
show: show:
anonymous_warning: Tässä karttailmoituksessa on kommentteja tunnistautumattomilta anonymous_warning: Tässä karttailmoituksessa on kommentteja tunnistautumattomilta

View file

@ -2146,6 +2146,7 @@ ko:
subscribe: 구독 subscribe: 구독
unsubscribe: 구독 해지 unsubscribe: 구독 해지
hide_comment: 숨기기 hide_comment: 숨기기
unhide_comment: 숨기기 취소
notes: notes:
new: new:
intro: 실수했거나 없는 무언가를 발견했나요? 다른 매퍼에게 알려주어 고칠 수 있게 해주세요. 마커를 올바른 위치로 옮기고, 참고를 intro: 실수했거나 없는 무언가를 발견했나요? 다른 매퍼에게 알려주어 고칠 수 있게 해주세요. 마커를 올바른 위치로 옮기고, 참고를
@ -2163,6 +2164,7 @@ ko:
node: 노드 node: 노드
way: way:
relation: 관계 relation: 관계
nothing_found: 기능을 찾을 수 없습니다
redaction: redaction:
edit: edit:
description: 설명 description: 설명

View file

@ -54,7 +54,7 @@ lt:
body: Tekstas body: Tekstas
diary_entry: diary_entry:
user: Naudotojas user: Naudotojas
title: Pavadinimas title: Antraštė
latitude: Platuma latitude: Platuma
longitude: Ilguma longitude: Ilguma
language: Kalba language: Kalba
@ -97,13 +97,62 @@ lt:
name: nuotoliniu valdymu name: nuotoliniu valdymu
description: nuotolinį valdymą (JOSM arba Merkaartor) description: nuotolinį valdymą (JOSM arba Merkaartor)
browse: browse:
created: Sukurtas
closed: Uždarytas
created_html: Sukurtas <abbr title='%{title}'>prieš %{time}</abbr>
closed_html: Uždarytas <abbr title='%{title}'>prieš %{time}</abbr>
created_by_html: Sukurtas <abbr title='%{title}'>prieš %{time}</abbr> naudotojo
%{user}
deleted_by_html: Ištrintas <abbr title='%{title}'>prieš %{time}</abbr> naudotojo
%{user}
edited_by_html: Keistas <abbr title='%{title}'>prieš %{time}</abbr> naudotojo
%{user}
closed_by_html: Uždarytas <abbr title='%{title}'>prieš %{time}</abbr> naudotojo
%{user}
version: Versija
in_changeset: Pakeitimas
anonymous: anonimas
no_comment: (nėra komentaro)
part_of: Dalis
download_xml: Atsisiųsti XML
view_history: Žiūrėti istoriją
view_details: Žiūrėti detales
location: 'Vieta:'
changeset: changeset:
title: Pakeitimas title: 'Pakeitimas: %{id}'
belongs_to: Autorius
node: Taškų (%{count})
node_paginated: Taškų (%{x}-%{y} iš %{count})
way: Keliai (%{count})
way_paginated: Keliai (%{x}-%{y} iš %{count})
relation: Ryšiai (%{count})
relation_paginated: Ryšiai (%{x}-%{y} iš %{count})
comment: Komentarai (%{count})
hidden_commented_by: Paslėptas naudotojo %{user} komentaras <abbr title='%{exact_time}'>prieš
%{when}</abbr>
commented_by: Naudotojo %{user} komentaras <abbr title='%{exact_time}'>prieš
%{when}</abbr>
changesetxml: Pakeitimo XML changesetxml: Pakeitimo XML
osmchangexml: osmChange XML osmchangexml: osmChange XML
feed: feed:
title: Pakeitimas %{id} title: Pakeitimas %{id}
title_comment: Pakeitimas %{id} - %{comment} title_comment: Pakeitimas %{id} - %{comment}
join_discussion: Prisijunkite norėdami dalyvauti aptarime
discussion: Diskusija
node:
title: 'Taškas: %{name}'
history_title: 'Taško istorija: %{name}'
way:
title: 'Kelias: %{name}'
history_title: 'Kelio istorija: %{name}'
nodes: Taškai
also_part_of:
one: dalis kelio %{related_ways}
other: dalis kelių %{related_ways}
relation:
title: 'Ryšys: %{name}'
history_title: 'Ryšio istorija: %{name}'
members: Nariai
relation_member: relation_member:
entry_role: '%{type} %{name} kaip %{role}' entry_role: '%{type} %{name} kaip %{role}'
type: type:
@ -137,6 +186,8 @@ lt:
way: kelias way: kelias
relation: ryšys relation: ryšys
start_rjs: start_rjs:
feature_warning: Įkeliami %{num_features} geoobjektai, todėl jūsų naršyklė gali
sulėtėti ir nesugebėti klausyti komandų. Ar tikrai norite rodyti šiuos duomenis?
load_data: Kraunami duomenys load_data: Kraunami duomenys
loading: Kraunama... loading: Kraunama...
tag_details: tag_details:
@ -145,11 +196,32 @@ lt:
key: Žymos %{key} wiki aprašymo puslapis key: Žymos %{key} wiki aprašymo puslapis
tag: Žymos %{key}=%{value} wiki aprašymo puslapis tag: Žymos %{key}=%{value} wiki aprašymo puslapis
wikipedia_link: '%{page} straipsnis Vikipedijoje' wikipedia_link: '%{page} straipsnis Vikipedijoje'
telephone_link: Skambinti %{phone_number}
note: note:
title: Pastaba title: 'Pastaba: %{id}'
new_note: Nauja pastaba
description: Aprašymas description: Aprašymas
open_title: 'Neišspręsta pastaba: %{note_name}' open_title: 'Neišspręsta pastaba: %{note_name}'
closed_title: 'Išspręsta pastaba: %{note_name}' closed_title: 'Išspręsta pastaba: %{note_name}'
hidden_title: 'Paslėpta pastaba #%{note_name}'
open_by: Sukurta naudotojo %{user} <abbr title='%{exact_time}'>prieš %{when}</abbr>
open_by_anonymous: Sukurta anonimo <abbr title='%{exact_time}'>prieš %{when}</abbr>
commented_by: Naudotojo %{user} komentaras <abbr title='%{exact_time}'>prieš
%{when}</abbr>
commented_by_anonymous: Anonimo komentaras <abbr title='%{exact_time}'>prieš
%{when}</abbr>
closed_by: Išsprendė naudotojas %{user} <abbr title='%{exact_time}'>prieš %{when}</abbr>
closed_by_anonymous: Išsprendė anonimas <abbr title='%{exact_time}'>prieš %{when}</abbr>
reopened_by: Iš naujo aktyvavo naudotojas %{user} <abbr title='%{exact_time}'>prieš
%{when}</abbr>
reopened_by_anonymous: Iš naujo aktyvavo anonimas <abbr title='%{exact_time}'>prieš
%{when}</abbr>
hidden_by: Paslėpė naudotojas %{user} <abbr title='%{exact_time}'>prieš %{when}</abbr>
query:
title: Ieškoti geoobjektų
introduction: Spauskite ant žemėlapio, norėdami rasti gretimus objektus
nearby: Artimi objektai
enclosing: Gaubiantys objektai
changeset: changeset:
changeset_paging_nav: changeset_paging_nav:
showing_page: Puslapis %{page} showing_page: Puslapis %{page}
@ -170,8 +242,22 @@ lt:
title_user: Naudotojo %{user} pakeitimai title_user: Naudotojo %{user} pakeitimai
title_friend: Jūsų draugų pakeitimai title_friend: Jūsų draugų pakeitimai
title_nearby: Netoliese esančių naudotojų pakeitimai title_nearby: Netoliese esančių naudotojų pakeitimai
empty: Nerasta pakeitimų.
empty_area: Nėra šios vietos pakeitimų.
empty_user: Nėra šio naudotojo pakeitimų.
no_more: Daugiau pakeitimų nerasta.
no_more_area: Daugiau pakeitimų šioje vietoje nėra.
no_more_user: Daugiau šio naudotojo pakeitimų nėra.
load_more: Įkelti daugiau
timeout: timeout:
sorry: Atsiprašome, bet jūsų prašytų pakeitimų ištraukimas užtruko per ilgai. sorry: Atsiprašome, bet jūsų prašytų pakeitimų ištraukimas užtruko per ilgai.
rss:
title_all: OpenStreetMap pakeitimo aptarimas
title_particular: 'OpenStreetMap pakeitimo #%{changeset_id} aptarimas'
comment: 'Naujas pakeitimo #%{changeset_id} komentaras, parašytas %{author}'
commented_at_html: Pakeista prieš %{when}
commented_at_by_html: '%{user} pakeitė prieš %{when}'
full: Pilnas aptarimas
diary_entry: diary_entry:
new: new:
title: Naujas dienoraščio įrašas title: Naujas dienoraščio įrašas
@ -248,6 +334,7 @@ lt:
newer_comments: Naujesni komentarai newer_comments: Naujesni komentarai
older_comments: Senesni komentarai older_comments: Senesni komentarai
export: export:
title: Eksportuoti
start: start:
area_to_export: Eksportuotinas plotas area_to_export: Eksportuotinas plotas
manually_select: Rankiniu būdu parinkti kitą sritį manually_select: Rankiniu būdu parinkti kitą sritį
@ -259,8 +346,29 @@ lt:
export_details: OpenStreetMap duomenų licencija - <a href="http://opendatacommons.org/licenses/odbl/1.0/">Open export_details: OpenStreetMap duomenų licencija - <a href="http://opendatacommons.org/licenses/odbl/1.0/">Open
Data Commons Open Database License</a> (ODbL). Data Commons Open Database License</a> (ODbL).
too_large: too_large:
advice: 'Jei aukščiau pateiktas eksportas nepavyko, pabandykite vieną iš žemiau
išvardintų šaltinių:'
body: Ši sritis per didelė, kad būtų galima eksportuoti OpenStreetMap XML body: Ši sritis per didelė, kad būtų galima eksportuoti OpenStreetMap XML
duomenis. Parinkite mažesnę sritį. duomenis. Padidinkite, parinkite mažesnę sritį arba naudokite vieną iš didelio
duomenų kiekio atsiuntimo šaltinių.
planet:
title: OSM planeta
description: Periodiškai atnaujinamos pilnos OpenStreetMap duomenų bazės
kopijos
overpass:
title: Overpass API
description: Atsisiųsti šią apimtį iš OpenStreetMap duombazės kopijos
geofabrik:
title: Geofabrik atsisiuntimai
description: Periodiškai atnaujinami kontinentų, šalių ir kai kurių miestų
duomenys.
metro:
title: Metro iškarpos
description: Pagrindinių pasaulio miestų ir aplinkinių teritorijų duomenų
iškarpos
other:
title: Kiti šaltiniai
description: Papildomi šaltiniai išvardinti OpenStreetMap wiki
options: Parinktys options: Parinktys
format: Formatas format: Formatas
scale: Mastelis scale: Mastelis
@ -284,6 +392,9 @@ lt:
osm_nominatim: <a href="http://nominatim.openstreetmap.org/">OpenStreetMap osm_nominatim: <a href="http://nominatim.openstreetmap.org/">OpenStreetMap
Nominatim</a> rezultatai Nominatim</a> rezultatai
geonames: <a href="http://www.geonames.org/">GeoNames</a> rezultatai geonames: <a href="http://www.geonames.org/">GeoNames</a> rezultatai
osm_nominatim_reverse: Rezultatai iš <a href="http://nominatim.openstreetmap.org/">OpenStreetMap
Nominatim</a>
geonames_reverse: Rezultatai iš <a href="http://www.geonames.org/">GeoNames</a>
search_osm_nominatim: search_osm_nominatim:
prefix: prefix:
aeroway: aeroway:
@ -378,6 +489,7 @@ lt:
shower: Dušas shower: Dušas
social_centre: Socialinių reikalų centras social_centre: Socialinių reikalų centras
social_club: Socialinių reikalų klubas social_club: Socialinių reikalų klubas
social_facility: Socialinė įstaiga
studio: Studija studio: Studija
supermarket: Prekybos centras supermarket: Prekybos centras
swimming_pool: Plaukiojimo baseinas swimming_pool: Plaukiojimo baseinas

View file

@ -1738,14 +1738,14 @@ nl:
lost password link: Wachtwoord vergeten? lost password link: Wachtwoord vergeten?
login_button: Aanmelden login_button: Aanmelden
register now: Nu inschrijven register now: Nu inschrijven
with username: 'Hebt u al een gebruiker bij OpenStreetMap? Meld aan met uw gebruikersnaam with username: 'Hebt u al een account bij OpenStreetMap? Meld aan met uw gebruikersnaam
en wachtwoord:' en wachtwoord:'
with openid: 'U kunt ook aanmelden met uw OpenID:' with openid: 'U kunt ook aanmelden met uw OpenID:'
new to osm: Is OpenStreetMap nieuw voor u? new to osm: Is OpenStreetMap nieuw voor u?
to make changes: Om wijzigingen in OpenStreetMap te maken, moet u een gebruiker to make changes: Om wijzigingen in OpenStreetMap te maken, moet u een gebruiker
hebben. hebben.
create account minute: Maak een gebruiker aan. Dat is snel gebeurd. create account minute: Maak een gebruiker aan. Dat is snel gebeurd.
no account: Hebt u geen gebruiker? no account: Hebt u geen account?
account not active: Uw gebruiker is helaas nog niet actief.<br />Klik op de account not active: Uw gebruiker is helaas nog niet actief.<br />Klik op de
koppeling in de bevestiging om deze te activeren of <a href="%{reconfirm}">vraag koppeling in de bevestiging om deze te activeren of <a href="%{reconfirm}">vraag
een nieuwe bevestiging per e-mail aan</a>. een nieuwe bevestiging per e-mail aan</a>.

View file

@ -618,7 +618,7 @@ pt-BR:
construction: Construção em progresso construction: Construção em progresso
farm: Fazenda farm: Fazenda
farmland: Área cultivada farmland: Área cultivada
farmyard: Curral farmyard: Pátio de Fazenda
forest: Floresta forest: Floresta
garages: Garagens garages: Garagens
grass: Gramado grass: Gramado

View file

@ -2037,7 +2037,7 @@ zh-TW:
layers: layers:
header: 地圖圖層 header: 地圖圖層
notes: 地圖筆記 notes: 地圖筆記
data: 地圖 data: 地圖
overlays: 啟用覆蓋層,以為地圖解決問題 overlays: 啟用覆蓋層,以為地圖解決問題
title: 圖層 title: 圖層
copyright: © <a href='%{copyright_url}'>OpenStreetMap貢獻者</a> copyright: © <a href='%{copyright_url}'>OpenStreetMap貢獻者</a>

View file

@ -45,7 +45,8 @@ SET search_path = public, pg_catalog;
CREATE TYPE format_enum AS ENUM ( CREATE TYPE format_enum AS ENUM (
'html', 'html',
'markdown' 'markdown',
'text'
); );
@ -119,33 +120,6 @@ CREATE TYPE user_status_enum AS ENUM (
); );
--
-- Name: maptile_for_point(bigint, bigint, integer); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION maptile_for_point(bigint, bigint, integer) RETURNS integer
LANGUAGE c STRICT
AS '/srv/www/next.osm.compton.nu/db/functions/libpgosm.so', 'maptile_for_point';
--
-- Name: tile_for_point(integer, integer); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION tile_for_point(integer, integer) RETURNS bigint
LANGUAGE c STRICT
AS '/srv/www/next.osm.compton.nu/db/functions/libpgosm.so', 'tile_for_point';
--
-- Name: xid_to_int4(xid); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION xid_to_int4(xid) RETURNS integer
LANGUAGE c IMMUTABLE STRICT
AS '/srv/www/next.osm.compton.nu/db/functions/libpgosm.so', 'xid_to_int4';
SET default_tablespace = ''; SET default_tablespace = '';
SET default_with_oids = false; SET default_with_oids = false;
@ -157,9 +131,9 @@ SET default_with_oids = false;
CREATE TABLE acls ( CREATE TABLE acls (
id integer NOT NULL, id integer NOT NULL,
address inet, address inet,
k character varying(255) NOT NULL, k character varying NOT NULL,
v character varying(255), v character varying,
domain character varying(255) domain character varying
); );
@ -221,8 +195,8 @@ ALTER SEQUENCE changeset_comments_id_seq OWNED BY changeset_comments.id;
CREATE TABLE changeset_tags ( CREATE TABLE changeset_tags (
changeset_id bigint NOT NULL, changeset_id bigint NOT NULL,
k character varying(255) DEFAULT ''::character varying NOT NULL, k character varying DEFAULT ''::character varying NOT NULL,
v character varying(255) DEFAULT ''::character varying NOT NULL v character varying DEFAULT ''::character varying NOT NULL
); );
@ -278,10 +252,10 @@ CREATE TABLE changesets_subscribers (
CREATE TABLE client_applications ( CREATE TABLE client_applications (
id integer NOT NULL, id integer NOT NULL,
name character varying(255), name character varying,
url character varying(255), url character varying,
support_url character varying(255), support_url character varying,
callback_url character varying(255), callback_url character varying,
key character varying(50), key character varying(50),
secret character varying(50), secret character varying(50),
user_id integer, user_id integer,
@ -322,8 +296,8 @@ ALTER SEQUENCE client_applications_id_seq OWNED BY client_applications.id;
CREATE TABLE current_node_tags ( CREATE TABLE current_node_tags (
node_id bigint NOT NULL, node_id bigint NOT NULL,
k character varying(255) DEFAULT ''::character varying NOT NULL, k character varying DEFAULT ''::character varying NOT NULL,
v character varying(255) DEFAULT ''::character varying NOT NULL v character varying DEFAULT ''::character varying NOT NULL
); );
@ -370,7 +344,7 @@ CREATE TABLE current_relation_members (
relation_id bigint NOT NULL, relation_id bigint NOT NULL,
member_type nwr_enum NOT NULL, member_type nwr_enum NOT NULL,
member_id bigint NOT NULL, member_id bigint NOT NULL,
member_role character varying(255) NOT NULL, member_role character varying NOT NULL,
sequence_id integer DEFAULT 0 NOT NULL sequence_id integer DEFAULT 0 NOT NULL
); );
@ -381,8 +355,8 @@ CREATE TABLE current_relation_members (
CREATE TABLE current_relation_tags ( CREATE TABLE current_relation_tags (
relation_id bigint NOT NULL, relation_id bigint NOT NULL,
k character varying(255) DEFAULT ''::character varying NOT NULL, k character varying DEFAULT ''::character varying NOT NULL,
v character varying(255) DEFAULT ''::character varying NOT NULL v character varying DEFAULT ''::character varying NOT NULL
); );
@ -435,8 +409,8 @@ CREATE TABLE current_way_nodes (
CREATE TABLE current_way_tags ( CREATE TABLE current_way_tags (
way_id bigint NOT NULL, way_id bigint NOT NULL,
k character varying(255) DEFAULT ''::character varying NOT NULL, k character varying DEFAULT ''::character varying NOT NULL,
v character varying(255) DEFAULT ''::character varying NOT NULL v character varying DEFAULT ''::character varying NOT NULL
); );
@ -514,13 +488,13 @@ ALTER SEQUENCE diary_comments_id_seq OWNED BY diary_comments.id;
CREATE TABLE diary_entries ( CREATE TABLE diary_entries (
id bigint NOT NULL, id bigint NOT NULL,
user_id bigint NOT NULL, user_id bigint NOT NULL,
title character varying(255) NOT NULL, title character varying NOT NULL,
body text NOT NULL, body text NOT NULL,
created_at timestamp without time zone NOT NULL, created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL,
latitude double precision, latitude double precision,
longitude double precision, longitude double precision,
language_code character varying(255) DEFAULT 'en'::character varying NOT NULL, language_code character varying DEFAULT 'en'::character varying NOT NULL,
visible boolean DEFAULT true NOT NULL, visible boolean DEFAULT true NOT NULL,
body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
); );
@ -596,7 +570,7 @@ CREATE TABLE gps_points (
CREATE TABLE gpx_file_tags ( CREATE TABLE gpx_file_tags (
gpx_id bigint DEFAULT 0 NOT NULL, gpx_id bigint DEFAULT 0 NOT NULL,
tag character varying(255) NOT NULL, tag character varying NOT NULL,
id bigint NOT NULL id bigint NOT NULL
); );
@ -628,12 +602,12 @@ CREATE TABLE gpx_files (
id bigint NOT NULL, id bigint NOT NULL,
user_id bigint NOT NULL, user_id bigint NOT NULL,
visible boolean DEFAULT true NOT NULL, visible boolean DEFAULT true NOT NULL,
name character varying(255) DEFAULT ''::character varying NOT NULL, name character varying DEFAULT ''::character varying NOT NULL,
size bigint, size bigint,
latitude double precision, latitude double precision,
longitude double precision, longitude double precision,
"timestamp" timestamp without time zone NOT NULL, "timestamp" timestamp without time zone NOT NULL,
description character varying(255) DEFAULT ''::character varying NOT NULL, description character varying DEFAULT ''::character varying NOT NULL,
inserted boolean NOT NULL, inserted boolean NOT NULL,
visibility gpx_visibility_enum DEFAULT 'public'::gpx_visibility_enum NOT NULL visibility gpx_visibility_enum DEFAULT 'public'::gpx_visibility_enum NOT NULL
); );
@ -663,9 +637,9 @@ ALTER SEQUENCE gpx_files_id_seq OWNED BY gpx_files.id;
-- --
CREATE TABLE languages ( CREATE TABLE languages (
code character varying(255) NOT NULL, code character varying NOT NULL,
english_name character varying(255) NOT NULL, english_name character varying NOT NULL,
native_name character varying(255) native_name character varying
); );
@ -676,7 +650,7 @@ CREATE TABLE languages (
CREATE TABLE messages ( CREATE TABLE messages (
id bigint NOT NULL, id bigint NOT NULL,
from_user_id bigint NOT NULL, from_user_id bigint NOT NULL,
title character varying(255) NOT NULL, title character varying NOT NULL,
body text NOT NULL, body text NOT NULL,
sent_on timestamp without time zone NOT NULL, sent_on timestamp without time zone NOT NULL,
message_read boolean DEFAULT false NOT NULL, message_read boolean DEFAULT false NOT NULL,
@ -713,8 +687,8 @@ ALTER SEQUENCE messages_id_seq OWNED BY messages.id;
CREATE TABLE node_tags ( CREATE TABLE node_tags (
node_id bigint NOT NULL, node_id bigint NOT NULL,
version bigint NOT NULL, version bigint NOT NULL,
k character varying(255) DEFAULT ''::character varying NOT NULL, k character varying DEFAULT ''::character varying NOT NULL,
v character varying(255) DEFAULT ''::character varying NOT NULL v character varying DEFAULT ''::character varying NOT NULL
); );
@ -740,7 +714,7 @@ CREATE TABLE nodes (
-- --
CREATE TABLE note_comments ( CREATE TABLE note_comments (
id integer NOT NULL, id bigint NOT NULL,
note_id bigint NOT NULL, note_id bigint NOT NULL,
visible boolean NOT NULL, visible boolean NOT NULL,
created_at timestamp without time zone NOT NULL, created_at timestamp without time zone NOT NULL,
@ -775,7 +749,7 @@ ALTER SEQUENCE note_comments_id_seq OWNED BY note_comments.id;
-- --
CREATE TABLE notes ( CREATE TABLE notes (
id integer NOT NULL, id bigint NOT NULL,
latitude integer NOT NULL, latitude integer NOT NULL,
longitude integer NOT NULL, longitude integer NOT NULL,
tile bigint NOT NULL, tile bigint NOT NULL,
@ -811,7 +785,7 @@ ALTER SEQUENCE notes_id_seq OWNED BY notes.id;
CREATE TABLE oauth_nonces ( CREATE TABLE oauth_nonces (
id integer NOT NULL, id integer NOT NULL,
nonce character varying(255), nonce character varying,
"timestamp" integer, "timestamp" integer,
created_at timestamp without time zone, created_at timestamp without time zone,
updated_at timestamp without time zone updated_at timestamp without time zone
@ -858,9 +832,9 @@ CREATE TABLE oauth_tokens (
allow_write_api boolean DEFAULT false NOT NULL, allow_write_api boolean DEFAULT false NOT NULL,
allow_read_gpx boolean DEFAULT false NOT NULL, allow_read_gpx boolean DEFAULT false NOT NULL,
allow_write_gpx boolean DEFAULT false NOT NULL, allow_write_gpx boolean DEFAULT false NOT NULL,
callback_url character varying(255), callback_url character varying,
verifier character varying(20), verifier character varying(20),
scope character varying(255), scope character varying,
valid_to timestamp without time zone, valid_to timestamp without time zone,
allow_write_notes boolean DEFAULT false NOT NULL allow_write_notes boolean DEFAULT false NOT NULL
); );
@ -891,10 +865,10 @@ ALTER SEQUENCE oauth_tokens_id_seq OWNED BY oauth_tokens.id;
CREATE TABLE redactions ( CREATE TABLE redactions (
id integer NOT NULL, id integer NOT NULL,
title character varying(255), title character varying,
description text, description text,
created_at timestamp without time zone NOT NULL, created_at timestamp without time zone,
updated_at timestamp without time zone NOT NULL, updated_at timestamp without time zone,
user_id bigint NOT NULL, user_id bigint NOT NULL,
description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
); );
@ -927,7 +901,7 @@ CREATE TABLE relation_members (
relation_id bigint DEFAULT 0 NOT NULL, relation_id bigint DEFAULT 0 NOT NULL,
member_type nwr_enum NOT NULL, member_type nwr_enum NOT NULL,
member_id bigint NOT NULL, member_id bigint NOT NULL,
member_role character varying(255) NOT NULL, member_role character varying NOT NULL,
version bigint DEFAULT 0 NOT NULL, version bigint DEFAULT 0 NOT NULL,
sequence_id integer DEFAULT 0 NOT NULL sequence_id integer DEFAULT 0 NOT NULL
); );
@ -939,8 +913,8 @@ CREATE TABLE relation_members (
CREATE TABLE relation_tags ( CREATE TABLE relation_tags (
relation_id bigint DEFAULT 0 NOT NULL, relation_id bigint DEFAULT 0 NOT NULL,
k character varying(255) DEFAULT ''::character varying NOT NULL, k character varying DEFAULT ''::character varying NOT NULL,
v character varying(255) DEFAULT ''::character varying NOT NULL, v character varying DEFAULT ''::character varying NOT NULL,
version bigint NOT NULL version bigint NOT NULL
); );
@ -964,7 +938,7 @@ CREATE TABLE relations (
-- --
CREATE TABLE schema_migrations ( CREATE TABLE schema_migrations (
version character varying(255) NOT NULL version character varying NOT NULL
); );
@ -1011,8 +985,8 @@ ALTER SEQUENCE user_blocks_id_seq OWNED BY user_blocks.id;
CREATE TABLE user_preferences ( CREATE TABLE user_preferences (
user_id bigint NOT NULL, user_id bigint NOT NULL,
k character varying(255) NOT NULL, k character varying NOT NULL,
v character varying(255) NOT NULL v character varying NOT NULL
); );
@ -1023,9 +997,9 @@ CREATE TABLE user_preferences (
CREATE TABLE user_roles ( CREATE TABLE user_roles (
id integer NOT NULL, id integer NOT NULL,
user_id bigint NOT NULL, user_id bigint NOT NULL,
role user_role_enum NOT NULL,
created_at timestamp without time zone, created_at timestamp without time zone,
updated_at timestamp without time zone, updated_at timestamp without time zone,
role user_role_enum NOT NULL,
granter_id bigint NOT NULL granter_id bigint NOT NULL
); );
@ -1056,7 +1030,7 @@ ALTER SEQUENCE user_roles_id_seq OWNED BY user_roles.id;
CREATE TABLE user_tokens ( CREATE TABLE user_tokens (
id bigint NOT NULL, id bigint NOT NULL,
user_id bigint NOT NULL, user_id bigint NOT NULL,
token character varying(255) NOT NULL, token character varying NOT NULL,
expiry timestamp without time zone NOT NULL, expiry timestamp without time zone NOT NULL,
referer text referer text
); );
@ -1086,36 +1060,36 @@ ALTER SEQUENCE user_tokens_id_seq OWNED BY user_tokens.id;
-- --
CREATE TABLE users ( CREATE TABLE users (
email character varying(255) NOT NULL, email character varying NOT NULL,
id bigint NOT NULL, id bigint NOT NULL,
pass_crypt character varying(255) NOT NULL, pass_crypt character varying NOT NULL,
creation_time timestamp without time zone NOT NULL, creation_time timestamp without time zone NOT NULL,
display_name character varying(255) DEFAULT ''::character varying NOT NULL, display_name character varying DEFAULT ''::character varying NOT NULL,
data_public boolean DEFAULT false NOT NULL, data_public boolean DEFAULT false NOT NULL,
description text DEFAULT ''::text NOT NULL, description text DEFAULT ''::text NOT NULL,
home_lat double precision, home_lat double precision,
home_lon double precision, home_lon double precision,
home_zoom smallint DEFAULT 3, home_zoom smallint DEFAULT 3,
nearby integer DEFAULT 50, nearby integer DEFAULT 50,
pass_salt character varying(255), pass_salt character varying,
image_file_name text, image_file_name text,
email_valid boolean DEFAULT false NOT NULL, email_valid boolean DEFAULT false NOT NULL,
new_email character varying(255), new_email character varying,
creation_ip character varying(255), creation_ip character varying,
languages character varying(255), languages character varying,
status user_status_enum DEFAULT 'pending'::user_status_enum NOT NULL, status user_status_enum DEFAULT 'pending'::user_status_enum NOT NULL,
terms_agreed timestamp without time zone, terms_agreed timestamp without time zone,
consider_pd boolean DEFAULT false NOT NULL, consider_pd boolean DEFAULT false NOT NULL,
openid_url character varying(255), openid_url character varying,
preferred_editor character varying(255), preferred_editor character varying,
terms_seen boolean DEFAULT false NOT NULL, terms_seen boolean DEFAULT false NOT NULL,
image_fingerprint character varying(255),
description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL, description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL,
image_fingerprint character varying,
changesets_count integer DEFAULT 0 NOT NULL, changesets_count integer DEFAULT 0 NOT NULL,
traces_count integer DEFAULT 0 NOT NULL, traces_count integer DEFAULT 0 NOT NULL,
diary_entries_count integer DEFAULT 0 NOT NULL, diary_entries_count integer DEFAULT 0 NOT NULL,
image_use_gravatar boolean DEFAULT true NOT NULL, image_use_gravatar boolean DEFAULT true NOT NULL,
image_content_type character varying(255) image_content_type character varying
); );
@ -1156,8 +1130,8 @@ CREATE TABLE way_nodes (
CREATE TABLE way_tags ( CREATE TABLE way_tags (
way_id bigint DEFAULT 0 NOT NULL, way_id bigint DEFAULT 0 NOT NULL,
k character varying(255) NOT NULL, k character varying NOT NULL,
v character varying(255) NOT NULL, v character varying NOT NULL,
version bigint NOT NULL version bigint NOT NULL
); );

322
vendor/assets/leaflet/leaflet.polyline.js vendored Executable file → Normal file
View file

@ -1,127 +1,235 @@
/* /*
* L.PolylineUtil contains utilify functions for polylines, two methods * Utility functions to decode/encode numbers and array's of numbers
* are added to the L.Polyline object to support creation of polylines * to/from strings (Google maps polyline encoding)
* from an encoded string and converting existing polylines to an
* encoded string.
* *
* - L.Polyline.fromEncoded(encoded [, options]) returns a L.Polyline * Extends the L.Polyline and L.Polygon object with methods to convert
* - L.Polyline.encodePath() returns a string * to and create from these strings.
* *
* Actual code from: * Jan Pieter Waagmeester <jieter@jieter.nl>
* http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/\ *
* Original code from:
* http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/
* (which is down as of december 2014)
*/ */
/*jshint browser:true, debug: true, strict:false, globalstrict:false, indent:4, white:true, smarttabs:true*/ (function () {
/*global L:true, console:true*/ 'use strict';
var defaultOptions = function (options) {
// Inject functionality into Leaflet if (typeof options === 'number') {
(function (L) { // Legacy
if (!(L.Polyline.prototype.fromEncoded)) { options = { precision: options };
L.Polyline.fromEncoded = function (encoded, options) { } else {
return new L.Polyline(L.PolylineUtil.decode(encoded), options); options = options || {};
};
}
if (!(L.Polygon.prototype.fromEncoded)) {
L.Polygon.fromEncoded = function (encoded, options) {
return new L.Polygon(L.PolylineUtil.decode(encoded), options);
};
}
var encodeMixin = {
encodePath: function () {
return L.PolylineUtil.encode(this.getLatLngs());
} }
options.precision = options.precision || 5;
options.factor = options.factor || Math.pow(10, options.precision);
options.dimension = options.dimension || 2;
return options;
}; };
if (!L.Polyline.prototype.encodePath) { var PolylineUtil = {
L.Polyline.include(encodeMixin); encode: function (points, options) {
} options = defaultOptions(options);
if (!L.Polygon.prototype.encodePath) {
L.Polygon.include(encodeMixin);
}
})(L);
// Utility functions. var flatPoints = [];
L.PolylineUtil = {}; for (var i = 0, len = points.length; i < len; ++i) {
var point = points[i];
L.PolylineUtil.encode = function (latlngs) { if (options.dimension === 2) {
var i, dlat, dlng; flatPoints.push(point.lat || point[0]);
var plat = 0; flatPoints.push(point.lng || point[1]);
var plng = 0; } else {
var encoded_points = ""; for (var dim = 0; dim < options.dimension; ++dim) {
flatPoints.push(point[dim]);
}
}
}
for (i = 0; i < latlngs.length; i++) { return this.encodeDeltas(flatPoints, options);
var lat = latlngs[i].lat; },
var lng = latlngs[i].lng;
var late5 = Math.floor(lat * 1e5);
var lnge5 = Math.floor(lng * 1e5);
dlat = late5 - plat;
dlng = lnge5 - plng;
plat = late5;
plng = lnge5;
encoded_points +=
L.PolylineUtil.encodeSignedNumber(dlat) +
L.PolylineUtil.encodeSignedNumber(dlng);
}
return encoded_points;
};
// This function is very similar to Google's, but I added decode: function (encoded, options) {
// some stuff to deal with the double slash issue. options = defaultOptions(options);
L.PolylineUtil.encodeNumber = function (num) {
var encodeString = "";
var nextValue, finalValue;
while (num >= 0x20) {
nextValue = (0x20 | (num & 0x1f)) + 63;
encodeString += (String.fromCharCode(nextValue));
num >>= 5;
}
finalValue = num + 63;
encodeString += (String.fromCharCode(finalValue));
return encodeString;
};
// This one is Google's verbatim. var flatPoints = this.decodeDeltas(encoded, options);
L.PolylineUtil.encodeSignedNumber = function (num) {
var sgn_num = num << 1;
if (num < 0) {
sgn_num = ~(sgn_num);
}
return (L.PolylineUtil.encodeNumber(sgn_num));
};
L.PolylineUtil.decode = function (encoded) { var points = [];
var len = encoded.length; for (var i = 0, len = flatPoints.length; i + (options.dimension - 1) < len;) {
var index = 0; var point = [];
var latlngs = [];
var lat = 0;
var lng = 0;
while (index < len) { for (var dim = 0; dim < options.dimension; ++dim) {
var b; point.push(flatPoints[i++]);
var shift = 0; }
var result = 0;
do {
b = encoded.charCodeAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
var dlat = ((result & 1) ? ~(result >> 1) : (result >> 1));
lat += dlat;
shift = 0; points.push(point);
result = 0; }
do {
b = encoded.charCodeAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);
var dlng = ((result & 1) ? ~(result >> 1) : (result >> 1));
lng += dlng;
latlngs.push(new L.LatLng(lat * 1e-5, lng * 1e-5)); return points;
},
encodeDeltas: function(numbers, options) {
options = defaultOptions(options);
var lastNumbers = [];
for (var i = 0, len = numbers.length; i < len;) {
for (var d = 0; d < options.dimension; ++d, ++i) {
var num = numbers[i];
var delta = num - (lastNumbers[d] || 0);
lastNumbers[d] = num;
numbers[i] = delta;
}
}
return this.encodeFloats(numbers, options);
},
decodeDeltas: function(encoded, options) {
options = defaultOptions(options);
var lastNumbers = [];
var numbers = this.decodeFloats(encoded, options);
for (var i = 0, len = numbers.length; i < len;) {
for (var d = 0; d < options.dimension; ++d, ++i) {
numbers[i] = lastNumbers[d] = numbers[i] + (lastNumbers[d] || 0);
}
}
return numbers;
},
encodeFloats: function(numbers, options) {
options = defaultOptions(options);
for (var i = 0, len = numbers.length; i < len; ++i) {
numbers[i] = Math.round(numbers[i] * options.factor);
}
return this.encodeSignedIntegers(numbers);
},
decodeFloats: function(encoded, options) {
options = defaultOptions(options);
var numbers = this.decodeSignedIntegers(encoded);
for (var i = 0, len = numbers.length; i < len; ++i) {
numbers[i] /= options.factor;
}
return numbers;
},
/* jshint bitwise:false */
encodeSignedIntegers: function(numbers) {
for (var i = 0, len = numbers.length; i < len; ++i) {
var num = numbers[i];
numbers[i] = (num < 0) ? ~(num << 1) : (num << 1);
}
return this.encodeUnsignedIntegers(numbers);
},
decodeSignedIntegers: function(encoded) {
var numbers = this.decodeUnsignedIntegers(encoded);
for (var i = 0, len = numbers.length; i < len; ++i) {
var num = numbers[i];
numbers[i] = (num & 1) ? ~(num >> 1) : (num >> 1);
}
return numbers;
},
encodeUnsignedIntegers: function(numbers) {
var encoded = '';
for (var i = 0, len = numbers.length; i < len; ++i) {
encoded += this.encodeUnsignedInteger(numbers[i]);
}
return encoded;
},
decodeUnsignedIntegers: function(encoded) {
var numbers = [];
var current = 0;
var shift = 0;
for (var i = 0, len = encoded.length; i < len; ++i) {
var b = encoded.charCodeAt(i) - 63;
current |= (b & 0x1f) << shift;
if (b < 0x20) {
numbers.push(current);
current = 0;
shift = 0;
} else {
shift += 5;
}
}
return numbers;
},
encodeSignedInteger: function (num) {
num = (num < 0) ? ~(num << 1) : (num << 1);
return this.encodeUnsignedInteger(num);
},
// This function is very similar to Google's, but I added
// some stuff to deal with the double slash issue.
encodeUnsignedInteger: function (num) {
var value, encoded = '';
while (num >= 0x20) {
value = (0x20 | (num & 0x1f)) + 63;
encoded += (String.fromCharCode(value));
num >>= 5;
}
value = num + 63;
encoded += (String.fromCharCode(value));
return encoded;
}
/* jshint bitwise:true */
};
// Export Node module
if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = PolylineUtil;
} }
return latlngs; // Inject functionality into Leaflet
}; if (typeof L === 'object') {
if (!(L.Polyline.prototype.fromEncoded)) {
L.Polyline.fromEncoded = function (encoded, options) {
return new L.Polyline(PolylineUtil.decode(encoded), options);
};
}
if (!(L.Polygon.prototype.fromEncoded)) {
L.Polygon.fromEncoded = function (encoded, options) {
return new L.Polygon(PolylineUtil.decode(encoded), options);
};
}
var encodeMixin = {
encodePath: function () {
return PolylineUtil.encode(this.getLatLngs());
}
};
if (!L.Polyline.prototype.encodePath) {
L.Polyline.include(encodeMixin);
}
if (!L.Polygon.prototype.encodePath) {
L.Polygon.include(encodeMixin);
}
L.PolylineUtil = PolylineUtil;
}
})();