Skip to content

Label Objects

Kai Kresek edited this page Mar 26, 2021 · 16 revisions

Label Objects

The label objects specify the name of the layer or group layer. The label object is configured as a list of labels, and a value (the label) is specified for each property (the language). The property is specified using the two letter language ISO codes. Currently, the following languages are supported by the mapbuilder application.

  1. English (en)
  2. French (fr)
  3. Spanish (es)
  4. Portuguese (pt)
  5. Indonesian (id)
  6. Chinese (zh)
  7. Georgian (ka)
  8. Armenian (hy)
  9. Azerbaijani (az)
  10. Dutch (nl)

Sample code for label objects:

"label": {
	"en": "Land Cover Dynamics",
	"fr": "Evolution de la couverture des sols",
	"es": "Dinámica de la cobertura terrestre",
	"pt": "Dinâmica da Cobertura da Terra",
	"id": "Dinamika Tutupan Lahan",
	"zh":  "土地覆蓋動態"
	"ka": "მიწის საფარის დინამიკა"	
	}

Sample code for label objects for group layers:


"GROUP_LCD": {
"order": 1,
"label": {
	"en": "Land Cover Dynamics",
	"fr": "Evolution de la couverture des sols",
	"es": "Dinámica de la cobertura terrestre",
	"pt": "Dinâmica da Cobertura da Terra",
	"id": "Dinamika Tutupan Lahan",
	"zh":  "土地覆蓋動態"
	"ka": "მიწის საფარის დინამიკა"	
	},
"Layers":[...]
}

Sublabels

For layers, application users have the option to configure a sublabel in addition to a label. The sub-label will appear in smaller grey text under the label. The syntax for the sublabels is the same as a label except that the sublabel is used at the value instead of label.

Example json code for a label and sub-label for a layer.

"label": {
	"en": "Tree cover gain",
	"fr": "Gain en couvert arboré",
	"es": "Aumento de la cobertura arbórea",
	"pt": "Ganho de cobertura arbórea",
	"id": "Tree cover gain",
	"zh": "森林覆盖增加",
	"ka": "ხის ვარჯის ნამატი"
	},
"sublabel": {
	"en": "(12 years, 30m, global, Hansen/UMD/Google/USGS/NASA)",
	"fr": "(12 ans, 30m, global, Hansen/UMD/Google/USGS/NASA)",
	"es": "(12 años, 30m, global, Hansen/UMD/Google/USGS/NASA)",
	"pt": "(12 anos, 30m, global, Hansen/UMD/Google/USGS/NASA)",
	"id": "(12 years, 30m, global, Hansen/UMD/Google/USGS/NASA)",
	"zh": "(12 年, 30米, 全球覆盖, 汉森/马里兰大学/谷歌/美国地质测量局(USGS)/美国宇航局(NASA))",
	"ka": "(12 წელიწადი, 30მ, გლობალური, Hansen/UMD/Google/USGS/NASA)"
	}