Merge pull request #113 from ZeusWPI/fix_map

Fix map
This commit is contained in:
Maxime 2019-04-30 17:28:50 +02:00 committed by GitHub
commit 7802464c66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -27,7 +27,8 @@ function performRequest(url, location, success_callback) {
let marker_icon = L.icon({ let marker_icon = L.icon({
iconUrl: "/static/images/marker-icon.png", iconUrl: "/static/images/marker-icon.png",
shadowUrl: "/static/images/marker-shadow.png" shadowUrl: "/static/images/marker-shadow.png",
iconAnchor: [12, 41]
}); });
let callback = function OSMCallBack(location, data) { let callback = function OSMCallBack(location, data) {

View file

@ -23,13 +23,16 @@
let locations = []; let locations = [];
let loc = {}; let loc = {};
{% for loc in locations -%} {% for loc in locations -%}
{% if loc.address %}
loc = { loc = {
"address": "{{loc.address}}", "address": "{{loc.address}}",
"name": "{{loc.name}}" "name": "{{loc.name}}"
}; };
locations.push(loc); locations.push(loc);
{%- endfor %}
{% endif %}
{%- endfor %}
loadmap(locations); loadmap(locations);
</script> </script>