From d8bb1bf1537166753a53000e31ece8f99c7daaaa Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 26 Jun 2012 17:39:46 -0700 Subject: including the map icons inside the component and adding the empty category Signed-off-by: Valerio Virgillito --- js/io/system/ninjalibrary.json | 2 +- node_modules/components-data/map.json | 2 +- node_modules/descriptor.json | 10 +++++++- .../feed-reader/feed-reader.reel/feed-reader.js | 3 --- .../montage-google/map.reel/icons/airplane.png | Bin 0 -> 3004 bytes .../montage-google/map.reel/icons/cafe.png | Bin 0 -> 2958 bytes .../montage-google/map.reel/icons/coffee.png | Bin 0 -> 3052 bytes .../montage-google/map.reel/icons/food.png | Bin 0 -> 3038 bytes .../map.reel/icons/fork-and-knife.png | Bin 0 -> 2882 bytes .../montage-google/map.reel/icons/map-marker.png | Bin 0 -> 3131 bytes .../montage-google/map.reel/icons/medical.png | Bin 0 -> 2915 bytes .../map.reel/icons/picture-frame.png | Bin 0 -> 2928 bytes .../montage-google/map.reel/icons/shopping.png | Bin 0 -> 2970 bytes .../montage-google/map.reel/icons/widescreen.png | Bin 0 -> 2986 bytes .../montage-google/map.reel/icons/wine-bottle.png | Bin 0 -> 187 bytes .../montage-google/map.reel/icons/wine-glass.png | Bin 0 -> 2983 bytes node_modules/montage-google/map.reel/map.js | 27 ++++++++++++++------- 17 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 node_modules/montage-google/map.reel/icons/airplane.png create mode 100644 node_modules/montage-google/map.reel/icons/cafe.png create mode 100644 node_modules/montage-google/map.reel/icons/coffee.png create mode 100644 node_modules/montage-google/map.reel/icons/food.png create mode 100644 node_modules/montage-google/map.reel/icons/fork-and-knife.png create mode 100644 node_modules/montage-google/map.reel/icons/map-marker.png create mode 100644 node_modules/montage-google/map.reel/icons/medical.png create mode 100644 node_modules/montage-google/map.reel/icons/picture-frame.png create mode 100644 node_modules/montage-google/map.reel/icons/shopping.png create mode 100644 node_modules/montage-google/map.reel/icons/widescreen.png create mode 100644 node_modules/montage-google/map.reel/icons/wine-bottle.png create mode 100644 node_modules/montage-google/map.reel/icons/wine-glass.png diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json index 579264cb..c5ccbc82 100644 --- a/js/io/system/ninjalibrary.json +++ b/js/io/system/ninjalibrary.json @@ -1,6 +1,6 @@ { "libraries": [ - {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.11.0.0"}, + {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.11.1.0"}, {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.6.0.3"} ] } \ No newline at end of file diff --git a/node_modules/components-data/map.json b/node_modules/components-data/map.json index e80fa510..4a3da3c6 100644 --- a/node_modules/components-data/map.json +++ b/node_modules/components-data/map.json @@ -10,7 +10,7 @@ "name": "category", "type": "select", "default": "restaurant", - "possibleValues": ["restaurant", "hospital", "cafe", "museum"] + "possibleValues": ["", "restaurant", "hospital", "cafe", "museum"] }, { "name": "center", diff --git a/node_modules/descriptor.json b/node_modules/descriptor.json index b6868954..9a2177c6 100644 --- a/node_modules/descriptor.json +++ b/node_modules/descriptor.json @@ -82,7 +82,11 @@ {"name": "feed-reader.reel"} ] }, - {"name": "map.reel"}, + {"name": "map.reel", + "children": [ + {"name": "icons"} + ] + }, {"name": "picasa-carousel.reel", "children": [ {"name": "image.reel"} @@ -370,6 +374,10 @@ "montage-google/map.reel/map.js", "montage-google/map.reel/map.html", "montage-google/map.reel/map.css", + "montage-google/map.reel/icons/fork-and-knife.png", + "montage-google/map.reel/icons/medical.png", + "montage-google/map.reel/icons/picture-frame.png", + "montage-google/map.reel/icons/cafe.png", "montage-google/picasa-carousel.reel/image.reel/image.html", "montage-google/picasa-carousel.reel/image.reel/image.js", "montage-google/picasa-carousel.reel/picasa-carousel.css", diff --git a/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js b/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js index 34533d6d..3c139c60 100644 --- a/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js +++ b/node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js @@ -16,11 +16,8 @@ exports.FeedReader = Montage.create(Component, { value: function() { var self = this; var apiInit = function() { - console.log('google api initialized'); - google.load("feeds", "1", { callback: function() { - console.log('google feeds api loaded'); self._apiLoaded = true; self.feedURL = self._feedURL; self.needsDraw = true; diff --git a/node_modules/montage-google/map.reel/icons/airplane.png b/node_modules/montage-google/map.reel/icons/airplane.png new file mode 100644 index 00000000..dfcbbc78 Binary files /dev/null and b/node_modules/montage-google/map.reel/icons/airplane.png differ diff --git a/node_modules/montage-google/map.reel/icons/cafe.png b/node_modules/montage-google/map.reel/icons/cafe.png new file mode 100644 index 00000000..4e9c517a Binary files /dev/null and b/node_modules/montage-google/map.reel/icons/cafe.png differ diff --git a/node_modules/montage-google/map.reel/icons/coffee.png b/node_modules/montage-google/map.reel/icons/coffee.png new file mode 100644 index 00000000..4c4bedad Binary files /dev/null and b/node_modules/montage-google/map.reel/icons/coffee.png differ diff --git a/node_modules/montage-google/map.reel/icons/food.png b/node_modules/montage-google/map.reel/icons/food.png new file mode 100644 index 00000000..81afd74a Binary files /dev/null and b/node_modules/montage-google/map.reel/icons/food.png differ diff --git a/node_modules/montage-google/map.reel/icons/fork-and-knife.png b/node_modules/montage-google/map.reel/icons/fork-and-knife.png new file mode 100644 index 00000000..06d91088 Binary files /dev/null and b/node_modules/montage-google/map.reel/icons/fork-and-knife.png differ diff --git a/node_modules/montage-google/map.reel/icons/map-marker.png b/node_modules/montage-google/map.reel/icons/map-marker.png new file mode 100644 index 00000000..a5d99d69 Binary files /dev/null and b/node_modules/montage-google/map.reel/icons/map-marker.png differ diff --git a/node_modules/montage-google/map.reel/icons/medical.png b/node_modules/montage-google/map.reel/icons/medical.png new file mode 100644 index 00000000..ab78c783 Binary files /dev/null and b/node_modules/montage-google/map.reel/icons/medical.png differ diff --git a/node_modules/montage-google/map.reel/icons/picture-frame.png b/node_modules/montage-google/map.reel/icons/picture-frame.png new file mode 100644 index 00000000..6deee997 Binary files /dev/null and b/node_modules/montage-google/map.reel/icons/picture-frame.png differ diff --git a/node_modules/montage-google/map.reel/icons/shopping.png b/node_modules/montage-google/map.reel/icons/shopping.png new file mode 100644 index 00000000..03689f99 Binary files /dev/null and b/node_modules/montage-google/map.reel/icons/shopping.png differ diff --git a/node_modules/montage-google/map.reel/icons/widescreen.png b/node_modules/montage-google/map.reel/icons/widescreen.png new file mode 100644 index 00000000..2e5f1ba7 Binary files /dev/null and b/node_modules/montage-google/map.reel/icons/widescreen.png differ diff --git a/node_modules/montage-google/map.reel/icons/wine-bottle.png b/node_modules/montage-google/map.reel/icons/wine-bottle.png new file mode 100644 index 00000000..a7df9e97 Binary files /dev/null and b/node_modules/montage-google/map.reel/icons/wine-bottle.png differ diff --git a/node_modules/montage-google/map.reel/icons/wine-glass.png b/node_modules/montage-google/map.reel/icons/wine-glass.png new file mode 100644 index 00000000..b4d34474 Binary files /dev/null and b/node_modules/montage-google/map.reel/icons/wine-glass.png differ diff --git a/node_modules/montage-google/map.reel/map.js b/node_modules/montage-google/map.reel/map.js index 4e3a6d70..1aeb97df 100644 --- a/node_modules/montage-google/map.reel/map.js +++ b/node_modules/montage-google/map.reel/map.js @@ -117,9 +117,12 @@ var Map = exports.Map = Montage.create(Component, /** @lends module:"montage/ui/ this._category = value; if (this._map && this.latLng) { this._getPlaces(this._category); - this.needsDraw = true; } + } else { + this._places = []; } + + this.needsDraw = true; } }, @@ -186,26 +189,30 @@ var Map = exports.Map = Montage.create(Component, /** @lends module:"montage/ui/ var icon, image; switch(this.category) { case 'restaurant': - icon = '48-fork-and-knife.png'; + icon = 'fork-and-knife.png'; break; case 'hospital': - icon = '10-medical.png'; + icon = 'medical.png'; break; case 'bar': - icon = '88-beer-mug.png'; + icon = 'beer-mug.png'; break; case 'grocery_or_supermarket': - icon = '80-shopping-cart.png'; + icon = 'shopping.png'; break; case 'museum': - icon = '41-picture-frame.png'; + icon = 'picture-frame.png'; break; case 'gas_station': - icon = '47-fuel.png'; + icon = 'fuel.png'; break; - }; + case 'cafe': + icon = 'cafe.png'; + break; + } + if(icon) { - image = new google.maps.MarkerImage('images/' + icon); + image = new google.maps.MarkerImage(this._montage_metadata.require.modules['map.reel/map'].directory + 'icons/' + icon); } var options = { map: map, @@ -289,6 +296,8 @@ var Map = exports.Map = Montage.create(Component, /** @lends module:"montage/ui/ for (var i = 0; i < places.length; i++) { this._createMarker(places[i]); } + } else { + this._removeAllMarkers(); } if(this.traffic === true) { -- cgit v1.2.3