વિભાગ:Coordinates: આવૃત્તિઓ વચ્ચેનો તફાવત

Content deleted Content added
correction to GeoHack link (remove +s)
add wikidata parameter
લીટી ૪૫૭:
end
args.attributes = coordinates.alterAttributes(args.attributes or '', args.mode)
frame.args = args
-- check for errors and add Geo (microformat) code for machine readability.
local lat = tonumber(args.lat)
local lon = tonumber(args.lon)
if args.wikidata and (not lat or not lon) then
-- if lat/lon is not provided but we are given wikidata q-code than look up the coordinates
local data = require('Module:Wikidata')
local args2 = {}
args2.property='P625'
args2.item=args.wikidata
args2.numval = 1
args2.link = '-'
args2.displayformat='latitude'
lat = data.formatStatements(args2)
args2.displayformat='longitude'
lon = data.formatStatements(args2)
end
if lon then -- get longitude to be in -180 to 180 range
lon=lon%360
Line ૪૬૮ ⟶ ૪૮૦:
end
end
args.lat = string.format('%010.6f', lat)
args.lon = string.format('%011.6f', lon)
frame.args = args
local Categories, geoMicroFormat, coorTag = '', '', ''