לדלג לתוכן

יחידה:Layers

מתוך ויקימסע

ניתן ליצור תיעוד על היחידה הזאת בדף יחידה:Layers/תיעוד

local p = {}
local getArgs = require('Module:Arguments').getArgs

function p.Filter(frame)
	local args = getArgs(frame)
	local layers = args[1] or ''
	local filteredLayers = extract(layers,'W')
	if filteredLayers == '' then
		filteredLayers = 'W' -- currently there are only two acceptable base layer. 'W' will be set if 'M' is not specified
	end
	-- Add additional & acceptable layer parameters
	filteredLayers = filteredLayers
		.. extract(layers,'S') -- hill shading from WM server
		.. extract(layers,'D') -- destination from Wikivoyage
		.. extract(layers,'G') -- GPX file from Wikivoyage
		.. extract(layers,'P') -- POI from Wikivoyage
		.. extract(layers,'E') -- add search box inside the map
	return filteredLayers
end

function extract(layers, layer)
	if string.match(layers, layer) ~= nil then
		return string.match(layers, layer)
	else
		return ''
	end
end

return p
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy