layout | title | permalink |
---|---|---|
page |
Cerco Lavoro |
/cerco_lavoro/ |
{% assign filteredissues = site.data.issuesjson | where: "state","open" %}
{% for member in filteredissues %}
{% if member.issue.labels contains "Cerco lavoro" %}
{% endif %}
{% endfor %}
<script>
var houseMarker = L.AwesomeMarkers.icon({
icon: 'home',
prefix: 'fa',
markerColor: 'green'
});
var markerList=[];
{% for member in filteredissues %}
{% if member.issue.labels contains "Cerco lavoro" %}
{% if member.issue.lat != blank and member.issue.lon != blank %}
markerList.push([{{member.issue.lat}}, {{member.issue.lon}}, "{{member.title|uri_escape}}", "/issues/{{ member.number }}"]);
{% endif %}
{% endif %}
{% endfor %}
// 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.;
var countMarkers=0;
for (var i=0; i" + decodeURI(popupText) + "");
sumLat += lat;
sumLon += lon;
countMarkers++;
}
}
map.addLayer(osm).setView([sumLat / countMarkers, sumLon / countMarkers], 6);
</script>