X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1596713871672cc319b0d68b51a3698cc6bf0972..d48b25124eaf561428176c60b79cc90e0a8e8125:/app/assets/javascripts/leaflet.map.js?ds=sidebyside
diff --git a/app/assets/javascripts/leaflet.map.js b/app/assets/javascripts/leaflet.map.js
index d60f3b2f6..7395898b7 100644
--- a/app/assets/javascripts/leaflet.map.js
+++ b/app/assets/javascripts/leaflet.map.js
@@ -35,12 +35,6 @@ L.OSM.Map = L.Map.extend({
keyid: "transportmap",
name: I18n.t("javascripts.map.base.transport_map")
}),
- new L.OSM.MapQuestOpen({
- attribution: copyright + ". Tiles courtesy of MapQuest ",
- code: "Q",
- keyid: "mapquest",
- name: I18n.t("javascripts.map.base.mapquest")
- }),
new L.OSM.HOT({
attribution: copyright + ". Tiles courtesy of Humanitarian OpenStreetMap Team",
code: "H",
@@ -170,6 +164,24 @@ L.OSM.Map = L.Map.extend({
return str;
},
+ getGeoUri: function(marker) {
+ var precision = OSM.zoomPrecision(this.getZoom()),
+ latLng,
+ params = {};
+
+ if (marker && this.hasLayer(marker)) {
+ latLng = marker.getLatLng().wrap();
+ } else {
+ latLng = this.getCenter();
+ }
+
+ params.lat = latLng.lat.toFixed(precision);
+ params.lon = latLng.lng.toFixed(precision);
+ params.zoom = this.getZoom();
+
+ return 'geo:' + params.lat + ',' + params.lon + '?z=' + params.zoom;
+ },
+
addObject: function(object, callback) {
var objectStyle = {
color: "#FF6200",
@@ -275,7 +287,7 @@ L.extend(L.Icon.Default.prototype, {
}
});
-function getUserIcon(url) {
+OSM.getUserIcon = function (url) {
return L.icon({
iconUrl: url || OSM.MARKER_RED,
iconSize: [25, 41],
@@ -284,4 +296,4 @@ function getUserIcon(url) {
shadowUrl: OSM.MARKER_SHADOW,
shadowSize: [41, 41]
});
-}
+};