summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFélix Sipma <felix.sipma@no-log.org>2020-02-02 16:05:32 +0100
committerFélix Sipma <felix.sipma@no-log.org>2020-02-02 16:05:32 +0100
commitb671c937c377b2416b40e419d708f50405280eed (patch)
treee9f16049d0957c63cb98f99c296ec69b94b717e1
parent2024b32f1e68344fb1f321545027de8ec518dae8 (diff)
fix latitude/longitude inversion
-rw-r--r--config.toml4
-rw-r--r--layouts/partials/address.html3
-rw-r--r--static/js/ferme-map.js5
3 files changed, 8 insertions, 4 deletions
diff --git a/config.toml b/config.toml
index 7f603ca..6f4dab4 100644
--- a/config.toml
+++ b/config.toml
@@ -15,8 +15,8 @@ pretActuel = 59000
tauxMin = 0
tauxMax = 1.5
dateLimite = "2019-06-15"
-longitude = 45.311703
-latitude = 4.499096
+latitude = 45.311703
+longitude = 4.499096
countryCode = "FR"
city = "La Versanne"
crowdfundingURL = "https://api.fermedegouet.fr"
diff --git a/layouts/partials/address.html b/layouts/partials/address.html
index 2196d37..7821e0f 100644
--- a/layouts/partials/address.html
+++ b/layouts/partials/address.html
@@ -9,6 +9,9 @@
{{ $address }}
</span>
{{ end }}
+ <span class="address is-size-7">
+ <a href="geo:{{ .Site.Params.Latitude }},{{ .Site.Params.Longitude }};">{{ .Site.Params.Latitude }},{{ .Site.Params.Longitude }}</a>
+ </span>
</div>
</div>
<div class="ferme-columns phone">
diff --git a/static/js/ferme-map.js b/static/js/ferme-map.js
index 2745e92..6164baf 100644
--- a/static/js/ferme-map.js
+++ b/static/js/ferme-map.js
@@ -1,4 +1,5 @@
-var map = L.map('fermemap').setView([longitude, latitude], 12);
+var marker = L.latLng(latitude, longitude);
+var map = L.map('fermemap').setView(marker, 12);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
@@ -15,4 +16,4 @@ var breadIcon = L.icon ({
shadowSize: [41, 41]
});
-L.marker([longitude, latitude], {icon: breadIcon}).addTo(map);
+L.marker(marker, {icon: breadIcon}).addTo(map);