//= require leaflet.key
//= require leaflet.note
//= require leaflet.share
+//= require leaflet.polyline
//= require index/search
//= require index/browse
//= require index/export
//= require index/note
//= require index/new_note
//= require router
+//= require routing
+//= require_tree ./routing_engines
(function() {
var loaderTimeout;
map._object);
$.removeCookie("_osm_location");
- $.cookie("_osm_location", cookieContent(map), { expires: expiry, path: "/" });
+ $.cookie("_osm_location", OSM.locationCookie(map), { expires: expiry, path: "/" });
});
if ($.cookie('_osm_welcome') == 'hide') {
$(".search_form").on("submit", function(e) {
e.preventDefault();
- $("header").addClass("closed");
- var query = $(this).find("input[name=query]").val();
- if (query) {
- OSM.router.route("/search?query=" + encodeURIComponent(query) + OSM.formatHash(map));
+ if ($(".query_wrapper.routing").is(":visible")) {
+ // Routing
+ OSM.routing.requestRoute(true, true);
} else {
- OSM.router.route("/" + OSM.formatHash(map));
+ // Search
+ $("header").addClass("closed");
+ var query = $(this).find("input[name=query]").val();
+ if (query) {
+ OSM.router.route("/search?query=" + encodeURIComponent(query) + OSM.formatHash(map));
+ } else {
+ OSM.router.route("/" + OSM.formatHash(map));
+ }
}
});
$(".describe_location").on("click", function(e) {
e.preventDefault();
- var precision = zoomPrecision(map.getZoom());
+ var precision = OSM.zoomPrecision(map.getZoom());
OSM.router.route("/search?query=" + encodeURIComponent(
map.getCenter().lat.toFixed(precision) + "," +
map.getCenter().lng.toFixed(precision)));
});
+
+ OSM.routing = OSM.Routing(map,'OSM.routing',$('.query_wrapper.routing'));
+ OSM.routing.chooseEngine('javascripts.directions.engines.osrm_car');
+
+ $(".get_directions").on("click",function(e) {
+ e.preventDefault();
+ $(".search").hide();
+ $(".routing").show();
+ $(".query_wrapper.routing [name=route_from]").focus();
+ $("#map").on('dragend dragover',function(e) { e.preventDefault(); });
+ $("#map").on('drop',function(e) { OSM.routing.handleDrop(e); e.preventDefault(); });
+ $(".routing_marker").on('dragstart',function(e) {
+ e.originalEvent.dataTransfer.effectAllowed = 'move';
+ e.originalEvent.dataTransfer.setData('id', this.id);
+ e.originalEvent.dataTransfer.setData('offsetX', e.originalEvent.target.width/2 - (e.originalEvent.x-e.target.x));
+ e.originalEvent.dataTransfer.setData('offsetY', e.originalEvent.target.height - (e.originalEvent.y-e.target.y));
+ });
+ });
+
+ $(".close_directions").on("click",function(e) {
+ e.preventDefault();
+ $(".search").show();
+ $(".routing").hide();
+ OSM.routing.close();
+ $("#map").off('dragend drop dragover');
+ $(".routing_marker").off('dragstart');
+ $(".query_wrapper.search [name=query]").focus();
+ });
+
});
height: 100%;
}
- body.slim {
- background-color: #f0f0f0;
- }
-
h1, h2, h3 {
font-weight: 600;
line-height: 1.2;
font-size: 13px;
}
+ p {
+ padding: 0 $lineheight $lineheight/4;
+ }
+
.icon.close {
float: right;
cursor: pointer;
.search_form {
position: relative;
padding: $lineheight/2;
+ padding-top: 1px;
background-color: $lightgrey;
.query_wrapper {
border-radius: 0 2px 2px 0;
}
- .describe_location {
- position: absolute;
- top: 6px;
- right: 6px;
+ .query_options {
+ text-align: right;
font-size: 10px;
color: $blue;
}
+
+ .routing {
+ display: none;
+ }
}
/* Rules for the map key which appears in the popout sidebar */
color: #f00;
}
+/* Rules for routing */
+
+#sidebar_content>table {
+ padding: 5px 20px 10px 15px;
+ width: 100%;
+ border-collapse: separate;
+}
+
+td.direction {
+ background-image: image-url('routing-sprite.png');
+ width: 20px; height: 20px;
+ background-repeat: no-repeat;
+}
+@for $i from 1 through 17 {
+td.direction.i#{$i} { background-position: #{($i)*-20+20}px 0px; }
+}
+
+td.instruction, td.distance {
+ padding-top: 0;
+ border-bottom: 1px solid #DDD;
+}
+td.distance {
+ color: #BBB;
+ text-align: right;
+ font-size: x-small;
+}
+tr.turn {
+ cursor: pointer;
+}
+tr.turn:hover {
+ background: lighten($green, 30%);
+}
+.routing_engines, #route_from, #route_to { margin-left: 25px; }
+.routing_marker { width: 15px; position: absolute; }
+
/* Rules for entity history */
#sidebar_content {
}
}
+/* Rules for the routing sidebar */
+
+#sidebar_content {
+ #routing_credit {
+ text-align: center;
+ padding: 0.5em;
+ }
+}
+
/* Rules for edit pages */
.site-edit {
z-index: 2000;
}
- #slim_container {
- width: 100%;
- }
-
- #slim_container_content {
- max-width: 50em;
- background-color: #FFFFFF;
- margin: $lineheight/2 auto;
- padding: 3px;
- border-radius: 25px;
- -moz-border-radius: 25px;
- border: 1px solid #e6e6e6;
- }
-
- #slim_content {
- margin: $lineheight/2;
- margin-top: 95px;
- max-width: 50em;
-
- .content-heading {
- margin-bottom: 15px;
- }
- }
-
- #slim_header {
- margin: 30px $lineheight/2;
- position: absolute;
- top: 0px;
- margin-right: $lineheight/4;
- img {
- vertical-align: middle;
- margin-bottom: $lineheight/4;
- margin-right: $lineheight/4;
- }
- }
-
/* Rules for small maps in content areas */
.content_map {
- <%= form_tag search_path, :class => "search_form" do %>
+ <form method="GET" action="<%= search_path %>" class="search_form">
++
+ <div class='query_options search'>
+ <%= link_to t('site.search.where_am_i'), '#', { :class => "describe_location", :title => t('site.search.where_am_i_title') } %>
+ ·
+ <%= link_to t('site.search.get_directions'), '#', { :class => "get_directions", :title => t('site.search.get_directions_title') } %>
+ </div>
++
+ <div class='query_options routing'>
+ <%= link_to t('site.search.close_directions'), '#', { :class => "close_directions", :title => t('site.search.close_directions_title') } %>
+ </div>
+
<%= submit_tag t('site.search.submit_text') %>
- <div class='query_wrapper'>
+
+ <div class='query_wrapper search'>
<%= text_field_tag "query", params[:query], :placeholder => t("site.search.search"), :autofocus => autofocus %>
- <%= link_to t('site.search.where_am_i'), '#', { :class => "describe_location", :title => t('site.search.where_am_i_title') } %>
</div>
- <% end %>
+
+ <div class='query_wrapper routing'>
+ <%= image_tag "marker-green.png", :class => 'routing_marker', :id => 'marker_from', :draggable => 'true' %>
+ <%= text_field_tag "route_from", params[:from], :placeholder => t('site.search.from'), :onchange=>"OSM.routing.geocode('route_from',event)" %>
+ <%= image_tag "marker-red.png" , :class => 'routing_marker', :id => 'marker_to' , :draggable => 'true' %>
+ <%= text_field_tag "route_to" , params[:to] , :placeholder => t('site.search.to') , :onchange=>"OSM.routing.geocode('route_to' ,event)" %>
+ <select class='routing_engines' name='routing_engines' onchange="OSM.routing.selectEngine(event)"></select>
+ <%= image_tag "searching-small.gif", :class => 'spinner', :style => "vertical-align: middle; display: none;" %>
+ </div>
+
+ </form>
language: Sprache
latitude: Breitengrad
longitude: Längengrad
- title: Titel
+ title: Betreff
user: Benutzer
friend:
friend: Freund
body: Text
recipient: Empfänger
sender: Absender
- title: Titel
+ title: Betreff
trace:
description: Beschreibung
latitude: Breitengrad
title: Andere Quellen
overpass:
description: Diese Bounding Box von einem Mirror der OpenStreetMap-Datenbank herunterladen
- title: API überführen
+ title: Overpass API
planet:
description: Regelmäßig aktualisierte Kopien der kompletten OpenStreetMap-Datenbank
title: Planet OSM
zoom: Zoom
title: Exportieren
+ fixthemap:
+ how_to_help:
+ add_a_note:
+ instructions_html: "Klicke einfach auf <a class='icon note'></a> oder auf das gleiche Symbol in der Kartenanzeige.\nDies fügt eine Markierung der Karte hinzu, die du durch Ziehen verschieben kannst.\nSchreibe deine Nachricht, klicke auf „Speichern“ und andere Mapper werden den Fehler untersuchen."
+ join_the_community:
+ explanation_html: "Falls du bei unseren Kartendaten ein Problem bemerkt hast wie das Fehlen einer Straße oder deiner Adresse,\nist der beste Weg zum Weitermachen der Beitritt zur OpenStreetMap-Gemeinschaft und das Beheben der Daten durch dich selbst."
+ title: Der Gemeinschaft beitreten
+ title: Wie man helfen kann
+ other_concerns:
+ explanation_html: "Falls du Bedenken über die Verwendung unserer Daten oder über die Inhalte hast, lies bitte unsere\n<a href=\"/copyright\">Copyright-Seite</a> für mehr rechtliche Informationen oder kontaktiere die entsprechende\n<a href=\"http://wiki.osmfoundation.org/wiki/Working_Groups\">OSMF-Arbeitsgruppe</a>."
+ title: Andere Anliegen
+ title: Ein Problem melden / Die Karte korrigieren
geocoder:
description:
title:
citywalls: Stadtmauern
fort: Fort
house: Historisches Haus
- icon: Ikone
+ icon: Symbol
manor: Gutshaus
memorial: Denkmal
mine: Mine
garden: Garten
golf_course: Golfplatz
ice_rink: Eislaufplatz
- marina: Marina
+ marina: Sporthafen
miniature_golf: Minigolf
nature_reserve: Naturschutzgebiet
park: Park
geyser: Geysir
glacier: Gletscher
heath: Heide
- hill: Berg
+ hill: Hügel
island: Insel
land: Land
marsh: Marsch
spur: Anschlussgleis
station: Bahnhof
stop: Haltepunkt
- subway: U-Bahn
+ subway: U-Bahn-Station
subway_entrance: U-Bahn-Eingang
switch: Weiche
tram: Straßenbahn
clothes: Bekleidungsgeschäft
computer: Computergeschäft
confectionery: Konditorei
- convenience: Lebensmittelgeschäft
+ convenience: Tante-Emma-Laden
copyshop: Copyshop
cosmetics: Parfümerie
deli: Feinkostladen
farm: Hofladen
fashion: Modegeschäft
fish: Fischereiladen
- florist: Blumenladen
+ florist: Blumengeschäft
food: Lebensmittelladen
funeral_directors: Bestattungsunternehmen
furniture: Möbelgeschäft
javascripts:
close: Schließen
edit_help: Wähle eine höhere Zoomstufe und verschiebe die Karte an einen Ort, den du bearbeiten möchtest, und klicke hier.
+ directions:
+ directions: "Fahranweisungen: "
+ engines:
+ graphhopper_bike: "Fahrrad (GraphHopper)"
+ mapquest_bike: "Fahrrad (MapQuest)"
+ osrm_car: "Auto (OSRM)"
+ cloudmade_foot: "Fuss (Cloudmade)"
+ instructions:
+ continue_on: "Weiter auf "
+ slight_right: "Rechts halten auf "
+ turn_right: "Rechts abbiegen auf "
+ sharp_right: "Hart rechts auf "
+ uturn: "U-turn along "
+ sharp_left: "Hart links auf "
+ turn_left: "Links abbiegen auf "
+ slight_left: "Links halten auf "
+ via_point: "(via point) "
+ follow: "Folge "
+ roundabout: "Im Kreisverkehr nehme "
+ leave_roundabout: "Verlasse den Kreisverkehr - "
+ stay_roundabout: "Stay on roundabout - "
+ start: "Start at end of "
+ destination: "Ziel erreicht"
+ against_oneway: "Go against one-way on "
+ end_oneway: "Ende der Einbahnstrasse "
+ unnamed: "(unbekannt)"
key:
title: Legende
tooltip: Legende
preview: Vorschau
search:
search: Suchen
+ get_directions: "Route berechnen"
+ get_directions_title: "Routenberechnung zwischen zwei Orten"
+ close_directions: "Schliessen der Route"
+ close_directions_title: "Schliessen des Routenmenus"
+ from: "Von"
+ to: "Nach"
submit_text: Los
where_am_i: Wo bin ich?
where_am_i_title: Die momentane Position mit der Suchmaschine anzeigen
note:
title: "Note: %{id}"
new_note: "New Note"
+ description: "Description"
open_title: "Unresolved note #%{note_name}"
closed_title: "Resolved note #%{note_name}"
hidden_title: "Hidden note #%{note_name}"
close: Close
search:
search: Search
+ get_directions: "Get directions"
+ get_directions_title: "Find directions between two points"
+ close_directions: "Close directions"
+ close_directions_title: "Close the directions panel"
+ from: "From"
+ to: "To"
where_am_i: "Where am I?"
where_am_i_title: Describe the current location using the search engine
submit_text: "Go"
map_data_zoom_in_tooltip: Zoom in to see map data
notes:
new:
- intro: "In order to improve the map the information you enter is shown to other mappers, so please be as descriptive and precise as possible when moving the marker to the correct position and entering your note below."
+ intro: "Spotted a mistake or something missing? Let other mappers know so we can fix it. Move the marker to the correct position and type a note to explain the problem. (Please don't enter personal information here.)"
add: Add Note
show:
anonymous_warning: This note includes comments from anonymous users which should be independently verified.
comment_and_resolve: Comment & Resolve
comment: Comment
edit_help: Move the map and zoom in on a location you want to edit, then click here.
+ directions:
+ engines:
+ graphhopper_bicycle: "Bicycle (GraphHopper)"
+ graphhopper_foot: "Foot (GraphHopper)"
+ mapquest_bicycle: "Bicycle (MapQuest)"
+ mapquest_car: "Car (MapQuest)"
+ mapquest_foot: "Foot (MapQuest)"
+ osrm_car: "Car (OSRM)"
+ directions: "Directions"
+ distance: "Distance"
+ errors:
+ no_route: "Couldn't find a route between those two places."
+ no_place: "Sorry - couldn't find that place."
+ instructions:
+ continue_on: "Continue on "
+ slight_right: "Slight right onto "
+ turn_right: "Turn right onto "
+ sharp_right: "Sharp right onto "
+ uturn: "U-turn along "
+ sharp_left: "Sharp left onto "
+ turn_left: "Turn left onto "
+ slight_left: "Slight left onto "
+ via_point: "(via point) "
+ follow: "Follow "
+ roundabout: "At roundabout take "
+ leave_roundabout: "Leave roundabout - "
+ stay_roundabout: "Stay on roundabout - "
+ start: "Start at end of "
+ destination: "Reach destination"
+ against_oneway: "Go against one-way on "
+ end_oneway: "End of one-way on "
+ unnamed: "(unnamed)"
+ time: "Time"
redaction:
edit:
description: "Description"