« Module:Coordinates » : différence entre les versions

Contenu supprimé Contenu ajouté
m modif. cat d'erreur
Mise à jour à partir de Module:Coordinates/Test
Ligne 20 :
notaswikidata = 'Page avec coordonnées différentes sur Wikidata',
nowikidata = 'Page sans coordonnées Wikidata',
throughwikidata = 'Page géolocalisée par Wikidata',
}
 
Ligne 80 :
* B: invalid globe
* C: something wrong with other parameters
* D: more than one primary coord
]]--
 
Ligne 694 ⟶ 695 :
end
-- V final outputgeodata
local geodata = ''
if latitude and longitude then
local latstring, longstring = tostring(latitude), tostring(longitude)
local primary = ''
 
local frame = mw.getCurrentFrame()
local geodataparams = {[1] = latstring, [2] = longstring, [3] = extraparams, ['name'] = objectname}
if displaytitle then
geodataparams[4] = 'primary'
end
geodata = frame:callParserFunction('#coordinates', geodataparams )
if string.find(geodata, 'error') then -- the only error that has not been caught yet is primary key
geodata = ''
makeerror({sortkey='D'})
end
end
-- VI final output
extraparams = extraparams .. '_globe:' .. globe -- pas de problème si le globe est en double
 
Ligne 708 ⟶ 726 :
mainstring = buildHTML(latitude, longitude, dmslatitude, dmslongitude, globe, displayformat, displayinline, displaytitle, objectname,extraparams )
end
return mainstring .. notes .. trackingstring .. geodata .. showerrors()
end
 
Ce document provient de « https://fr.wikipedia.org/wiki/Module:Coordinates ».