From bd9a2873de1cf9293f925fcb5e32be74a5837086 Mon Sep 17 00:00:00 2001 From: Falco Nogatz Date: Sat, 23 Feb 2013 13:10:22 +0100 Subject: [PATCH] prepared for GTFS update --- .gitignore | 1 + lib/map-data-generator/map-data-generator.js | 4 ++-- package.json | 2 +- public/js/livemap.js | 3 +-- server.js | 6 +----- views/layout.html | 2 +- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 3c3629e..8ad692a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +gtfs/ulm \ No newline at end of file diff --git a/lib/map-data-generator/map-data-generator.js b/lib/map-data-generator/map-data-generator.js index dfd1807..9609d72 100644 --- a/lib/map-data-generator/map-data-generator.js +++ b/lib/map-data-generator/map-data-generator.js @@ -71,8 +71,8 @@ module.exports = (function(){ // transform all stops to GeoJSON var stops = gtfs.getStops(); for (var i in stops) { - var point = {}; - point.type = "Feature"; + var point = {}; + point.type = "Feature"; point.geometry = {}; point.geometry.type = "Point"; point.geometry.coordinates = [stops[i].stop_lon,stops[i].stop_lat]; diff --git a/package.json b/package.json index 16192b1..517f8ca 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "ulmapi ", "name": "ulmapi-de", - "version": "0.0.1", + "version": "0.0.2", "homepage": "http://ulmapi.de", "repository": { "type": "git", diff --git a/public/js/livemap.js b/public/js/livemap.js index dd319ef..ffa7103 100644 --- a/public/js/livemap.js +++ b/public/js/livemap.js @@ -99,8 +99,7 @@ $(document).ready(function(){ success: function(data) { L.geoJson(data, { - pointToLayer: function(f, latlng) { return new L.Marker(latlng, {icon : hIcon}); } - + pointToLayer: function(f, latlng) { return new L.Marker(latlng, {icon : hIcon }).bindPopup(''+f.properties.stop_name+'
'+f.properties.stop_longname); } }).addTo(map); } }); diff --git a/server.js b/server.js index 8c56907..b10ac9c 100644 --- a/server.js +++ b/server.js @@ -94,8 +94,4 @@ var gtfs = Gtfs(process.env.GTFS_PATH || path.join(__dirname,"gtfs",gtfsdir), fu }); -}); - - - - +}); \ No newline at end of file diff --git a/views/layout.html b/views/layout.html index c252a82..f809d39 100644 --- a/views/layout.html +++ b/views/layout.html @@ -56,4 +56,4 @@

It's late night around here!

- + \ No newline at end of file