Diferencia entre revisiones de «Módulo:Wikidata»
Sin resumen de edición |
Sin resumen de edición |
||
| Línea 40: | Línea 40: | ||
function formatStatements( options ) | function formatStatements( options ) | ||
if options.property == 'latitud' or options.property == 'longitud' then | if options.property == 'latitud' or options.property == 'longitud' or options.property == 'altitude' then | ||
propiedad = 'p625' | propiedad = 'p625' | ||
else | else | ||
| Línea 62: | Línea 62: | ||
local propiedad = {} | local propiedad = {} | ||
if options.property == 'latitud' or options.property == 'longitud' then | if options.property == 'latitud' or options.property == 'longitud' or options.property == 'altitude' then | ||
propiedad = 'p625' | propiedad = 'p625' | ||
else | else | ||
| Línea 116: | Línea 116: | ||
elseif options.property == 'longitud' then | elseif options.property == 'longitud' then | ||
return datavalue.value['longitude'] | return datavalue.value['longitude'] | ||
elseif options.property == 'altitud' then | |||
return datavalue.value['altitude'] | |||
elseif datavalue.type == 'wikibase-entityid' then | elseif datavalue.type == 'wikibase-entityid' then | ||