Documentation[créer] [purger]
local Tools = require('Module:Outils')
local Geo = require("Module:Géoréférencement")
local p = {}

function p.mapy(frame)
	local args = Tools.extractArgs(frame)
	local lat, lon = Geo.setRadCoord(args)
	local desc = args.desc or args.description or 'Visualisation'
	local E, N = Geo.utm(lat, lon, 33.6666667, 0.9993, 'WGS84', 0, 500, -5300)
	local header = '[https://mapy.geoportal.gov.pl/imap_g2/Imgp_2.html?resources=map:wms@http://mapy.geoportal.gov.pl/wss/service/img/guest/TOPO/MapServer/WMSServer&bbox='
	local url_coord = E-5000 .. ',' .. N-2500 .. ',' .. E+5000 .. ',' .. N+2500
	local url = header .. url_coord .. '&SRS=2180 ' .. desc ..'] sur le géoportail polonais.' .. Geo.footer(args['consulté le'])
	local url = Geo.noCoord(args) or url
	return url
end

return p