19 color: 'rgba(113,132,141,.2)', |
19 color: 'rgba(113,132,141,.2)', |
20 |
20 |
21 filter: Ember.inject.service(), |
21 filter: Ember.inject.service(), |
22 locationObserver: Ember.observer('filter.location', function() { |
22 locationObserver: Ember.observer('filter.location', function() { |
23 if(!this.get('filter').get('location')) { |
23 if(!this.get('filter').get('location')) { |
24 this.sendAction('setLocation', 'world'); |
24 this.sendAction('setLocation', '6295630'); |
25 } |
25 } |
26 }), |
26 }), |
27 |
27 |
28 geostats: [], |
28 geostats: [], |
29 observerGeostats: Ember.observer('geostats', function() { |
29 observerGeostats: Ember.observer('geostats', function() { |
30 if(this.get('map')) { |
30 if(this.get('map')) { |
31 if(this.get('map').selectedObject.id) { |
31 if(this.get('map').selectedObject.id) { |
32 if(this.get('map').selectedObject.parentObject.mapVar === this.get('countriesMapVar')) { |
32 if(this.get('map').selectedObject.parentObject.mapVar === this.get('countriesMapVar')) { |
33 if(this.get('map').selectedObject.id === 'FR') { |
33 if(this.get('map').selectedObject.id === '3017382') { |
34 this.setFranceAreas(); |
34 this.setFranceAreas(); |
35 this.set('dataProvider', { |
35 this.set('dataProvider', { |
36 'mapVar': this.get('franceMapVar'), |
36 'mapVar': this.get('franceMapVar'), |
37 'getAreasFromMap': true, |
37 'getAreasFromMap': true, |
38 'areas': this.get('franceAreas') |
38 'areas': this.get('franceAreas') |
80 'passZoomValuesToTarget': false, |
80 'passZoomValuesToTarget': false, |
81 'autoZoom': false |
81 'autoZoom': false |
82 }; |
82 }; |
83 var departments = self.get('geostats').find(geostat => geostat.id === area.id); |
83 var departments = self.get('geostats').find(geostat => geostat.id === area.id); |
84 if(typeof departments === 'undefined') { |
84 if(typeof departments === 'undefined') { |
85 object['mouseEnabled'] = false, |
85 object['mouseEnabled'] = false; |
86 object['color'] = self.get('color'); |
86 object['color'] = self.get('color'); |
87 } else { |
87 } else { |
88 object['value'] = departments.get('count'); |
88 object['value'] = departments.get('count'); |
89 } |
89 } |
90 france2016LowAreas.push(object); |
90 france2016LowAreas.push(object); |
131 'mouseEnabled': true, |
131 'mouseEnabled': true, |
132 'autoZoom': true |
132 'autoZoom': true |
133 }; |
133 }; |
134 var continent = self.get('geostats').find(geostat => geostat.id === area.id); |
134 var continent = self.get('geostats').find(geostat => geostat.id === area.id); |
135 if(typeof continent === 'undefined') { |
135 if(typeof continent === 'undefined') { |
136 object['mouseEnabled'] = false, |
136 object['mouseEnabled'] = false; |
137 object['color'] = self.get('color'); |
137 object['color'] = self.get('color'); |
138 } else { |
138 } else { |
139 object['value'] = continent.get('count'); |
139 object['value'] = continent.get('count'); |
140 } |
140 } |
141 continentsLowAreas.push(object); |
141 continentsLowAreas.push(object); |
147 this.$('#mapdiv').height(Ember.$('.corpus-app-container').height()); |
147 this.$('#mapdiv').height(Ember.$('.corpus-app-container').height()); |
148 this.createAmMap(); |
148 this.createAmMap(); |
149 }, |
149 }, |
150 |
150 |
151 createAmMap: function() { |
151 createAmMap: function() { |
152 var self = this; |
152 |
153 |
|
154 this.setContinentsAreas(); |
153 this.setContinentsAreas(); |
155 this.set('dataProvider', { |
154 this.set('dataProvider', { |
156 'mapVar': this.get('continentsMapVar'), |
155 'mapVar': this.get('continentsMapVar'), |
157 'areas': this.get('continentsAreas') |
156 'areas': this.get('continentsAreas') |
158 }); |
157 }); |