fixed #23
This commit is contained in:
parent
cbc064260a
commit
67917aa526
1 changed files with 15 additions and 8 deletions
|
@ -26,15 +26,22 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function pointToLayer(feature, latlng) {
|
function pointToLayer(feature, latlng) {
|
||||||
|
var marker = L.marker(latlng, { icon: redIcon, riseOnHover: true });
|
||||||
if (feature.properties) {
|
if (feature.properties) {
|
||||||
if (feature.properties.holidays && christmasHoliday) {
|
if (feature.properties.holidays && christmasHoliday) {
|
||||||
return L.marker(latlng, {icon:christmasIcon});
|
var marker = L.marker(latlng, { icon: christmasIcon, riseOnHover: true });
|
||||||
}
|
}
|
||||||
if (!feature.properties.hours.saturday && !feature.properties.hours.sunday) {
|
if (!feature.properties.hours.saturday && !feature.properties.hours.sunday) {
|
||||||
return L.marker(latlng, {icon:blueIcon});
|
var marker = L.marker(latlng, { icon: blueIcon, riseOnHover: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return L.marker(latlng, {icon: redIcon});
|
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);
|
||||||
|
|
Loading…
Reference in a new issue