Module:Infobox/Point chaud
Apparence
[voir] [modifier] [historique] [purger]
Cette page définit un module d'infobox. Pour les conseils sur l'usage de ce module, voyez Modèle:Infobox Point chaud.
La documentation de ce module est générée par le modèle {{Documentation module}}.
Elle est incluse depuis la page Modèle:Documentation module d'infobox. Veuillez placer les catégories sur cette page-là.
Les éditeurs peuvent travailler dans le bac à sable (créer).
Voir les statistiques d'appel depuis le wikicode sur l'outil wstat et les appels depuis d'autres modules.
local localdata = require "Module:Infobox/Localdata"
local geolocalisation = require "Module:Infobox/Fonctions/Géolocalisation"
local general = require "Module:Infobox/Fonctions"
local wikidata = require "Module:Wikidata"
local globe = require "Module:Wikidata/Globes"
local function globe()
if localdata.globe then
return localdata.globe
end
local p376 = wd.formatStatements{property = 'P376', entity = localdata.item, displayformat = "raw"}
if p376 then
return wdGlobe[ "http://www.wikidata.org/entity/" .. p376 ]
end
end
local function getMapPoint() -- type de point sur la carte
local bodytype = localdata['type'] or wd.formatStatements{property = 'P31', entity = localdata.item, displayformat = "raw", numval = 1}
local points = {
-- par paramètre local |type =
["[[lacus]]"] = "lac",
-- id wikidata
Q3215913 = "lac",
}
return points[mw.ustring.lower(bodytype or '')] or 'default'
end
return {
maincolor = "B00000",
parts = {
general.title( "map"),
general.mainimage('Article à illustrer Point chaud'),
{type = 'table', rows = {
{type = 'row', label = "Nom", plurallabel = "Noms", value = "nom", property = 'P2561'},
{type = 'row', label = "Type", value = "type", property = 'P31', excludevalues = 'Q40080'},
}},
{type = 'table', title = "Carte", rows = {
geolocalisation.locationmap(),
{type = 'row', label = "Numéro", value = "ordre dans la série", property = 'P1545'},
}},
{type = 'table', title = "Localisation", rows = {
{type = 'row', label = "Plaque", plurallabel = "Plaques", value = "plaque", property = 'P4688'},
geolocalisation.coordinates(),
}},
-- general.geoloc({pointtype = 'volcan', maptype = 'relief', marker = 'triangle', default_zoom = 6, markercolor = '#778BA5'}),
geolocalisation.geoloc{ pointtype = getMapPoint(), globe = globe() },
}
}