diff --git a/src/js/main.js b/src/js/main.js index 987daa2..0ef1f8e 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -1197,6 +1197,55 @@ return infoWindow; }; + var renderBikeHireDockingStation = function renderBikeHireDockingStation(entity, coordinates) { + var icon; + icon = { + anchor: [0.5, 1], + scale: 0.4, + src: internalUrl('images/bikestation/icon.png') + }; + var poi = { + id: entity.id, + icon: icon, + tooltip: entity.id, + data: entity, + title: entity.name, + infoWindow: buildBikeHireDockingStationWindow.call(this, entity), + currentLocation: coordinates, + location: entity.location + }; + + return poi; + }; + + var buildBikeHireDockingStationWindow = function buildBikeHireDockingStationWindow(entity) { + var infoWindow = "
' + entity.description + '
'; + } + + if (entity.status) { + infoWindow += 'Status: ' + entity.status + '
'; + } + + if (entity.availableBikeNumber) { + infoWindow += 'Availabel bikes: ' + entity.availableBikeNumber + '
'; + } + + if (entity.freeSlotNumber) { + infoWindow += 'Free slots: ' + entity.freeSlotNumber + '
'; + } + + if (entity.openingHours) { + infoWindow += 'Open hours: ' + entity.openingHours + '
'; + } + + infoWindow += "