Module:OSM and Module:OSM/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
Add possibility to run query independent of wikidata Q-number |
More simplification |
||
Line 32: | Line 32: | ||
itemID = "" |
itemID = "" |
||
itemObject = nil |
itemObject = nil |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
else |
else |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
else |
|||
⚫ | |||
⚫ | |||
⚫ | |||
end |
|||
⚫ | |||
⚫ | |||
end |
end |
||
⚫ | |||
⚫ | |||
end |
end |
||
-- Always perform a regular expression based search |
-- Always perform a regular expression based search |
||
-- The data may contain multiple values |
-- The data may contain multiple values |
||
if frame.args.overpass == nil then |
if frame.args.overpass == nil then |
||
itemID = '"~"(^|;)(' .. itemID:gsub(";", " |
itemID = '"~"(^|;)(' .. itemID:gsub(";", "%|") .. ')(;|$)' |
||
leftbracket = '["' |
leftbracket = '["' |
||
rightbracket = '"]' |
rightbracket = '"]' |
||
Line 66: | Line 64: | ||
query = '' |
query = '' |
||
end |
end |
||
if args.coord and |
if args.coord and (args.limitToBBOX ~= 'no') then |
||
-- The user can provide coordinates and a zoom factor |
-- The user can provide coordinates and a zoom factor |
||
coord = '&C=' .. args.coord |
coord = '&C=' .. args.coord |