author | Chloe Laisne <chloe.laisne@gmail.com> |
Sun, 25 Sep 2016 13:45:54 +0200 | |
changeset 289 | 7cae80e5748c |
parent 283 | beebc85e0c6b |
child 291 | 478cdcc56a63 |
permissions | -rw-r--r-- |
46
b9afefcfe964
create carto route to try a query and render the carto compoenent in a specific outlet
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
1 |
import Ember from 'ember'; |
b9afefcfe964
create carto route to try a query and render the carto compoenent in a specific outlet
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
2 |
|
b9afefcfe964
create carto route to try a query and render the carto compoenent in a specific outlet
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
3 |
export default Ember.Route.extend({ |
274
53a6985443f8
geostats endpoint + mapvar
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
4 |
|
281
618aec1734d5
Set step colors with geoname counts
Chloe Laisne <chloe.laisne@gmail.com>
parents:
278
diff
changeset
|
5 |
locationQueryParam: 'world', |
278
f2c2c80a49f7
Disable click on map areas w/o geoname + development/production disabled color + geostat endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents:
274
diff
changeset
|
6 |
|
281
618aec1734d5
Set step colors with geoname counts
Chloe Laisne <chloe.laisne@gmail.com>
parents:
278
diff
changeset
|
7 |
model: function() { |
618aec1734d5
Set step colors with geoname counts
Chloe Laisne <chloe.laisne@gmail.com>
parents:
278
diff
changeset
|
8 |
return this.store.query('geostat', { |
283
beebc85e0c6b
Change query parameters : areas to area + details = 1
Chloe Laisne <chloe.laisne@gmail.com>
parents:
281
diff
changeset
|
9 |
'area': this.get('locationQueryParam'), |
beebc85e0c6b
Change query parameters : areas to area + details = 1
Chloe Laisne <chloe.laisne@gmail.com>
parents:
281
diff
changeset
|
10 |
'details': 1 |
278
f2c2c80a49f7
Disable click on map areas w/o geoname + development/production disabled color + geostat endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents:
274
diff
changeset
|
11 |
}); |
281
618aec1734d5
Set step colors with geoname counts
Chloe Laisne <chloe.laisne@gmail.com>
parents:
278
diff
changeset
|
12 |
}, |
278
f2c2c80a49f7
Disable click on map areas w/o geoname + development/production disabled color + geostat endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents:
274
diff
changeset
|
13 |
|
f2c2c80a49f7
Disable click on map areas w/o geoname + development/production disabled color + geostat endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents:
274
diff
changeset
|
14 |
actions: { |
281
618aec1734d5
Set step colors with geoname counts
Chloe Laisne <chloe.laisne@gmail.com>
parents:
278
diff
changeset
|
15 |
setlocationQueryParam: function(id) { |
618aec1734d5
Set step colors with geoname counts
Chloe Laisne <chloe.laisne@gmail.com>
parents:
278
diff
changeset
|
16 |
this.set('locationQueryParam', id); |
618aec1734d5
Set step colors with geoname counts
Chloe Laisne <chloe.laisne@gmail.com>
parents:
278
diff
changeset
|
17 |
this.refresh(); |
618aec1734d5
Set step colors with geoname counts
Chloe Laisne <chloe.laisne@gmail.com>
parents:
278
diff
changeset
|
18 |
|
278
f2c2c80a49f7
Disable click on map areas w/o geoname + development/production disabled color + geostat endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents:
274
diff
changeset
|
19 |
} |
274
53a6985443f8
geostats endpoint + mapvar
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
20 |
} |
53a6985443f8
geostats endpoint + mapvar
Chloe Laisne <chloe.laisne@gmail.com>
parents:
204
diff
changeset
|
21 |
|
46
b9afefcfe964
create carto route to try a query and render the carto compoenent in a specific outlet
nowmad@nowmads-macbook-pro.local
parents:
diff
changeset
|
22 |
}); |