This commit is contained in:
Kobe Mertens 2019-02-14 12:30:31 +01:00
parent cbc064260a
commit 67917aa526

View file

@ -26,15 +26,22 @@ $(document).ready(function() {
} }
function pointToLayer(feature, latlng) { function pointToLayer(feature, latlng) {
if (feature.properties) { var marker = L.marker(latlng, { icon: redIcon, riseOnHover: true });
if (feature.properties.holidays && christmasHoliday) { if (feature.properties) {
return L.marker(latlng, {icon:christmasIcon}); if (feature.properties.holidays && christmasHoliday) {
} var marker = L.marker(latlng, { icon: christmasIcon, riseOnHover: true });
if (!feature.properties.hours.saturday && !feature.properties.hours.sunday) {
return L.marker(latlng, {icon:blueIcon});
}
} }
return L.marker(latlng, {icon: redIcon}); if (!feature.properties.hours.saturday && !feature.properties.hours.sunday) {
var marker = L.marker(latlng, { icon: blueIcon, riseOnHover: true });
}
}
marker.on('mouseover', function (ev) {
marker.openPopup();
});
marker.on('mouseout', function (ev) {
marker.closePopup();
});
return marker
} }
var map = L.map('map').setView([51.0475378, 3.7261835], 13); var map = L.map('map').setView([51.0475378, 3.7261835], 13);