aanpassing aan de JS: groene pinnen voor online bibs

This commit is contained in:
7734485917411998476 2021-05-10 20:24:10 +02:00 committed by GitHub
parent b2cd8eb16c
commit 9ee63912d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,11 +24,17 @@ $(document).ready(function() {
iconUrl: "img/grey-marker.png"
}
});
var GreenIcon = L.Icon.Default.extend({
options: {
iconUrl: "img/green-marker.png"
}
});
var blueIcon = new BlueIcon();
var redIcon = new RedIcon();
var christmasIcon = new ChristmasIcon();
var greyIcon = new GreyIcon();
var greenIcon = new GreenIcon();
var now = new Date();
var christmasSeason =
@ -37,6 +43,8 @@ $(document).ready(function() {
function onEachFeature(feature, layer) {
if (feature.properties) {
var prop = feature.properties;
prop["online"] = feature.properties.address.substring(0,5)==="https";
layer.bindPopup(popuptemplate(feature.properties), {
showOnMouseOver: true
});
@ -60,6 +68,10 @@ $(document).ready(function() {
icon = blueIcon;
iconDescription = "blue";
}
if (feature.properties.address.substring(0,5)==="https") {
icon = greenIcon;
iconDescription = "green";
}
}
return new HoverMarker(latlng, { icon: icon, riseOnHover: true});
}