Ir al contenido

Módulo:Marker utilities/Groups

De Wikiviajes, la guía libre de viajes
Icono de documentación de módulo Documentación del módulo[ver] [editar] [historial] [purgar]

Uso

This module supplies a table with the properties of the {{Marker}}/{{vCard}} groups like color, translation and the adapted translation without special characters for the use on Kartographer maps.

Version check

Designación de la versión en Wikidata: 2024-07-08 Ok!

Meaning of the sub-keys

  • color: hexadecimal color value including # sign,
  • alias: alias for keys like mask, do, see, etc. for internationalization,
  • is: type of data set: system only for internal use, color represents a color instead of a logical key name. Don’t change this sub-key.
  • label: group name for the vCard/listing editor and the Kartographer-map layers tool. If label is missing alias or the key values are used,
  • withEvents: marks groups where events belong to

Don’t change the names of the keys like mask, do, see, etc.

Enter the map, label or alias name to the showAll parameter in this and Mapshape utilities/i18n modules, namely the value of the first sub-key used in that succession.

Group overview

Mapa
Map of group colors

White numbers

1 error 1 area 1 buy 1 do 1 drink 1 eat 1 go 1 health 1 nature 1 other 1 populated 1 see 1 sleep 1 view 1 purple 1 red

Black numbers

1 religion 1 cosmos 1 gold 1 lime 1 mediumaquamarine 1 orange 1 plum 1 silver

In Module:Marker utilities, the background color value for the type error (magenta, #FF00FF) serves as the relative luminance threshold (0.2848) which is greater than the value of about 0.211 as proposed by Github user Makizushi. But the color estimation at the Wikimedia’s map server seems to be different from that of Makizushi.

References

  • Relative luminance, Web Content Accessibility Guidelines (WCAG) 2.0, W3.org. The minimum contrast ratio ( (L-lighter + 0.05) / (L-darker + 0.05) ) should be at least 4.5:1
  • Makizushi’s code for markers. It seems that the relative luminance threshold of about 0.211 differs from that of Kartotherian’s definition. The pushpin’s text color is estimated at the Wikimedia’s map server and not by Makizushi’s script.
  • Kartotherian
Esta documentación está transcluida desde Módulo:Marker utilities/Groups/doc.
Los editores pueden experimentar en la zona de pruebas (crear) y en los casos de prueba (crear) del módulo.
Por favor, añade las categorías en la subpágina de documentación. Subpáginas de este módulo.

--[[
	Returning an array with group properties.
	Please use only quotation marks instead of apostrophs for JSON export.
	Please do not specify empty strings: let the parameter undefined.

	Dependencies:
	- MediaWiki:ListingInfo.js, makiIcons array
--]]

return {
	-- administration
	moduleInterface = {
		suite  = "Marker utilities",
		sub    = "groups",
		serial = "2024-07-08",
		item   = 65445315
	},

	-- Default mapframe/maplink show parameter
	-- also to set in MediaWiki:MapTools.js: defaultShow
	showAll = "máscara,sendero,área,beber,comer,comprar,dormir,error," ..
		"habitadas,hacer,ir,naturaleza,otro,religión,salud,ver,vista," .. 
		"aguamarina,ciruela,cosmos,oro,lima,naranja,violeta,plata,rojo",

	groups = {
		["error"]   = { color = "#FF00FF", is = "system", alias = { "error", "magenta" } },
		mask        = { color = "#FF00FF", is = "system", alias = "máscara" },
		track       = { color = "#FF00FF", is = "system", alias = "sendero" },

		area        = { color = "#800000", label = "área", alias = { "área", "granate", "maroon" }, default = "region" },
		buy         = { color = "#008080", label = "comprar", alias = { "comprar", "verde_azulado", "teal" }, default = "shop" },
		["do"]      = { color = "#808080", label = "hacer", alias = { "hacer", "gris", "grey" }, default = "sports", withEvents = "1" },
		drink       = { color = "#000000", label = "beber", alias = { "beber", "negro", "black" }, default = "bar" },
		eat         = { color = "#D2691E", label = "comer", alias = { "comer", "chocolate" }, default = "restaurant" },
		go          = { color = "#A52A2A", label = "ir", alias = { "ir", "marrón", "brown" }, default = "station" },
		health      = { color = "#DC143C", label = "salud", alias = { "salud", "crimson" }, default = "hospital" },
		nature      = { color = "#228B22", label = "naturaleza", alias = { "naturaleza", "forestgreen" }, default = "landscape" },
		other       = { color = "#808000", label = "otro", alias = { "otro", "verde_bosque", "olive" }, default = "office" },
		populated   = { color = "#0000FF", label = "habitadas", alias = { "habitadas", "azul", "blue" }, default = "town" },
		religion    = { color = "#DAA520", label = "religión", alias = { "religión", "goldenrod" }, default = "church" },
		see         = { color = "#4682B4", label = "ver", alias = { "ver", "azul_acero", "steelblue" }, default = "monument" },
		sleep       = { color = "#000080", label = "dormir", alias = { "dormir", "azul_marino", "navy" }, default = "hotel" },
		view        = { color = "#4169E1", label = "vista", alias = { "vista", "azul_francia", "royalblue" }, default = "viewpoint" },

		-- please do not use colors already used for additional groups listed above

		cosmos      = { color = "#FFCFCF", is = "color", alias = "cosmos", label = "cosmos" }, -- instead of former type target, FFCCCC
		gold        = { color = "#FFD700", is = "color", alias = "oro", label = "oro" },
		lime        = { color = "#BFFF00", is = "color", alias = "lima", label = "lima" },
		mediumaquamarine = { color = "#66CDAA", is = "color", alias = "aguamarina", label = "aguamarina" },
		orange      = { color = "#FFA500", is = "color", alias = "naranja", label = "naranja" },
		plum        = { color = "#DDA0DD", is = "color", alias = "ciruela", label = "ciruela" },
		purple      = { color = "#800080", is = "color", alias = "violeta", label = "violeta" },
		red         = { color = "#FF0000", is = "color", alias = "rojo", label = "rojo" },
		silver      = { color = "#C0C0C0", is = "color", alias = "plata", label = "plata" }
	}
}