author | Chloe Laisne <chloe.laisne@gmail.com> |
Mon, 29 Aug 2016 20:01:13 +0200 | |
changeset 273 | a719b2dcea34 |
parent 204 | dd969e178944 |
child 274 | 53a6985443f8 |
permissions | -rw-r--r-- |
34
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
1 |
import Ember from 'ember'; |
123
4c97e9da1416
Remove use of global variables + remove ember-cli-content-security-policy from package.json to avoid bogus csp violation warnings
ymh <ymh.work@gmail.com>
parents:
95
diff
changeset
|
2 |
import AmCharts from 'ammaps'; |
34
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
3 |
|
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
4 |
export default Ember.Component.extend({ |
197 | 5 |
|
273
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
6 |
filter: Ember.inject.service(), |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
7 |
locationObserver: Ember.observer('filter.location', function() { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
8 |
if(!this.get('filter').get('location')) { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
9 |
this.get('map').selectObject(); |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
10 |
} |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
11 |
}), |
200
a441c40f9c5e
Fix playlist filtering
Chloe Laisne <chloe.laisne@gmail.com>
parents:
197
diff
changeset
|
12 |
|
273
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
13 |
didInsertElement: function(){ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
14 |
this.$('#mapdiv').height(Ember.$('.corpus-app-container').height()); |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
15 |
this.createAmMap(); |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
16 |
}, |
34
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
17 |
|
273
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
18 |
createAmMap: function() { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
19 |
this.set('map', AmCharts.makeChart('mapdiv', { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
20 |
'type': 'map', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
21 |
'fontFamily': 'sans-serif', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
22 |
'fontSize': '12px', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
23 |
'dragMap': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
24 |
'zoomOnDoubleClick': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
25 |
'language': 'fr', |
34
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
26 |
|
273
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
27 |
'areasSettings': { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
28 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
29 |
'selectable': true, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
30 |
'color': '#becfd4', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
31 |
'colorOutline': '#253946', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
32 |
'selectedColor': '#253946', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
33 |
'rollOverOutlineColor': '#253946' |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
34 |
}, |
34
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
35 |
|
273
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
36 |
'zoomControl': { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
37 |
'zoomControlEnabled': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
38 |
}, |
34
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
39 |
|
273
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
40 |
'dataProvider': { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
41 |
'map': 'continentsLow', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
42 |
'areas': [{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
43 |
'id':'south_america', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
44 |
'linkToObject': { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
45 |
'map': 'worldLow', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
46 |
'getAreasFromMap': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
47 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
48 |
'passZoomValuesToTarget': true, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
49 |
'autoZoom': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
50 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
51 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
52 |
'id':'north_america', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
53 |
'linkToObject': { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
54 |
'map': 'worldLow', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
55 |
'getAreasFromMap': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
56 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
57 |
'passZoomValuesToTarget': true, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
58 |
'autoZoom': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
59 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
60 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
61 |
'id':'asia', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
62 |
'linkToObject': { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
63 |
'map': 'worldLow', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
64 |
'getAreasFromMap': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
65 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
66 |
'passZoomValuesToTarget': true, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
67 |
'autoZoom': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
68 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
69 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
70 |
'id':'europe', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
71 |
'linkToObject': { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
72 |
'map': 'worldLow', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
73 |
'getAreasFromMap': true, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
74 |
'areas': [{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
75 |
'id': 'FR', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
76 |
'linkToObject': { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
77 |
'map': 'france2016Low', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
78 |
'getAreasFromMap': true, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
79 |
'areas': [{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
80 |
'id': 'FR-A', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
81 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
82 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
83 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
84 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
85 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
86 |
'id': 'FR-B', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
87 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
88 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
89 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
90 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
91 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
92 |
'id': 'FR-C', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
93 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
94 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
95 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
96 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
97 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
98 |
'id': 'FR-D', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
99 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
100 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
101 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
102 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
103 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
104 |
'id': 'FR-E', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
105 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
106 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
107 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
108 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
109 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
110 |
'id': 'FR-F', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
111 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
112 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
113 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
114 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
115 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
116 |
'id': 'FR-G', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
117 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
118 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
119 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
120 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
121 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
122 |
'id': 'FR-H', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
123 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
124 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
125 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
126 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
127 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
128 |
'id': 'FR-I', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
129 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
130 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
131 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
132 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
133 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
134 |
'id': 'FR-J', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
135 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
136 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
137 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
138 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
139 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
140 |
'id': 'FR-K', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
141 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
142 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
143 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
144 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
145 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
146 |
'id': 'FR-L', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
147 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
148 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
149 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
150 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
151 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
152 |
'id': 'FR-M', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
153 |
'passZoomValuesToTarget': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
154 |
'autoZoom': false, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
155 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
156 |
}] |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
157 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
158 |
'autoZoom': true, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
159 |
'selectable': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
160 |
}] |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
161 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
162 |
'passZoomValuesToTarget': true, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
163 |
'autoZoom': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
164 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
165 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
166 |
'id':'australia', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
167 |
'linkToObject': { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
168 |
'map': 'worldLow', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
169 |
'getAreasFromMap': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
170 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
171 |
'passZoomValuesToTarget': true, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
172 |
'autoZoom': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
173 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
174 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
175 |
'id':'africa', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
176 |
'linkToObject': { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
177 |
'map': 'worldLow', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
178 |
'getAreasFromMap': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
179 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
180 |
'passZoomValuesToTarget': true, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
181 |
'autoZoom': true |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
182 |
}] |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
183 |
}, |
34
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
184 |
|
273
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
185 |
listeners: [{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
186 |
'event':'clickMapObject', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
187 |
'method': Ember.run.bind(this, 'clickMapObject') |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
188 |
}, |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
189 |
{ |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
190 |
'event':'homeButtonClicked', |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
191 |
'method': Ember.run.bind(this, 'homeButtonClicked') |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
192 |
}] |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
193 |
})); |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
194 |
}, |
34
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
195 |
|
273
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
196 |
clickMapObject: function(event) { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
197 |
this.get('filter').set('location', event.mapObject.title); |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
198 |
}, |
34
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
199 |
|
273
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
200 |
homeButtonClicked: function(event) { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
201 |
if(event.chart.dataProvider.map !== 'continentsLow') { |
a719b2dcea34
Cartography on 3 levels (continents/countries/france) and backToContinents button
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
202 |
this.createAmMap(); |
34
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
203 |
} |
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
204 |
} |
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
205 |
|
78a7be2ea5db
create dumb template to wrap the map component visu-carto
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
206 |
}); |