Compare commits

...

7 Commits

Author SHA1 Message Date
toqvist a15379a028 Style map markers to dots
continuous-integration/drone/push Build is passing Details
2024-02-20 09:47:08 +01:00
Aadil Ayub 5b5db0654e update starting coordinates for kios
continuous-integration/drone/push Build is passing Details
2024-02-19 20:02:05 +05:00
Aadil Ayub 29c68ea84c tweak map css
continuous-integration/drone/push Build is passing Details
2024-01-31 15:00:58 +05:00
Aadil Ayub 3d974383f5 restore lumbung kios menu link
continuous-integration/drone/push Build is passing Details
2023-11-30 16:36:07 +05:00
Aadil Ayub b017e20443 fix some incorrect pins
continuous-integration/drone/push Build is passing Details
2023-09-11 15:15:19 +05:00
Aadil Ayub a9ced785ba delete duplicate coordinate
continuous-integration/drone/push Build is passing Details
2023-09-11 15:02:14 +05:00
Aadil Ayub 51b89b404c Merge pull request 'Add publishers & contributor maps' (#66) from feature/leaflet-map into main
continuous-integration/drone/push Build is passing Details
Reviewed-on: #66
2023-09-11 09:50:47 +00:00
4 changed files with 66 additions and 52 deletions

View File

@ -5,7 +5,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [31.501803673432892, 34.46684826773766] "coordinates": [34.46684826773766, 31.501803673432892]
}, },
"properties": { "properties": {
"groupName": "The Question of Funding" "groupName": "The Question of Funding"
@ -207,16 +207,6 @@
"groupName": "Jumana Emil Abboud" "groupName": "Jumana Emil Abboud"
} }
}, },
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-58.424717920825884, -34.60590628674898]
},
"properties": {
"groupName": "La Intermundial Holobiente"
}
},
{ {
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
@ -432,7 +422,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [5.560014, -0.200965] "coordinates": [-0.200965, 5.560014]
}, },
"properties": { "properties": {
"groupName": "Nubuke Foundation - Arts Collaboratory" "groupName": "Nubuke Foundation - Arts Collaboratory"
@ -452,7 +442,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [33.897204, 35.513829] "coordinates": [35.513829, 33.897204]
}, },
"properties": { "properties": {
"groupName": "Temporary Art Platform - Arts Collaboratory" "groupName": "Temporary Art Platform - Arts Collaboratory"
@ -472,7 +462,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [4.635649, -74.087834] "coordinates": [-74.087834, 4.635649]
}, },
"properties": { "properties": {
"groupName": "Lugar a Dudas - Arts Collaboratory" "groupName": "Lugar a Dudas - Arts Collaboratory"
@ -482,7 +472,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [3.451646, -76.549099] "coordinates": [-76.549099, 3.451646]
}, },
"properties": { "properties": {
"groupName": "Helena Producciones - Arts Collaboratory" "groupName": "Helena Producciones - Arts Collaboratory"
@ -492,7 +482,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [-33.940484, 18.463735] "coordinates": [18.463735, -33.940484]
}, },
"properties": { "properties": {
"groupName": "Gugulective - Arts Collaboratory" "groupName": "Gugulective - Arts Collaboratory"
@ -512,7 +502,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [14.624033, -90.516175] "coordinates": [-90.516175, 14.624033]
}, },
"properties": { "properties": {
"groupName": "La Torana - Arts Collaboratory" "groupName": "La Torana - Arts Collaboratory"
@ -522,7 +512,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [-6.218968, 106.832686] "coordinates": [106.832686, -6.218968]
}, },
"properties": { "properties": {
"groupName": "ruangrupa" "groupName": "ruangrupa"
@ -532,7 +522,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [-26.204103, 28.047305] "coordinates": [28.047305, -26.204103]
}, },
"properties": { "properties": {
"groupName": "Keleketla! Library - Arts Collaboratory", "groupName": "Keleketla! Library - Arts Collaboratory",
@ -544,7 +534,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [24.861462, 67.063473] "coordinates": [67.063473, 24.861462]
}, },
"properties": { "properties": {
"groupName": "Vasl Artists' Association - Arts Collaboratory" "groupName": "Vasl Artists' Association - Arts Collaboratory"
@ -554,7 +544,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [6.453060, 3.379206] "coordinates": [3.379206, 6.453060]
}, },
"properties": { "properties": {
"groupName": "Video Art Network Lagos - Arts Collaboratory" "groupName": "Video Art Network Lagos - Arts Collaboratory"
@ -564,7 +554,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [-16.507456, -68.122441] "coordinates": [-68.122441, -16.507456]
}, },
"properties": { "properties": {
"groupName": "Casa Tres Patios - Arts Collaboratory" "groupName": "Casa Tres Patios - Arts Collaboratory"
@ -574,7 +564,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [-12.046374, -77.033966] "coordinates": [-77.033966, -12.046374]
}, },
"properties": { "properties": {
"groupName": "Bisagra - Arts Collaboratory" "groupName": "Bisagra - Arts Collaboratory"
@ -584,7 +574,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [14.565859, 121.028812] "coordinates": [121.028812, 14.565859]
}, },
"properties": { "properties": {
"groupName": "Green Papaya Art Projects - Arts Collaboratory" "groupName": "Green Papaya Art Projects - Arts Collaboratory"
@ -594,7 +584,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [-25.965053, 32.570926] "coordinates": [32.570926, -25.965053]
}, },
"properties": { "properties": {
"groupName": "Nucleo de Arte - Arts Collaboratory" "groupName": "Nucleo de Arte - Arts Collaboratory"
@ -604,7 +594,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [19.433735, -99.127662] "coordinates": [-99.127662, 19.433735]
}, },
"properties": { "properties": {
"groupName": "Casa Gallina - Arts Collaboratory" "groupName": "Casa Gallina - Arts Collaboratory"
@ -614,7 +604,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [-34.905134, -56.168350] "coordinates": [-56.168350, -34.905134]
}, },
"properties": { "properties": {
"groupName": "Espacio de Arte Contemporáneo - Arts Collaboratory" "groupName": "Espacio de Arte Contemporáneo - Arts Collaboratory"
@ -624,7 +614,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [18.964700, 72.825833] "coordinates": [72.825833, 18.964700]
}, },
"properties": { "properties": {
"groupName": "Clark House Initiative - Arts Collaboratory" "groupName": "Clark House Initiative - Arts Collaboratory"
@ -634,7 +624,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [11.5636628, 104.9165275] "coordinates": [104.9165275, 11.5636628]
}, },
"properties": { "properties": {
"groupName": "SA SA BASSAC - Arts Collaboratory" "groupName": "SA SA BASSAC - Arts Collaboratory"
@ -664,7 +654,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [-33.447503, -70.648204] "coordinates": [-70.648204, -33.447503]
}, },
"properties": { "properties": {
"groupName": "Metales Pesados - Arts Collaboratory" "groupName": "Metales Pesados - Arts Collaboratory"
@ -674,7 +664,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [-23.5351122, -46.6523816] "coordinates": [-46.6523816, -23.5351122]
}, },
"properties": { "properties": {
"groupName": "Casa do Povo - Arts Collaboratory" "groupName": "Casa do Povo - Arts Collaboratory"
@ -694,7 +684,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [-7.7830803, 110.3661793] "coordinates": [110.3661793, -7.7830803]
}, },
"properties": { "properties": {
"groupName": "KUNCI Cultural Studies Center - Arts Collaboratory" "groupName": "KUNCI Cultural Studies Center - Arts Collaboratory"

View File

@ -25,7 +25,7 @@
<li><a href="/publishers/">publishers</a></li> <li><a href="/publishers/">publishers</a></li>
<li class="has-submenu">ekonomi <li class="has-submenu">ekonomi
<ul class="submenu"> <ul class="submenu">
{{/* <li><a href="/tags/lumbungkiosproducts/">kios</a></li> */}} <li><a href="/tags/lumbungkiosproducts/">kios</a></li>
<li><a href="/tags/lumbunggallery/">gallery</a></li> <li><a href="/tags/lumbunggallery/">gallery</a></li>
</ul> </ul>
</li> </li>

View File

@ -1,8 +1,15 @@
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css" <link
integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI=" crossorigin="" /> rel="stylesheet"
href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css"
integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI="
crossorigin=""
/>
<script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js" <script
integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM=" crossorigin=""></script> src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"
integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM="
crossorigin=""
></script>
<div id="map"></div> <div id="map"></div>
@ -12,6 +19,11 @@
padding-bottom: 70%; padding-bottom: 70%;
margin-bottom: 80px; margin-bottom: 80px;
} }
.black-dot {
background-color: black;
border-radius: 50%;
}
</style> </style>
<script> <script>
@ -20,21 +32,33 @@
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>' attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}); });
var blackDotIcon = L.divIcon({
className: 'black-dot',
iconSize: [20, 20],
iconAnchor: [10, 10]
});
// Create makers layer group // Create makers layer group
var makers = L.layerGroup(); var makers = L.layerGroup();
{{ with getJSON "https://kios-admin.lumbung.space/api/makers"}} {{ with getJSON "https://kios-admin.lumbung.space/api/makers"}}
{{ range .docs }} {{ range .docs }}
var makerMarker = L.marker(L.GeoJSON.coordsToLatLng({{ .location }})); var makerMarker = L.marker(L.GeoJSON.coordsToLatLng({{ .location }}), {
icon: blackDotIcon
});
makerMarker.bindPopup({{ .name }}) makerMarker.bindPopup({{ .name }})
makers.addLayer(makerMarker); makers.addLayer(makerMarker);
{{ end }} {{ end }}
{{ end }} {{ end }}
// Create retailers layer group // Create retailers layer group
var retailers = L.layerGroup(); var retailers = L.layerGroup();
{{ with getJSON "https://kios-admin.lumbung.space/api/retailers"}} {{ with getJSON "https://kios-admin.lumbung.space/api/retailers"}}
{{ range .docs }} {{ range .docs }}
var retailerMarker = L.marker(L.GeoJSON.coordsToLatLng({{ .location }})); var retailerMarker = L.marker(L.GeoJSON.coordsToLatLng({{ .location }}), {
icon: blackDotIcon
});
retailerMarker.bindPopup({{ .name }}) retailerMarker.bindPopup({{ .name }})
retailers.addLayer(retailerMarker); retailers.addLayer(retailerMarker);
{{ end }} {{ end }}
@ -45,11 +69,11 @@
{{ with getJSON "https://kios-admin.lumbung.space/api/dispatches"}} {{ with getJSON "https://kios-admin.lumbung.space/api/dispatches"}}
{{ range .docs }} {{ range .docs }}
var start = L.GeoJSON.coordsToLatLng({{ .startingPoint.location }}); var start = L.GeoJSON.coordsToLatLng({{ .startingPoint.location }});
var startMarker = L.marker(start); var startMarker = L.marker(start, {icon: blackDotIcon});
startMarker.bindPopup({{ .startingPoint.name }}); startMarker.bindPopup({{ .startingPoint.name }});
var end = L.GeoJSON.coordsToLatLng({{ .endPoint.location }}); var end = L.GeoJSON.coordsToLatLng({{ .endPoint.location }});
var endMarker = L.marker(end); var endMarker = L.marker(end, {icon: blackDotIcon});
endMarker.bindPopup({{ .endPoint.name }}); endMarker.bindPopup({{ .endPoint.name }});
// Add line to display dispatch route // Add line to display dispatch route
@ -62,9 +86,9 @@
productsList.forEach((product, i) => productsString = productsString + product.productTitle + (i + 1 < productsList.length ? ', ' : "")); productsList.forEach((product, i) => productsString = productsString + product.productTitle + (i + 1 < productsList.length ? ', ' : ""));
route.bindPopup( route.bindPopup(
'<p>Origin: <strong>' + {{ .startingPoint.name }} + '</strong><br />' + '<p>Origin: <strong>' + {{ .startingPoint.name }} + '</strong><br />' +
'Destination: <strong>' + {{ .endPoint.name }} + '</strong><br />' + 'Destination: <strong>' + {{ .endPoint.name }} + '</strong><br />' +
'Courier: <strong>' + {{ .courier.name }} + '</strong><br />' + 'Courier: <strong>' + {{ .courier.name }} + '</strong><br />' +
'Products: <strong>' + productsString + '</strong><br />' + 'Products: <strong>' + productsString + '</strong><br />' +
'Status: <strong>' + {{ .status }} + '</strong></p>'); 'Status: <strong>' + {{ .status }} + '</strong></p>');
@ -75,19 +99,19 @@
{{ end }} {{ end }}
var map = L.map('map', { var map = L.map('map', {
center: [0, 0], center: [-6.1815, 106.8228],
zoom: 2, zoom: 3,
layers: [osm, dispatches] layers: [osm, dispatches]
}); });
var overlayMaps = { var overlayMaps = {
"Dispatches": dispatches, "Dispatches": dispatches,
"Makers": makers, "Makers": makers,
"Retailers": retailers "Retailers": retailers
}; };
var layerControl = L.control.layers(overlayMaps, null, {collapsed: false, position: "topleft"}).addTo(map); var layerControl = L.control.layers(overlayMaps, null, {collapsed: false, position: "topleft"}).addTo(map);
window.addEventListener('load', (event) => { window.addEventListener('load', (event) => {
map.invalidateSize(); map.invalidateSize();
}); });
</script> </script>

View File

@ -1011,10 +1011,10 @@ label:hover {
display: flex; display: flex;
} }
/* publishers map */ /* leaflet map */
#map { #map {
margin-top: 2rem; margin-top: 2rem;
margin-bottom: 4rem; margin-bottom: 4rem !important;
/* makes map "break out of container" and take full-width */ /* makes map "break out of container" and take full-width */
width: 100vw !important; width: 100vw !important;