Skip to content

Latest commit

 

History

History
293 lines (261 loc) · 16.4 KB

issues.md

File metadata and controls

293 lines (261 loc) · 16.4 KB
layout title permalink
page
Issues
/issues/

<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.min.js"></script> <style> #map{ height: 400px } </style> <script src="{{ site.url }}/js/Control.Geocoder.js"></script>
Latitudine
Longitudine

Notizie Utili

{% for member in site.data.issuesjson %} {% if member.issue.labels contains "Notizie Utili" %}

{{member.issue.data.descrizione}}

  • Condividi:
  • Copia link
  • Condividi su Facebook
  • Tweet
  • Condividi su Google+
  • Invia email
{% endif %} {% endfor %}

Alloggi

{% for member in site.data.issuesjson %} {% if member.issue.labels contains "Alloggi" %}

{{member.issue.data.descrizione}}

  • Condividi:
  • Copia link
  • Condividi su Facebook
  • Tweet
  • Condividi su Google+
  • Invia email
{% endif %} {% endfor %}

Donazioni

{% for member in site.data.issuesjson %} {% if member.issue.labels contains "Donazioni" %}

{{member.issue.data.descrizione}}

  • Condividi:
  • Copia link
  • Condividi su Facebook
  • Tweet
  • Condividi su Google+
  • Invia email
{% endif %} {% endfor %}

Fabbisogni

{% for member in site.data.issuesjson %} {% if member.issue.labels contains "Fabbisogni" %}

{{member.issue.data.descrizione}}

  • Condividi:
  • Copia link
  • Condividi su Facebook
  • Tweet
  • Condividi su Google+
  • Invia email
{% endif %} {% endfor %}

Raccolte Fondi

{% for member in site.data.issuesjson %} {% if member.issue.labels contains "Raccolte Fondi" %}

{{member.issue.data.descrizione}}

  • Condividi:
  • Copia link
  • Condividi su Facebook
  • Tweet
  • Condividi su Google+
  • Invia email
{% endif %} {% endfor %}

Bollettino

{% for member in site.data.issuesjson %} {% if member.issue.labels contains "Bollettino" %}

{{member.issue.data.descrizione}}

  • Condividi:
  • Copia link
  • Condividi su Facebook
  • Tweet
  • Condividi su Google+
  • Invia email
{% endif %} {% endfor %}
<script> var markerList=[]; {% for member in site.data.issuesjson %} {% if member.issue.lat != blank and member.issue.lon != blank %} {% if member.issue.labels contains "Notizie Utili" %} markerList.push([{{member.issue.lat}}, {{member.issue.lon}}, "{{member.title|uri_escape}}", "{{ member.number }}", "Notizie Utili"]); {% elsif member.issue.labels contains "Alloggi" %} markerList.push([{{member.issue.lat}}, {{member.issue.lon}}, "{{member.title|uri_escape}}", "{{ member.number }}", "Alloggi"]); {% elsif member.issue.labels contains "Fabbisogni" %} markerList.push([{{member.issue.lat}}, {{member.issue.lon}}, "{{member.title|uri_escape}}", "{{ member.number }}", "Fabbisogni"]); {% elsif member.issue.labels contains "Donazioni" %} markerList.push([{{member.issue.lat}}, {{member.issue.lon}}, "{{member.title|uri_escape}}", "{{ member.number }}", "Donazioni"]); {% elsif member.issue.labels contains "Raccolte Fondi" %} markerList.push([{{member.issue.lat}}, {{member.issue.lon}}, "{{member.title|uri_escape}}", "{{ member.number }}", "Raccolte Fondi"]); {% else %} markerList.push([{{member.issue.lat}}, {{member.issue.lon}}, "{{member.title|uri_escape}}", "{{ member.number }}", ""]); {% endif %} {% endif %} {% endfor %} var alloggiMarker = L.AwesomeMarkers.icon({ icon: 'home', prefix: 'fa', markerColor: 'green' }); var fabbisogniMarker = L.AwesomeMarkers.icon({ icon: 'child', prefix: 'fa', markerColor: 'blue' }); var notizieutiliMarker = L.AwesomeMarkers.icon({ icon: 'newspaper-o', prefix: 'fa', markerColor: 'orange' }); var donazioniMarker = L.AwesomeMarkers.icon({ icon: 'handshake-o', prefix: 'fa', markerColor: 'red' }); var raccoltefondiMarker = L.AwesomeMarkers.icon({ icon: 'money', prefix: 'fa', markerColor: 'blue' }); // initialize the map var map = L.map('map') // create the tile layer with correct attribution var osmUrl='http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png'; var osmAttrib='© OpenStreetMap, Tiles courtesy of Humanitarian OpenStreetMap Team'; var osm = new L.TileLayer(osmUrl, {minZoom: 6, maxZoom: 19, attribution: osmAttrib}); var sumLat = 0.; var sumLon = 0.; for (var i=0; i" + decodeURI(popupText) + ""); sumLat += lat; sumLon += lon; } } map.addLayer(osm).setView([42.629381, 13.288372], 6); var geocoder = L.Control.geocoder({collapsed:false,placeholder:"Cerca...", defaultMarkGeocode: false, geocodingQueryParams: { countrycodes: "it" }, }) .on('markgeocode', function(e) { var latlon=e.geocode.center; $("#lat").html(latlon.lat); $("#lng").html(latlon.lng); var marker = new L.Marker(markerLocation); map.addLayer(marker); }) .addTo(map); </script>