From 5892607d83e75fe80781f926d79d2d9a0d59d816 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sat, 3 Sep 2022 17:07:53 +1000 Subject: [PATCH] ILS updates - change SLV to Alma - change Newcastle regional to iii Polaris - add Polaris as a colour option on the map --- website/data/library_services_information.csv | 2 +- website/data/nsla_library_locations.csv | 2 +- website/load-map.js | 57 ++++++++++--------- 3 files changed, 31 insertions(+), 30 deletions(-) diff --git a/website/data/library_services_information.csv b/website/data/library_services_information.csv index be58e10..05681c2 100644 --- a/website/data/library_services_information.csv +++ b/website/data/library_services_information.csv @@ -54,7 +54,7 @@ Mid Western Regional Council Library Service,Mid-Western Regional,nsw,yes,3,Civi MidCoast Libraries,Mid-Coast,nsw,no,3,Libero,https://library.midcoast.nsw.gov.au/Home, Mosman Library,Mosman,nsw,yes,3,AIT Aurora,https://www.mosman.nsw.gov.au/library, Nambucca Shire Council Libraries,Nambucca,nsw,yes,3,Civica Spydus,https://www.nambucca.nsw.gov.au/cp_themes/library/home.asp, -Newcastle Region Library,Newcastle,nsw,adults,4,SirsiDynix Horizon,https://www.newcastle.nsw.gov.au/library/home, +Newcastle Region Library,Newcastle,nsw,adults,4,Innovative Polaris,https://www.newcastle.nsw.gov.au/library/home, North Western Library,North Western,nsw,?,3,Civica Spydus,https://www.northwesternlibrary.com.au, Northern Beaches Library,Northern Beaches,nsw,yes,3,Civica Spydus,https://www.northernbeaches.nsw.gov.au/library, Oberon Council Library,Oberon,nsw,?,?,Civica Spydus,https://www.oberon.nsw.gov.au/council/venues/council-venues/oberon-council-library, diff --git a/website/data/nsla_library_locations.csv b/website/data/nsla_library_locations.csv index d7c3d86..7dd8bcb 100644 --- a/website/data/nsla_library_locations.csv +++ b/website/data/nsla_library_locations.csv @@ -1,5 +1,5 @@ lat,lng,town,address,phone,ils --37.809815,144.96513,State Library of Victoria,"328 Swanston Street, Melbourne",03 8664 7000,Ex Libris Voyager +-37.809815,144.96513,State Library of Victoria,"328 Swanston Street, Melbourne",03 8664 7000,Ex Libris Alma -35.2964664654173,149.129530279015,National Library of Australia,"Parkes Place, Canberra",02 6262 1111,Ex Libris Voyager -33.8658844393665,151.213300984753,State Library of New South Wales,"Macquarie Street, Sydney",02 9273 1414,Ex Libris Alma -27.4709532627151,153.018134355766,State Library of Queensland,"Stanley Place, South Brisbane",07 3840 7666,Ex Libris Alma diff --git a/website/load-map.js b/website/load-map.js index 82e10e6..db3eaa1 100644 --- a/website/load-map.js +++ b/website/load-map.js @@ -36,6 +36,7 @@ function getIlsColor(f) { f == 'Ex Libris Voyager' ? 'yellow' : f == 'Follett Destiny' ? '#df4917' : f == 'Infor V-smart' ? '#e174c1' : + f == 'Innovative Polaris' ? '#8e7cc3' : f == 'Innovative Sierra' ? '#ff0000' : f == 'Koha ILS' ? '#2fbf2f' : f == 'Libero' ? '#ffa500' : @@ -55,17 +56,17 @@ function LocationsLayer(data, color, outline, type) { this.type = type; return L.layerGroup([ L.geoCsv(data, { - firstLineTitles: true, + firstLineTitles: true, fieldSeparator: ',', onEachFeature: function (feature, layer) { if (type === 'ils') { layer.bindPopup( - `${feature.properties.town}` + + `${feature.properties.town}` + `

${feature.properties.ils}

` ) } else { layer.bindPopup( - `${feature.properties.town}` + + `${feature.properties.town}` + `

${feature.properties.address}
` + `phone: ${feature.properties.phone}

` ) @@ -77,11 +78,11 @@ function LocationsLayer(data, color, outline, type) { } }), L.geoCsv(data, { - firstLineTitles: true, + firstLineTitles: true, fieldSeparator: ',', onEachFeature: function (feature, layer) { layer.bindPopup( - `${feature.properties.town}` + + `${feature.properties.town}` + `

${feature.properties.address}
` + `phone: ${feature.properties.phone}

` ) @@ -179,7 +180,7 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) const loanThree = new L.StripePattern({ color: '#000' - }); + }); loanThree.addTo(map); const loanFour = new L.StripePattern({ @@ -187,7 +188,7 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) weight: 6, spaceWeight: 2, angle: 45 - }); + }); loanFour.addTo(map); const loanSix = new L.StripePattern({ @@ -195,7 +196,7 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) weight: 2, spaceWeight: 6, angle: 135 - }); + }); loanSix.addTo(map); function getLoanFillPattern(w) { @@ -291,8 +292,8 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) // add control layers var mapControl = L.control.layers( - baseMaps, - overlayMaps, + baseMaps, + overlayMaps, { 'collapsed' : isSmallScreen } ).addTo(map); @@ -362,20 +363,20 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) function zoomToFeature(e, props) { map.fitBounds(e.target.getBounds()); e.target.bindPopup(` - ${props.name}` + - `

Fines: ` + + ${props.name}` + + `

Fines: ` + ( - props.fines === 'no' ? 'No' : - props.fines == 'no_unconfirmed' ? 'Probably no' : - props.fines === 'yes' ? 'Yes' : + props.fines === 'no' ? 'No' : + props.fines == 'no_unconfirmed' ? 'Probably no' : + props.fines === 'yes' ? 'Yes' : props.fines == 'adults' ? 'No for children' : props.fines == 'by_lga' ? 'Varies by LGA' : 'Unknown' - ) + - `
Loans : ` + - (!props.standard_loan_weeks || props.standard_loan_weeks == '?' ? `Unknown` : `${props.standard_loan_weeks} weeks`) + - `
Software : ` + - (!props.ILS || props.ILS == '?' ? `Unknown` : `${props.ILS}`) + - `
Website: ` + + ) + + `
Loans : ` + + (!props.standard_loan_weeks || props.standard_loan_weeks == '?' ? `Unknown` : `${props.standard_loan_weeks} weeks`) + + `
Software : ` + + (!props.ILS || props.ILS == '?' ? `Unknown` : `${props.ILS}`) + + `
Website: ` + (!props.website || props.website == '?' ? `Unknown` : `` + `${props.website}` + ``) + `

` ).openPopup() @@ -397,7 +398,7 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) // FINES LEGEND infoBoxes.fines.onAdd = addLegend; infoBoxes.fines.update = function (props) { - this._div.innerHTML = + this._div.innerHTML = `

Hover over an area for more information

Fine free
@@ -426,7 +427,7 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) infoBoxes.loanPeriod.update = function (props) { this._div.innerHTML = `
-
' + (!props.standard_loan_weeks || props.standard_loan_weeks == "?" ? `No loan period data` : `${props.standard_loan_weeks} week loans`) + - `
Software: ` + + `
Software: ` + (!props.ILS || props.ILS == "?" ? `Unknown` : `${props.ILS}`) + '

' }