# Map Counts

# Description

This component displays a map of all actions counted per country.

# Install

# Widget

TIP

This component's options can be passed as an attribute on the script tag. See options details

# Vuejs

To install as vuejs component.

<template>
  <AAMapCounts  ></AAMapCounts>
</template>

<script>
import AAMapCounts from '@action-agenda/map-counts'


export default { name      : 'App',
                 components: { AAMapCounts } 
               }
</script>

1
2
3
4
5
6
7
8
9
10
11
12
13

# Properties

    options: { type: Object, default: () => ({}) }

# options

const options          = await getDefaultOptions()
const counts           = await getCounts()
const initEu           = false
const countryParamName = 'filter'
const initAnimation    = false

options.basePath          = '/action-agenda/contributions'
options.config            = await MapBaseConfig.default()
options.config.projection = 'NaturalEarth1'

options.controls.projection = false

const locale = scbdCMSLocale() || getUnLocale()
const modal  = true

return { ...options, initEu, countryParamName, counts, initAnimation, locale, modal }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# I18n (translations)

 export default {
   "en": {
     "country": "country",
     "commitment": "commitment | commitments",
     "madeBy": "made by",
     "actor": "actor | actors",
     "view": "view"
   },
   "ar": {
     "country": "بلد",
     "commitment": "التزام | إلتزامات",
     "madeBy": "مصنوع بواسطة",
     "actor": "ممثل | ممثلين",
     "view": "منظر"
   },
   "es": {
     "country": "país",
     "commitment": "compromiso | compromisos",
     "madeBy": "hecho por",
     "actor": "actor | actores",
     "view": "vista"
   },
   "fr": {
     "country": "pays",
     "commitment": "engagement | engagements",
     "madeBy": "faite par",
     "actor": "acteur | acteurs",
     "view": "vue"
   },
   "ru": {
     "country": "страна",
     "commitment": "обязательство | обязательства",
     "madeBy": "сделано в",
     "actor": "актер | актеры",
     "view": "Посмотреть"
   },
   "zh": {
     "country": "国家",
     "commitment": "承诺 |承诺",
     "madeBy": "由制成",
     "actor": "演员 |演员",
     "view": "看法"
   }
 }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

# Example