Skip to content

Commit 64425b7

Browse files
authored
Merge pull request #37 from ciatph/zone-selection
preload all tilesets
2 parents f8ab5d9 + abebaa1 commit 64425b7

10 files changed

Lines changed: 722 additions & 512 deletions

File tree

src/components/mixins/utils.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default {
2+
methods: {
3+
isInternetExplorer () {
4+
if (navigator !== undefined && navigator.userAgent !== undefined) {
5+
let uaString = navigator.userAgent
6+
const match = /\b(MSIE |Trident.*?rv:|Edge\/)(\d+)/.exec(uaString)
7+
return match
8+
}
9+
}
10+
}
11+
}

src/components/subpages/maps/Crva.vue

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<template lang="pug">
22
div
33
// map GUI
4-
crva-map()
4+
notification-internet-explorer(v-if="isIE")
5+
crva-map(v-else)
56
// Content - CRVA maps overview
67
b-container#crvamaps(fluid class="container-fluid-custom text-center content-area-text")
78
b-row
@@ -105,11 +106,26 @@
105106

106107
<script>
107108
import CrvaMap from '@/components/widgets/CrvaMap'
109+
import NotificationInternetExplorer from '@/components/templates/NotificationInternetExplorer'
110+
import utils from '@/components/mixins/utils'
108111
109112
export default {
110113
name: 'Maps',
114+
mixins: [utils],
115+
111116
components: {
112-
CrvaMap
117+
CrvaMap,
118+
NotificationInternetExplorer
119+
},
120+
121+
data () {
122+
return {
123+
isIE: false
124+
}
125+
},
126+
127+
mounted () {
128+
this.isIE = this.isInternetExplorer()
113129
}
114130
}
115131
</script>
Lines changed: 21 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,41 @@
11
<template lang="pug">
22
div
33
// map GUI
4-
livelihood-zones-map()
4+
notification-internet-explorer(v-if="isIE")
5+
livelihood-zones-map(v-else)
6+
57
// Content - CRVA maps overview
68
b-container#crvamaps(fluid class="container-fluid-custom text-center content-area-text")
79
b-row
810
b-col(sm="3")
911
b-col(sm="6" class="content-area-text")
10-
h2 CRVA Maps Overview
11-
p(class="wp-content") Climate change and variability continue to exert increasing pressure upon the agricultural sector of the Philippines. Therefore it is vital to identify and prioritise at a high, municipal-level resolution and relevant crops that are most vulnerable to climate risk. Under the umbrella of the Department of Agriculture project the "Adaptation and Mitigation Initiative in Agriculture" (AMIA), a climate risk vulnerability assessment (CRVA) for 10 selected provinces in the Philippines. The figure below shows the framework used for CRVA and the operational definition of the three key components for the agricultural sector:
12-
br
13-
br
14-
img(src="@/assets/maps/crva-framework.png" width="100%")
15-
b-col(sm="3")
16-
// Content - Hazard Index
17-
b-container#hazard(fluid class="container-fluid-custom text-center content-area-text bg-greylight")
18-
b-row(class="content-text")
19-
b-col(sm="3")
20-
b-col(sm="6" class="content-area-text")
21-
h2 Hazard Index
22-
p(class="wp-content") A combination of climate-related natural hazard dataset has been used to estimate by which different municipalities are under pressure from climate variability and extremes. The development of an exposure index relies on spatially-weighted combination of different historical climate-related natural hazards in the Philippines that are open-sourced data or developed by partner institutions, such as the Department of Agriculture (DA). Eight (8) hazards were identified for the Philippines, and these are typhoon, flood, drought, erosion, landslide, storm surge, saltwater intrusion, and sea level rise. Figure below shows the degree each municipalities in target are exposed to hazards provinces. Higher index means that hazards have both 1) multiple geographical overlap and 2) wider geographic coverage.
23-
br
24-
br
25-
img(src="@/assets/maps/hazard-index-lowres.png" width="100%")
26-
div(class="download-link")
27-
span(class="glyphicon glyphicon-download glyph-black")
28-
a(href="https://firebasestorage.googleapis.com/v0/b/ciat-pdfstorage.appspot.com/o/crva%2Fmaps%2Fhi-res%2FHazard%20Index.png?alt=media&token=9fbd7b4a-24c2-4643-8e82-844be860633c" target="blank") [download high-resolution image]
29-
b-col(sm="3")
30-
// Content - Adaptive Capacity
31-
b-container#hazard(fluid class="container-fluid-custom text-center content-area-text")
32-
b-row(class="content-text")
33-
b-col(sm="3")
34-
b-col(sm="6" class="content-area-text")
35-
h2 Adaptive Capacity
36-
p(class="wp-content") Adaptive capacity forms one of the three pillars of the vulnerability assessment in addition to exposure and sensitivity to climate change. At the same time it is also one of the three components when measuring resilience, in addition to absorptive coping capacity and transformative capacity. Both are integrated concepts in a coupled human-environment system (Lei et al. 2014).
37-
br
38-
br
39-
img(src="@/assets/maps/adaptive-capacity-lowres.png" width="100%")
40-
div(class="download-link")
41-
a(href="https://firebasestorage.googleapis.com/v0/b/ciat-pdfstorage.appspot.com/o/crva%2Fmaps%2Fhi-res%2FAdaptive%20Capacity.png?alt=media&token=7766e5f7-f53a-4cb0-9e25-c6b0f980f514" target="blank") [download high-resolution image]
42-
b-col(sm="3")
43-
// Content - Vulnerability
44-
b-container#vulnerability(fluid class="container-fluid-custom text-center content-area-text bg-greylight")
45-
b-row(class="content-text")
46-
b-col(sm="3")
47-
b-col(sm="6" class="content-area-text")
48-
h2 Vulnerability
49-
p(class="wp-content") The final climate risk vulnerability map for the year 2050 is an integration of the exposure, sensitivity and adaptive capacity components. The weighting of each of these indicators was discussed during expert workshops and resulted in 15% for exposure, 15% for sensitivity and 70% for adaptive.
50-
br
51-
br
52-
img(src="@/assets/maps/vulnerability-lowres.png" width="100%")
53-
div(class="download-link")
54-
a(href="https://firebasestorage.googleapis.com/v0/b/ciat-pdfstorage.appspot.com/o/crva%2Fmaps%2Fhi-res%2FVulnerability.png?alt=media&token=49d32483-21ad-433f-a56f-196d784e9d58" target="_blank") [download high-resolution image]
55-
b-col(sm="3")
56-
// Content - Sensitivity (4 crops maps)
57-
b-container#vulnerability(fluid class="container-fluid-custom text-center content-area-text")
58-
b-row(class="content-text")
59-
b-col(sm="3")
60-
b-col(sm="6" class="content-area-text")
61-
h2 Sensitivity Index
62-
p(class="wp-content") The crop sensitivity was assessed by changes in climatic suitability to grow crops by the year 2050 in comparison with the baseline crop suitability. The sensitivity (changes in climatic suitability) of crops to climate change was derived from changes in temperature and precipitation using the ensemble of 33 GCM models. For baseline condition, the climate data was acquired from www.worldclim.org. The Maximum entropy (Maxent) model to perform crop suitability analysis. Twenty (20) Bioclimatic variables (http://www.worldclim.org/bioclim + Number of consecutive dry days) was used to assess crop suitability in baseline vs future conditions. The modeled crops includes Rice, Maize/Corn, Vegetables (Squash, Eggplant, Tomato), and Integrated Farming (Cacao, Coffee, Mango Banana). Higher losses of crop suitability are projected to occur in low-lying areas (0-500m ASL) in the Philippines. However, there are also opportunity areas, especially in Mindanao areas, that are projected to become more beneficial for some commodities.
63-
b-col(sm="3")
64-
// Images
65-
b-row(class="text-center")
66-
b-col(sm="3")
67-
// Integrated Farming
68-
b-col(sm="3")
69-
div(class="thumbnail-maps")
70-
img(src="@/assets/maps/if-trees-sens2050-v2-lowres.png" alt="CRVA factsheet")
71-
p
72-
strong Integrated Farming
73-
p
74-
a(href="https://firebasestorage.googleapis.com/v0/b/ciat-pdfstorage.appspot.com/o/crva%2Fmaps%2Fhi-res%2FIF_Trees_sens2050_v2.png?alt=media&token=4b77f020-5603-41ea-97fd-5aceca4cd1ba" target="_blank" class="download-link") [download high-resolution image]
75-
// Rice
76-
b-col(sm="3")
77-
div(class="thumbnail-maps")
78-
img(src="@/assets/maps/rice-sens2050-v2-lowres.png" alt="Rice")
79-
p
80-
strong Rice
81-
p
82-
a(href="https://firebasestorage.googleapis.com/v0/b/ciat-pdfstorage.appspot.com/o/crva%2Fmaps%2Fhi-res%2FRice_sens2050_v2.png?alt=media&token=8e3c07ee-eea9-4057-aca1-81f7656151f4" target="_blank" class="download-link") [download high-resolution image]
83-
b-col(sm="3")
84-
// Images (maize, vegetables)
85-
b-row(class="text-center")
86-
b-col(sm="3")
87-
// Maize
88-
b-col(sm="3")
89-
div(class="thumbnail-maps")
90-
img(src="@/assets/maps/maize-sens2050-v2-lowres.png" alt="Maize")
91-
p
92-
strong Maize
93-
p
94-
a(href="https://firebasestorage.googleapis.com/v0/b/ciat-pdfstorage.appspot.com/o/crva%2Fmaps%2Fhi-res%2FMaize_sens2050_v2.png?alt=media&token=91774af7-316b-40ad-9681-eb93f77ddeb9" target="_blank" class="download-link") [download high-resolution image]
95-
// Vegetables
96-
b-col(sm="3")
97-
div(class="thumbnail-maps")
98-
img(src="@/assets/maps/vegetables-sens2050-v2-lowres.png" alt="Vegetables")
99-
p
100-
strong Rice
101-
p
102-
a(href="https://firebasestorage.googleapis.com/v0/b/ciat-pdfstorage.appspot.com/o/crva%2Fmaps%2Fhi-res%2FRice_sens2050_v2.png?alt=media&token=8e3c07ee-eea9-4057-aca1-81f7656151f4" target="_blank" class="download-link") [download high-resolution image]
12+
h2 Livelihood Zones Web Map
10313
b-col(sm="3")
10414
</template>
10515

10616
<script>
10717
import LivelihoodZonesMap from '@/components/widgets/LivelihoodZonesMap'
18+
import NotificationInternetExplorer from '@/components/templates/NotificationInternetExplorer'
19+
import utils from '@/components/mixins/utils'
10820
10921
export default {
11022
name: 'LivelihoodZones',
23+
24+
data () {
25+
return {
26+
isIE: false
27+
}
28+
},
29+
11130
components: {
112-
LivelihoodZonesMap
31+
LivelihoodZonesMap,
32+
NotificationInternetExplorer
33+
},
34+
35+
mixins: [utils],
36+
37+
mounted () {
38+
this.isIE = this.isInternetExplorer()
11339
}
11440
}
11541
</script>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<template lang="pug">
2+
div
3+
div(class="ie-notification") "We have detected that you are using Internet Explorer. Please consider using other web browsers such as Chrome, Firefox or Safari for a better viewing experience."
4+
</template>
5+
6+
<script>
7+
export default {
8+
name: 'NotificationInternetExplorer'
9+
}
10+
</script>

src/components/templates/ThumbnailsGallery.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
v-for="item, index in thumbnailData")
99
div(class="card h-100 thumbnail")
1010
img(v-lazy="require(`@/assets/thumbnails/${item.img}`)"
11-
class="card-img-top" alt="Image")
11+
class="card-img-top" style="min-height: 100px;" alt="Image")
1212
div(class="card-body")
1313
h4(class="card-title") {{ item.title }}
1414
p(class="card-text") {{ item.description }}

0 commit comments

Comments
 (0)