commit
896152fe9b
|
@ -63,11 +63,18 @@ function LocationsLayer(data, color, outline, type) {
|
||||||
fieldSeparator: ',',
|
fieldSeparator: ',',
|
||||||
onEachFeature: function (feature, layer) {
|
onEachFeature: function (feature, layer) {
|
||||||
if (type === 'ils') {
|
if (type === 'ils') {
|
||||||
|
if (feature.properties.discovery) {
|
||||||
layer.bindPopup(
|
layer.bindPopup(
|
||||||
`<strong>${feature.properties.town}</strong>` +
|
`<strong>${feature.properties.town}</strong>` +
|
||||||
`<p>${feature.properties.ils}</p>` +
|
`<p>${feature.properties.ils}</p>` +
|
||||||
`<p>${feature.properties.discovery}</p>`
|
`<p>${feature.properties.discovery}</p>`
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
layer.bindPopup(
|
||||||
|
`<strong>${feature.properties.town}</strong>` +
|
||||||
|
`<p>${feature.properties.ils}</p>`
|
||||||
|
)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
layer.bindPopup(
|
layer.bindPopup(
|
||||||
`<strong>${feature.properties.town}</strong>` +
|
`<strong>${feature.properties.town}</strong>` +
|
||||||
|
@ -120,7 +127,7 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches, caul])
|
||||||
const mechsAndSoA = new LocationsLayer(data[3], 'rgb(255,165,0)', 800)
|
const mechsAndSoA = new LocationsLayer(data[3], 'rgb(255,165,0)', 800)
|
||||||
const otherLibs = new LocationsLayer(data[4], '#75f857', 800)
|
const otherLibs = new LocationsLayer(data[4], '#75f857', 800)
|
||||||
const nslaLibs = new LocationsLayer(data[4], '#FF3961', 20000, 'ils')
|
const nslaLibs = new LocationsLayer(data[4], '#FF3961', 20000, 'ils')
|
||||||
const academicLibs = new LocationsLayer(data[5], '#0073A1', 1000, 'ils')
|
const academicLibs = new LocationsLayer(data[5], '#0073A1', 5000, 'ils')
|
||||||
// add to the initial map on load
|
// add to the initial map on load
|
||||||
branches.addTo(map)
|
branches.addTo(map)
|
||||||
ikcs.addTo(map)
|
ikcs.addTo(map)
|
||||||
|
|
Loading…
Reference in a new issue