Content deleted Content added
use wikidataId param |
generalise "has wikidata property" checking |
||
Line 16:
end
function
if not(item_id) or not(mw.wikibase.isValidEntityId(item_id)) or not(mw.wikibase.entityExists(item_id)) then
return false
end
local
if not
return false
end
Line 27:
end
function getZoom(length_km)
Line 62 ⟶ 52:
-- Require wikidata item with coords, so something will be centred somewhere
local hasCoordinates = hasWikidataProperty(wikidataId, 'P625') -- P625 = coordinate ___location
if not hasCoordinates then
return ''
end
Line 102 ⟶ 93:
-- Point
local hasOsmRelationId = hasWikidataProperty(wikidataId, 'P402') -- P402 is OSM relation ID
if not hasOsmRelationId then
args.type3 = "point"
if config.id then args.id3 = config.id end
|