From 9d364be255900e9bde02c4b254d145ec41fc78fb Mon Sep 17 00:00:00 2001 From: Kishore Subramanian Date: Mon, 19 Mar 2012 10:36:49 -0700 Subject: Changes to the Demo - Feed Reader now shows one entry at a time - Category dropdown removed form the Map. It is included as part of the example code - Changed the categories that do not return results --- node_modules/montage/ui/map.reel/map.html | 31 +++-------------------- node_modules/montage/ui/map.reel/map.js | 41 +++++++++---------------------- 2 files changed, 15 insertions(+), 57 deletions(-) (limited to 'node_modules/montage/ui/map.reel') diff --git a/node_modules/montage/ui/map.reel/map.html b/node_modules/montage/ui/map.reel/map.html index 5cd3a5b5..b255ac1e 100644 --- a/node_modules/montage/ui/map.reel/map.html +++ b/node_modules/montage/ui/map.reel/map.html @@ -13,24 +13,13 @@ @@ -49,20 +38,8 @@ -
-
- Show: - -
-
MAP
- +
+
MAP
diff --git a/node_modules/montage/ui/map.reel/map.js b/node_modules/montage/ui/map.reel/map.js index c03d51c5..305ae181 100644 --- a/node_modules/montage/ui/map.reel/map.js +++ b/node_modules/montage/ui/map.reel/map.js @@ -42,34 +42,7 @@ var Map = exports.Map = Montage.create(Component, /** @lends module:"montage/ui/ enumerable: false, value: false }, - _latitude: { - enumerable: false, - value: -34.397 - }, - latitude: { - enumerable: false, - set: function(value) { - this._latitude = value; - this.needsDraw = true; - }, - get: function() { - return this._latitude; - } - }, - _longitude: { - enumerable: false, - value: -34.397 - }, - longitude: { - enumerable: false, - set: function(value) { - this._longitude = value; - this.needsDraw = true; - }, - get: function() { - return this._longitude; - } - }, + defaultLatLng: { value: {lat: -34.397, lng: 150.644} @@ -132,6 +105,7 @@ var Map = exports.Map = Montage.create(Component, /** @lends module:"montage/ui/ return this._category; }, set: function(value) { + console.log('category set: ' + value); if(value) { this._category = value; this._getPlaces(this._category); @@ -170,6 +144,7 @@ var Map = exports.Map = Montage.create(Component, /** @lends module:"montage/ui/ } var service = new google.maps.places.PlacesService(this._map); service.search(request, function(results, status) { + console.log('got places for ', self.category, status, results); if (status == google.maps.places.PlacesServiceStatus.OK) { self._places = results; } else { @@ -192,12 +167,18 @@ var Map = exports.Map = Montage.create(Component, /** @lends module:"montage/ui/ case 'hospital': icon = '10-medical.png'; break; - case 'cafe': - icon = '34-coffee.png'; + case 'bar': + icon = '88-beer-mug.png'; + break; + case 'grocery_or_supermarket': + icon = '80-shopping-cart.png'; break; case 'museum': icon = '41-picture-frame.png'; break; + case 'gas_station': + icon = '47-fuel.png'; + break; }; if(icon) { image = new google.maps.MarkerImage('images/' + icon); -- cgit v1.2.3