commit
1f0884a34c
35 changed files with 532 additions and 259 deletions
|
@ -33,6 +33,10 @@ folder 'vendor/assets' do
|
|||
from 'git://github.com/jfirebaugh/leaflet-osm.git' do
|
||||
file 'leaflet.osm.js', 'leaflet-osm.js'
|
||||
end
|
||||
|
||||
from 'git://github.com/jieter/Leaflet.encoded.git' do
|
||||
file 'leaflet.polyline.js', 'Polyline.encoded.js'
|
||||
end
|
||||
end
|
||||
|
||||
folder 'ohauth' do
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 391 B |
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB |
|
@ -1,5 +1,5 @@
|
|||
//= require_self
|
||||
//= require_tree ./directions_engines
|
||||
//= require_tree ./directions
|
||||
|
||||
OSM.Directions = function (map) {
|
||||
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
|
||||
var value = e.target.value;
|
||||
endpoint.setValue(value)
|
||||
endpoint.getGeocode();
|
||||
});
|
||||
|
||||
endpoint.setValue = function(value) {
|
||||
endpoint.value = value;
|
||||
delete endpoint.latlng;
|
||||
input.val(value);
|
||||
endpoint.getGeocode();
|
||||
}
|
||||
|
||||
endpoint.getGeocode = function() {
|
||||
|
@ -338,6 +339,10 @@ OSM.Directions = function (map) {
|
|||
|
||||
if (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(',')),
|
||||
|
|
|
@ -54,11 +54,9 @@ function OSRMEngine() {
|
|||
previousPoints = points;
|
||||
hintData = data.hint_data;
|
||||
|
||||
var line = L.PolylineUtil.decode(data.route_geometry);
|
||||
for (var i = 0; i < line.length; i++) {
|
||||
line[i].lat /= 10;
|
||||
line[i].lng /= 10;
|
||||
}
|
||||
var line = L.PolylineUtil.decode(data.route_geometry, {
|
||||
precision: 6
|
||||
});
|
||||
|
||||
var steps = [];
|
||||
for (i = 0; i < data.route_instructions.length; i++) {
|
|
@ -990,6 +990,11 @@ header .search_forms,
|
|||
margin: 0px 0px 5px 25px;
|
||||
}
|
||||
|
||||
input.routing_go {
|
||||
min-width: 100px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
div.line {
|
||||
width: 100%;
|
||||
margin: 0px 0px 5px 0px;
|
||||
|
@ -1954,6 +1959,10 @@ tr.turn:hover {
|
|||
display: block;
|
||||
}
|
||||
|
||||
select {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
margin-right: 5px;
|
||||
|
@ -1964,6 +1973,8 @@ input[type="email"],
|
|||
input[type="url"],
|
||||
input[type="password"],
|
||||
textarea {
|
||||
color: #222;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
padding: 2px 5px;
|
||||
margin: 0;
|
|
@ -1 +0,0 @@
|
|||
../common.css.scss
|
1
app/assets/stylesheets/ltr/common.scss
Symbolic link
1
app/assets/stylesheets/ltr/common.scss
Symbolic link
|
@ -0,0 +1 @@
|
|||
../common.scss
|
|
@ -1 +0,0 @@
|
|||
../small.css.scss
|
1
app/assets/stylesheets/ltr/small.scss
Symbolic link
1
app/assets/stylesheets/ltr/small.scss
Symbolic link
|
@ -0,0 +1 @@
|
|||
../small.scss
|
|
@ -1 +0,0 @@
|
|||
../common.css.scss
|
1
app/assets/stylesheets/rtl/common.r2.scss
Symbolic link
1
app/assets/stylesheets/rtl/common.r2.scss
Symbolic link
|
@ -0,0 +1 @@
|
|||
../common.scss
|
|
@ -1 +0,0 @@
|
|||
../small.css.scss
|
1
app/assets/stylesheets/rtl/small.r2.scss
Symbolic link
1
app/assets/stylesheets/rtl/small.r2.scss
Symbolic link
|
@ -0,0 +1 @@
|
|||
../small.scss
|
|
@ -276,12 +276,13 @@ class UserController < ApplicationController
|
|||
|
||||
def login
|
||||
if params[:username] or using_open_id?
|
||||
session[:remember_me] ||= params[:remember_me]
|
||||
session[:referer] ||= params[:referer]
|
||||
|
||||
if using_open_id?
|
||||
session[:remember_me] ||= params[:remember_me_openid]
|
||||
openid_authentication(params[:openid_url])
|
||||
else
|
||||
session[:remember_me] ||= params[:remember_me]
|
||||
password_authentication(params[:username], params[:password])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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 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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<select class='routing_engines' name='routing_engines'></select>
|
||||
<div style="width:100%; text-align:right;"><%= submit_tag t('site.search.submit_text') %></div>
|
||||
<div class="line">
|
||||
<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>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<span class="minorNote">(<a href="<%= t 'user.account.openid.link' %>" target="_new"><%= t 'user.account.openid.link text' %></a>)</span>
|
||||
</div>
|
||||
|
||||
<div id="remember_me_openid" class='form-row'>
|
||||
<div class='form-row'>
|
||||
<%= check_box_tag "remember_me_openid", "yes", false, :tabindex => 5 %>
|
||||
<label class="standard-label" for="remember_me_openid"><%= t 'user.login.remember' %></label>
|
||||
</div>
|
||||
|
|
|
@ -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.
|
||||
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( routing.js )
|
||||
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( leaflet-all.css leaflet.ie.css )
|
||||
|
|
|
@ -547,7 +547,7 @@ br:
|
|||
primary_link: Pennhent
|
||||
proposed: Hent kinniget
|
||||
raceway: Redva
|
||||
residential: Takad annezet
|
||||
residential: Straed annezet
|
||||
rest_area: Leur diskuizh
|
||||
road: Hent
|
||||
secondary: Hent eil renk
|
||||
|
@ -1278,8 +1278,12 @@ br:
|
|||
changeset_comment_notification:
|
||||
greeting: Demat,
|
||||
commented:
|
||||
subject_own: '[OpenStreetMap] %{commenter} en deus addispleget unan eus ho
|
||||
kemmoù'
|
||||
subject_other: '[OpenStreetMap] %{commenter} en deus addispleget unan eus
|
||||
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_without_comment: Hep evezhiadenn
|
||||
message:
|
||||
|
@ -2265,6 +2269,7 @@ br:
|
|||
way: Hent
|
||||
relation: Darempred
|
||||
nothing_found: Arc'hweladur ebet kavet
|
||||
error: Fazi o vont e daremmpred gant %{server}:%{error}
|
||||
redaction:
|
||||
edit:
|
||||
description: Deskrivadur
|
||||
|
|
|
@ -375,8 +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 @@ en:
|
|||
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 @@ en:
|
|||
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 @@ en:
|
|||
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 @@ en:
|
|||
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 @@ en:
|
|||
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 @@ en:
|
|||
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 @@ en:
|
|||
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 @@ en:
|
|||
"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 @@ en:
|
|||
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 @@ en:
|
|||
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 @@ en:
|
|||
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 @@ en:
|
|||
pitch: "Sports Pitch"
|
||||
playground: "Playground"
|
||||
recreation_ground: "Recreation Ground"
|
||||
resort: "Resort"
|
||||
sauna: "Sauna"
|
||||
slipway: "Slipway"
|
||||
sports_centre: "Sports Centre"
|
||||
|
@ -626,6 +645,13 @@ en:
|
|||
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 @@ en:
|
|||
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 @@ en:
|
|||
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 @@ en:
|
|||
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 @@ en:
|
|||
travel_agent: "Travel Agency"
|
||||
"yes": "Office"
|
||||
place:
|
||||
allotments: "Allotments"
|
||||
block: "Block"
|
||||
airport: "Airport"
|
||||
city: "City"
|
||||
country: "Country"
|
||||
|
@ -711,6 +738,7 @@ en:
|
|||
town: "Town"
|
||||
unincorporated_area: "Unincorporated Area"
|
||||
village: "Village"
|
||||
"yes": "Place"
|
||||
railway:
|
||||
abandoned: "Abandoned Railway"
|
||||
construction: "Railway under Construction"
|
||||
|
@ -736,9 +764,6 @@ en:
|
|||
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 @@ en:
|
|||
"yes": "Shop"
|
||||
tourism:
|
||||
alpine_hut: "Alpine Hut"
|
||||
apartment: "Apartment"
|
||||
artwork: "Artwork"
|
||||
attraction: "Attraction"
|
||||
bed_and_breakfast: "Bed and Breakfast"
|
||||
|
@ -824,16 +850,15 @@ en:
|
|||
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 @@ en:
|
|||
artificial: "Artificial Waterway"
|
||||
boatyard: "Boatyard"
|
||||
canal: "Canal"
|
||||
connector: "Waterway Connector"
|
||||
dam: "Dam"
|
||||
derelict_canal: "Derelict Canal"
|
||||
ditch: "Ditch"
|
||||
|
@ -851,16 +875,14 @@ en:
|
|||
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"
|
||||
|
|
|
@ -96,8 +96,12 @@ eu:
|
|||
loading: Kargatzen...
|
||||
tag_details:
|
||||
tags: Etiketak
|
||||
wikidata_link: '%{page} elementua Wikidatan'
|
||||
wikipedia_link: '%{page} artikulua Wikipedian'
|
||||
note:
|
||||
title: 'Oharra: %{id}'
|
||||
new_note: Ohar berria
|
||||
description: Deskribapena
|
||||
changeset:
|
||||
changeset_paging_nav:
|
||||
showing_page: '%{page}. orrialdea'
|
||||
|
@ -144,6 +148,7 @@ eu:
|
|||
view: Ikusi
|
||||
edit: Aldatu
|
||||
comments:
|
||||
ago: Duela %{ago}
|
||||
newer_comments: Iruzkin berriagoak
|
||||
older_comments: Iruzkin zaharragoak
|
||||
export:
|
||||
|
@ -153,6 +158,9 @@ eu:
|
|||
licence: Lizentzia
|
||||
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.
|
||||
too_large:
|
||||
planet:
|
||||
title: OSM Planeta
|
||||
options: Aukerak
|
||||
format: Formatua
|
||||
scale: Eskala
|
||||
|
@ -293,6 +301,7 @@ eu:
|
|||
steps: Eskailera-mailak
|
||||
tertiary: Hirugarren mailako errepide
|
||||
track: Pista
|
||||
unclassified: Sailkatu gabeko errepidea
|
||||
historic:
|
||||
archaeological_site: Aztarnategi arkeologiko
|
||||
building: Eraikina
|
||||
|
@ -344,6 +353,7 @@ eu:
|
|||
cave_entrance: Kobazulo Sarrera
|
||||
channel: Kanal
|
||||
crater: Crater
|
||||
dune: Duna
|
||||
fjord: Fiordo
|
||||
forest: Basoa
|
||||
geyser: Geiser
|
||||
|
@ -487,6 +497,8 @@ eu:
|
|||
cities: Hiriak
|
||||
towns: Herriak
|
||||
places: Lekuak
|
||||
results:
|
||||
more_results: Emaitza gehiago
|
||||
distance:
|
||||
one: km bat inguru
|
||||
zero: km bat baino gutxiago
|
||||
|
@ -512,6 +524,7 @@ eu:
|
|||
export: Esportatu
|
||||
data: Datuak
|
||||
export_data: Esportatu datuak
|
||||
intro_header: Ongi etorri OpenStreetMapera!
|
||||
help: Laguntza
|
||||
about: Honi buruz
|
||||
community: Komunitatea
|
||||
|
@ -531,6 +544,7 @@ eu:
|
|||
native_link: Euskara version
|
||||
legal_babble:
|
||||
title_html: Egile-eskubideak eta lizentzia
|
||||
more_title_html: Jakin ezazu gehiago
|
||||
contributors_at_html: |-
|
||||
<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),
|
||||
|
@ -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).
|
||||
contributors_fr_html: '<strong>Frantzia</strong>: Direction Générale des Impôts-etik
|
||||
ateratako datuak ditu.'
|
||||
infringement_title_html: Egile-eskubideen urraketa
|
||||
welcome_page:
|
||||
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:
|
||||
title: Galderarik?
|
||||
fixthemap:
|
||||
title: Arazo baten berri eman / Mapa zuzendu
|
||||
how_to_help:
|
||||
title: Nola lagundu
|
||||
other_concerns:
|
||||
title: Bestelako kezkak
|
||||
help_page:
|
||||
welcome:
|
||||
url: /welcome
|
||||
|
@ -552,6 +575,9 @@ eu:
|
|||
help:
|
||||
url: https://help.openstreetmap.org/
|
||||
title: help.openstreetmap.org
|
||||
wiki:
|
||||
url: http://wiki.openstreetmap.org/wiki/Eu:Main_Page
|
||||
title: wiki.openstreetmap.org
|
||||
about_page:
|
||||
next: Hurrengoa
|
||||
notifier:
|
||||
|
@ -561,6 +587,8 @@ eu:
|
|||
hi: Kaixo %{to_user},
|
||||
gpx_notification:
|
||||
greeting: Kaixo,
|
||||
signup_confirm:
|
||||
subject: '[OpenStreetMap] Ongi etorri OpenStreetMapera'
|
||||
email_confirm:
|
||||
subject: '[OpenStreetMap] Baieztatu zure eposta helbidea'
|
||||
email_confirm_plain:
|
||||
|
@ -626,6 +654,7 @@ eu:
|
|||
motorway: Autobidea
|
||||
primary: Lehen mailako errepidea
|
||||
secondary: Bigarren mailako errepidea
|
||||
unclassified: Sailkatu gabeko errepidea
|
||||
rail: Trenbidea
|
||||
subway: Metroa
|
||||
tram:
|
||||
|
|
|
@ -2211,9 +2211,9 @@ fi:
|
|||
notes:
|
||||
new:
|
||||
intro: Huomasitko virheen tai puuttuvan kohteen? Ilmoita siitä muille kartoittajille,
|
||||
jolloin voimme korjata asian. Siirrä merkkipiste oikeaan kohtaan ja kirjoita
|
||||
selite ongelmasta. (Älä kirjoita yksityistietojasi tai tietoa tekijänoikeudella
|
||||
suojatuista kartoista tai kansiolistoista.)
|
||||
jolloin virhe voidaan korjata. Siirrä merkkipiste oikeaan kohtaan ja kirjoita
|
||||
selite ongelmasta. (Älä kirjoita henkilötietojasi tai tietoa tekijänoikeudella
|
||||
suojatuista kartoista tai muista lähteistä.)
|
||||
add: Lähetä ilmoitus
|
||||
show:
|
||||
anonymous_warning: Tässä karttailmoituksessa on kommentteja tunnistautumattomilta
|
||||
|
|
|
@ -2146,6 +2146,7 @@ ko:
|
|||
subscribe: 구독
|
||||
unsubscribe: 구독 해지
|
||||
hide_comment: 숨기기
|
||||
unhide_comment: 숨기기 취소
|
||||
notes:
|
||||
new:
|
||||
intro: 실수했거나 없는 무언가를 발견했나요? 다른 매퍼에게 알려주어 고칠 수 있게 해주세요. 마커를 올바른 위치로 옮기고, 참고를
|
||||
|
@ -2163,6 +2164,7 @@ ko:
|
|||
node: 노드
|
||||
way: 길
|
||||
relation: 관계
|
||||
nothing_found: 기능을 찾을 수 없습니다
|
||||
redaction:
|
||||
edit:
|
||||
description: 설명
|
||||
|
|
|
@ -54,7 +54,7 @@ lt:
|
|||
body: Tekstas
|
||||
diary_entry:
|
||||
user: Naudotojas
|
||||
title: Pavadinimas
|
||||
title: Antraštė
|
||||
latitude: Platuma
|
||||
longitude: Ilguma
|
||||
language: Kalba
|
||||
|
@ -97,13 +97,62 @@ lt:
|
|||
name: nuotoliniu valdymu
|
||||
description: nuotolinį valdymą (JOSM arba Merkaartor)
|
||||
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:
|
||||
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
|
||||
osmchangexml: osmChange XML
|
||||
feed:
|
||||
title: Pakeitimas %{id}
|
||||
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:
|
||||
entry_role: '%{type} %{name} kaip %{role}'
|
||||
type:
|
||||
|
@ -137,6 +186,8 @@ lt:
|
|||
way: kelias
|
||||
relation: ryšys
|
||||
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
|
||||
loading: Kraunama...
|
||||
tag_details:
|
||||
|
@ -145,11 +196,32 @@ lt:
|
|||
key: Žymos %{key} wiki aprašymo puslapis
|
||||
tag: Žymos %{key}=%{value} wiki aprašymo puslapis
|
||||
wikipedia_link: '%{page} straipsnis Vikipedijoje'
|
||||
telephone_link: Skambinti %{phone_number}
|
||||
note:
|
||||
title: Pastaba
|
||||
title: 'Pastaba: %{id}'
|
||||
new_note: Nauja pastaba
|
||||
description: Aprašymas
|
||||
open_title: 'Neiš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_paging_nav:
|
||||
showing_page: Puslapis %{page}
|
||||
|
@ -170,8 +242,22 @@ lt:
|
|||
title_user: Naudotojo %{user} pakeitimai
|
||||
title_friend: Jūsų draugų 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:
|
||||
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:
|
||||
new:
|
||||
title: Naujas dienoraščio įrašas
|
||||
|
@ -248,6 +334,7 @@ lt:
|
|||
newer_comments: Naujesni komentarai
|
||||
older_comments: Senesni komentarai
|
||||
export:
|
||||
title: Eksportuoti
|
||||
start:
|
||||
area_to_export: Eksportuotinas plotas
|
||||
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
|
||||
Data Commons Open Database License</a> (ODbL).
|
||||
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
|
||||
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
|
||||
format: Formatas
|
||||
scale: Mastelis
|
||||
|
@ -284,6 +392,9 @@ lt:
|
|||
osm_nominatim: <a href="http://nominatim.openstreetmap.org/">OpenStreetMap
|
||||
Nominatim</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:
|
||||
prefix:
|
||||
aeroway:
|
||||
|
@ -378,6 +489,7 @@ lt:
|
|||
shower: Dušas
|
||||
social_centre: Socialinių reikalų centras
|
||||
social_club: Socialinių reikalų klubas
|
||||
social_facility: Socialinė įstaiga
|
||||
studio: Studija
|
||||
supermarket: Prekybos centras
|
||||
swimming_pool: Plaukiojimo baseinas
|
||||
|
|
|
@ -1738,14 +1738,14 @@ nl:
|
|||
lost password link: Wachtwoord vergeten?
|
||||
login_button: Aanmelden
|
||||
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:'
|
||||
with openid: 'U kunt ook aanmelden met uw OpenID:'
|
||||
new to osm: Is OpenStreetMap nieuw voor u?
|
||||
to make changes: Om wijzigingen in OpenStreetMap te maken, moet u een gebruiker
|
||||
hebben.
|
||||
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
|
||||
koppeling in de bevestiging om deze te activeren of <a href="%{reconfirm}">vraag
|
||||
een nieuwe bevestiging per e-mail aan</a>.
|
||||
|
|
|
@ -618,7 +618,7 @@ pt-BR:
|
|||
construction: Construção em progresso
|
||||
farm: Fazenda
|
||||
farmland: Área cultivada
|
||||
farmyard: Curral
|
||||
farmyard: Pátio de Fazenda
|
||||
forest: Floresta
|
||||
garages: Garagens
|
||||
grass: Gramado
|
||||
|
|
|
@ -2037,7 +2037,7 @@ zh-TW:
|
|||
layers:
|
||||
header: 地圖圖層
|
||||
notes: 地圖筆記
|
||||
data: 地圖圖資
|
||||
data: 地圖資料
|
||||
overlays: 啟用覆蓋層,以為地圖解決問題
|
||||
title: 圖層
|
||||
copyright: © <a href='%{copyright_url}'>OpenStreetMap貢獻者</a>
|
||||
|
|
142
db/structure.sql
142
db/structure.sql
|
@ -45,7 +45,8 @@ SET search_path = public, pg_catalog;
|
|||
|
||||
CREATE TYPE format_enum AS ENUM (
|
||||
'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_with_oids = false;
|
||||
|
@ -157,9 +131,9 @@ SET default_with_oids = false;
|
|||
CREATE TABLE acls (
|
||||
id integer NOT NULL,
|
||||
address inet,
|
||||
k character varying(255) NOT NULL,
|
||||
v character varying(255),
|
||||
domain character varying(255)
|
||||
k character varying NOT NULL,
|
||||
v character varying,
|
||||
domain character varying
|
||||
);
|
||||
|
||||
|
||||
|
@ -221,8 +195,8 @@ ALTER SEQUENCE changeset_comments_id_seq OWNED BY changeset_comments.id;
|
|||
|
||||
CREATE TABLE changeset_tags (
|
||||
changeset_id bigint NOT NULL,
|
||||
k character varying(255) DEFAULT ''::character varying NOT NULL,
|
||||
v character varying(255) DEFAULT ''::character varying NOT NULL
|
||||
k character varying 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 (
|
||||
id integer NOT NULL,
|
||||
name character varying(255),
|
||||
url character varying(255),
|
||||
support_url character varying(255),
|
||||
callback_url character varying(255),
|
||||
name character varying,
|
||||
url character varying,
|
||||
support_url character varying,
|
||||
callback_url character varying,
|
||||
key character varying(50),
|
||||
secret character varying(50),
|
||||
user_id integer,
|
||||
|
@ -322,8 +296,8 @@ ALTER SEQUENCE client_applications_id_seq OWNED BY client_applications.id;
|
|||
|
||||
CREATE TABLE current_node_tags (
|
||||
node_id bigint NOT NULL,
|
||||
k character varying(255) DEFAULT ''::character varying NOT NULL,
|
||||
v character varying(255) DEFAULT ''::character varying NOT NULL
|
||||
k character varying 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,
|
||||
member_type nwr_enum 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
|
||||
);
|
||||
|
||||
|
@ -381,8 +355,8 @@ CREATE TABLE current_relation_members (
|
|||
|
||||
CREATE TABLE current_relation_tags (
|
||||
relation_id bigint NOT NULL,
|
||||
k character varying(255) DEFAULT ''::character varying NOT NULL,
|
||||
v character varying(255) DEFAULT ''::character varying NOT NULL
|
||||
k character varying 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 (
|
||||
way_id bigint NOT NULL,
|
||||
k character varying(255) DEFAULT ''::character varying NOT NULL,
|
||||
v character varying(255) DEFAULT ''::character varying NOT NULL
|
||||
k character varying 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 (
|
||||
id bigint NOT NULL,
|
||||
user_id bigint NOT NULL,
|
||||
title character varying(255) NOT NULL,
|
||||
title character varying NOT NULL,
|
||||
body text NOT NULL,
|
||||
created_at timestamp without time zone NOT NULL,
|
||||
updated_at timestamp without time zone NOT NULL,
|
||||
latitude 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,
|
||||
body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
|
||||
);
|
||||
|
@ -596,7 +570,7 @@ CREATE TABLE gps_points (
|
|||
|
||||
CREATE TABLE gpx_file_tags (
|
||||
gpx_id bigint DEFAULT 0 NOT NULL,
|
||||
tag character varying(255) NOT NULL,
|
||||
tag character varying NOT NULL,
|
||||
id bigint NOT NULL
|
||||
);
|
||||
|
||||
|
@ -628,12 +602,12 @@ CREATE TABLE gpx_files (
|
|||
id bigint NOT NULL,
|
||||
user_id bigint 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,
|
||||
latitude double precision,
|
||||
longitude double precision,
|
||||
"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,
|
||||
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 (
|
||||
code character varying(255) NOT NULL,
|
||||
english_name character varying(255) NOT NULL,
|
||||
native_name character varying(255)
|
||||
code character varying NOT NULL,
|
||||
english_name character varying NOT NULL,
|
||||
native_name character varying
|
||||
);
|
||||
|
||||
|
||||
|
@ -676,7 +650,7 @@ CREATE TABLE languages (
|
|||
CREATE TABLE messages (
|
||||
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,
|
||||
sent_on timestamp without time zone 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 (
|
||||
node_id bigint NOT NULL,
|
||||
version bigint NOT NULL,
|
||||
k character varying(255) DEFAULT ''::character varying NOT NULL,
|
||||
v character varying(255) DEFAULT ''::character varying NOT NULL
|
||||
k character varying DEFAULT ''::character varying NOT NULL,
|
||||
v character varying DEFAULT ''::character varying NOT NULL
|
||||
);
|
||||
|
||||
|
||||
|
@ -740,7 +714,7 @@ CREATE TABLE nodes (
|
|||
--
|
||||
|
||||
CREATE TABLE note_comments (
|
||||
id integer NOT NULL,
|
||||
id bigint NOT NULL,
|
||||
note_id bigint NOT NULL,
|
||||
visible boolean 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 (
|
||||
id integer NOT NULL,
|
||||
id bigint NOT NULL,
|
||||
latitude integer NOT NULL,
|
||||
longitude integer NOT NULL,
|
||||
tile bigint NOT NULL,
|
||||
|
@ -811,7 +785,7 @@ ALTER SEQUENCE notes_id_seq OWNED BY notes.id;
|
|||
|
||||
CREATE TABLE oauth_nonces (
|
||||
id integer NOT NULL,
|
||||
nonce character varying(255),
|
||||
nonce character varying,
|
||||
"timestamp" integer,
|
||||
created_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_read_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),
|
||||
scope character varying(255),
|
||||
scope character varying,
|
||||
valid_to timestamp without time zone,
|
||||
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 (
|
||||
id integer NOT NULL,
|
||||
title character varying(255),
|
||||
title character varying,
|
||||
description text,
|
||||
created_at timestamp without time zone NOT NULL,
|
||||
updated_at timestamp without time zone NOT NULL,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
user_id bigint 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,
|
||||
member_type nwr_enum 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,
|
||||
sequence_id integer DEFAULT 0 NOT NULL
|
||||
);
|
||||
|
@ -939,8 +913,8 @@ CREATE TABLE relation_members (
|
|||
|
||||
CREATE TABLE relation_tags (
|
||||
relation_id bigint DEFAULT 0 NOT NULL,
|
||||
k character varying(255) DEFAULT ''::character varying NOT NULL,
|
||||
v character varying(255) DEFAULT ''::character varying NOT NULL,
|
||||
k character varying DEFAULT ''::character varying NOT NULL,
|
||||
v character varying DEFAULT ''::character varying NOT NULL,
|
||||
version bigint NOT NULL
|
||||
);
|
||||
|
||||
|
@ -964,7 +938,7 @@ CREATE TABLE relations (
|
|||
--
|
||||
|
||||
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 (
|
||||
user_id bigint NOT NULL,
|
||||
k character varying(255) NOT NULL,
|
||||
v character varying(255) NOT NULL
|
||||
k character varying NOT NULL,
|
||||
v character varying NOT NULL
|
||||
);
|
||||
|
||||
|
||||
|
@ -1023,9 +997,9 @@ CREATE TABLE user_preferences (
|
|||
CREATE TABLE user_roles (
|
||||
id integer NOT NULL,
|
||||
user_id bigint NOT NULL,
|
||||
role user_role_enum NOT NULL,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
role user_role_enum 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 (
|
||||
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,
|
||||
referer text
|
||||
);
|
||||
|
@ -1086,36 +1060,36 @@ ALTER SEQUENCE user_tokens_id_seq OWNED BY user_tokens.id;
|
|||
--
|
||||
|
||||
CREATE TABLE users (
|
||||
email character varying(255) NOT NULL,
|
||||
email character varying 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,
|
||||
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,
|
||||
description text DEFAULT ''::text NOT NULL,
|
||||
home_lat double precision,
|
||||
home_lon double precision,
|
||||
home_zoom smallint DEFAULT 3,
|
||||
nearby integer DEFAULT 50,
|
||||
pass_salt character varying(255),
|
||||
pass_salt character varying,
|
||||
image_file_name text,
|
||||
email_valid boolean DEFAULT false NOT NULL,
|
||||
new_email character varying(255),
|
||||
creation_ip character varying(255),
|
||||
languages character varying(255),
|
||||
new_email character varying,
|
||||
creation_ip character varying,
|
||||
languages character varying,
|
||||
status user_status_enum DEFAULT 'pending'::user_status_enum NOT NULL,
|
||||
terms_agreed timestamp without time zone,
|
||||
consider_pd boolean DEFAULT false NOT NULL,
|
||||
openid_url character varying(255),
|
||||
preferred_editor character varying(255),
|
||||
openid_url character varying,
|
||||
preferred_editor character varying,
|
||||
terms_seen boolean DEFAULT false NOT NULL,
|
||||
image_fingerprint character varying(255),
|
||||
description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL,
|
||||
image_fingerprint character varying,
|
||||
changesets_count integer DEFAULT 0 NOT NULL,
|
||||
traces_count integer DEFAULT 0 NOT NULL,
|
||||
diary_entries_count integer DEFAULT 0 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 (
|
||||
way_id bigint DEFAULT 0 NOT NULL,
|
||||
k character varying(255) NOT NULL,
|
||||
v character varying(255) NOT NULL,
|
||||
k character varying NOT NULL,
|
||||
v character varying NOT NULL,
|
||||
version bigint NOT NULL
|
||||
);
|
||||
|
||||
|
|
304
vendor/assets/leaflet/leaflet.polyline.js
vendored
Executable file → Normal file
304
vendor/assets/leaflet/leaflet.polyline.js
vendored
Executable file → Normal file
|
@ -1,36 +1,225 @@
|
|||
/*
|
||||
* L.PolylineUtil contains utilify functions for polylines, two methods
|
||||
* are added to the L.Polyline object to support creation of polylines
|
||||
* from an encoded string and converting existing polylines to an
|
||||
* encoded string.
|
||||
* Utility functions to decode/encode numbers and array's of numbers
|
||||
* to/from strings (Google maps polyline encoding)
|
||||
*
|
||||
* - L.Polyline.fromEncoded(encoded [, options]) returns a L.Polyline
|
||||
* - L.Polyline.encodePath() returns a string
|
||||
* Extends the L.Polyline and L.Polygon object with methods to convert
|
||||
* to and create from these strings.
|
||||
*
|
||||
* Actual code from:
|
||||
* http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/\
|
||||
* Jan Pieter Waagmeester <jieter@jieter.nl>
|
||||
*
|
||||
* 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*/
|
||||
/*global L:true, console:true*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var defaultOptions = function (options) {
|
||||
if (typeof options === 'number') {
|
||||
// Legacy
|
||||
options = { precision: options };
|
||||
} else {
|
||||
options = options || {};
|
||||
}
|
||||
|
||||
// Inject functionality into Leaflet
|
||||
(function (L) {
|
||||
options.precision = options.precision || 5;
|
||||
options.factor = options.factor || Math.pow(10, options.precision);
|
||||
options.dimension = options.dimension || 2;
|
||||
return options;
|
||||
};
|
||||
|
||||
var PolylineUtil = {
|
||||
encode: function (points, options) {
|
||||
options = defaultOptions(options);
|
||||
|
||||
var flatPoints = [];
|
||||
for (var i = 0, len = points.length; i < len; ++i) {
|
||||
var point = points[i];
|
||||
|
||||
if (options.dimension === 2) {
|
||||
flatPoints.push(point.lat || point[0]);
|
||||
flatPoints.push(point.lng || point[1]);
|
||||
} else {
|
||||
for (var dim = 0; dim < options.dimension; ++dim) {
|
||||
flatPoints.push(point[dim]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this.encodeDeltas(flatPoints, options);
|
||||
},
|
||||
|
||||
decode: function (encoded, options) {
|
||||
options = defaultOptions(options);
|
||||
|
||||
var flatPoints = this.decodeDeltas(encoded, options);
|
||||
|
||||
var points = [];
|
||||
for (var i = 0, len = flatPoints.length; i + (options.dimension - 1) < len;) {
|
||||
var point = [];
|
||||
|
||||
for (var dim = 0; dim < options.dimension; ++dim) {
|
||||
point.push(flatPoints[i++]);
|
||||
}
|
||||
|
||||
points.push(point);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
// Inject functionality into Leaflet
|
||||
if (typeof L === 'object') {
|
||||
if (!(L.Polyline.prototype.fromEncoded)) {
|
||||
L.Polyline.fromEncoded = function (encoded, options) {
|
||||
return new L.Polyline(L.PolylineUtil.decode(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(L.PolylineUtil.decode(encoded), options);
|
||||
return new L.Polygon(PolylineUtil.decode(encoded), options);
|
||||
};
|
||||
}
|
||||
|
||||
var encodeMixin = {
|
||||
encodePath: function () {
|
||||
return L.PolylineUtil.encode(this.getLatLngs());
|
||||
return PolylineUtil.encode(this.getLatLngs());
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -40,88 +229,7 @@
|
|||
if (!L.Polygon.prototype.encodePath) {
|
||||
L.Polygon.include(encodeMixin);
|
||||
}
|
||||
})(L);
|
||||
|
||||
// Utility functions.
|
||||
L.PolylineUtil = {};
|
||||
|
||||
L.PolylineUtil.encode = function (latlngs) {
|
||||
var i, dlat, dlng;
|
||||
var plat = 0;
|
||||
var plng = 0;
|
||||
var encoded_points = "";
|
||||
|
||||
for (i = 0; i < latlngs.length; i++) {
|
||||
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);
|
||||
L.PolylineUtil = PolylineUtil;
|
||||
}
|
||||
return encoded_points;
|
||||
};
|
||||
|
||||
// This function is very similar to Google's, but I added
|
||||
// some stuff to deal with the double slash issue.
|
||||
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.
|
||||
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 len = encoded.length;
|
||||
var index = 0;
|
||||
var latlngs = [];
|
||||
var lat = 0;
|
||||
var lng = 0;
|
||||
|
||||
while (index < len) {
|
||||
var b;
|
||||
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;
|
||||
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 latlngs;
|
||||
};
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue