diff options
author | Jose Antonio Marquez | 2012-06-27 16:26:53 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-27 16:26:53 -0700 |
commit | 82abdd67e024d668dfb0a7b72ad81e28367b9fd5 (patch) | |
tree | 09dc5bdd1d132c2871ff8ec216dc050f93ac516f /node_modules/montage-google/map.reel/map.js | |
parent | 4f0104b0120219cbba2e0ac02c7b6aea437dd212 (diff) | |
parent | ec438dd0b501296f9aca8fdab7be99e518d7a8fd (diff) | |
download | ninja-82abdd67e024d668dfb0a7b72ad81e28367b9fd5.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Color
Diffstat (limited to 'node_modules/montage-google/map.reel/map.js')
-rw-r--r-- | node_modules/montage-google/map.reel/map.js | 27 |
1 files changed, 18 insertions, 9 deletions
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/ | |||
117 | this._category = value; | 117 | this._category = value; |
118 | if (this._map && this.latLng) { | 118 | if (this._map && this.latLng) { |
119 | this._getPlaces(this._category); | 119 | this._getPlaces(this._category); |
120 | this.needsDraw = true; | ||
121 | } | 120 | } |
121 | } else { | ||
122 | this._places = []; | ||
122 | } | 123 | } |
124 | |||
125 | this.needsDraw = true; | ||
123 | } | 126 | } |
124 | }, | 127 | }, |
125 | 128 | ||
@@ -186,26 +189,30 @@ var Map = exports.Map = Montage.create(Component, /** @lends module:"montage/ui/ | |||
186 | var icon, image; | 189 | var icon, image; |
187 | switch(this.category) { | 190 | switch(this.category) { |
188 | case 'restaurant': | 191 | case 'restaurant': |
189 | icon = '48-fork-and-knife.png'; | 192 | icon = 'fork-and-knife.png'; |
190 | break; | 193 | break; |
191 | case 'hospital': | 194 | case 'hospital': |
192 | icon = '10-medical.png'; | 195 | icon = 'medical.png'; |
193 | break; | 196 | break; |
194 | case 'bar': | 197 | case 'bar': |
195 | icon = '88-beer-mug.png'; | 198 | icon = 'beer-mug.png'; |
196 | break; | 199 | break; |
197 | case 'grocery_or_supermarket': | 200 | case 'grocery_or_supermarket': |
198 | icon = '80-shopping-cart.png'; | 201 | icon = 'shopping.png'; |
199 | break; | 202 | break; |
200 | case 'museum': | 203 | case 'museum': |
201 | icon = '41-picture-frame.png'; | 204 | icon = 'picture-frame.png'; |
202 | break; | 205 | break; |
203 | case 'gas_station': | 206 | case 'gas_station': |
204 | icon = '47-fuel.png'; | 207 | icon = 'fuel.png'; |
205 | break; | 208 | break; |
206 | }; | 209 | case 'cafe': |
210 | icon = 'cafe.png'; | ||
211 | break; | ||
212 | } | ||
213 | |||
207 | if(icon) { | 214 | if(icon) { |
208 | image = new google.maps.MarkerImage('images/' + icon); | 215 | image = new google.maps.MarkerImage(this._montage_metadata.require.modules['map.reel/map'].directory + 'icons/' + icon); |
209 | } | 216 | } |
210 | var options = { | 217 | var options = { |
211 | map: map, | 218 | map: map, |
@@ -289,6 +296,8 @@ var Map = exports.Map = Montage.create(Component, /** @lends module:"montage/ui/ | |||
289 | for (var i = 0; i < places.length; i++) { | 296 | for (var i = 0; i < places.length; i++) { |
290 | this._createMarker(places[i]); | 297 | this._createMarker(places[i]); |
291 | } | 298 | } |
299 | } else { | ||
300 | this._removeAllMarkers(); | ||
292 | } | 301 | } |
293 | 302 | ||
294 | if(this.traffic === true) { | 303 | if(this.traffic === true) { |