<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="he">
	<id>http://www.breslev.wiki/index.php?action=history&amp;feed=atom&amp;title=%D7%99%D7%97%D7%99%D7%93%D7%94%3A%D7%9E%D7%A4%D7%94</id>
	<title>יחידה:מפה - היסטוריית גרסאות</title>
	<link rel="self" type="application/atom+xml" href="http://www.breslev.wiki/index.php?action=history&amp;feed=atom&amp;title=%D7%99%D7%97%D7%99%D7%93%D7%94%3A%D7%9E%D7%A4%D7%94"/>
	<link rel="alternate" type="text/html" href="http://www.breslev.wiki/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:%D7%9E%D7%A4%D7%94&amp;action=history"/>
	<updated>2026-07-24T23:10:10Z</updated>
	<subtitle>היסטוריית הגרסאות של הדף הזה בוויקי</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>http://www.breslev.wiki/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:%D7%9E%D7%A4%D7%94&amp;diff=4189&amp;oldid=prev</id>
		<title>יענק'ל: יצירת דף עם התוכן &quot;-- Credits: -- Original from Wikivoyage -- Developed for Kartographer version on Wikipedia by Vriullop @cawiki -- Formulae: --    CSGNetwork at http://www.csgnet...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.breslev.wiki/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:%D7%9E%D7%A4%D7%94&amp;diff=4189&amp;oldid=prev"/>
		<updated>2019-10-30T19:08:20Z</updated>

		<summary type="html">&lt;p&gt;יצירת דף עם התוכן &amp;quot;-- Credits: -- Original from Wikivoyage -- Developed for Kartographer version on Wikipedia by Vriullop @cawiki -- Formulae: --    CSGNetwork at http://www.csgnet...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;דף חדש&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Credits:&lt;br /&gt;
-- Original from Wikivoyage&lt;br /&gt;
-- Developed for Kartographer version on Wikipedia by Vriullop @cawiki&lt;br /&gt;
-- Formulae:&lt;br /&gt;
--    CSGNetwork at http://www.csgnetwork.com/degreelenllavcalc.html via @enwiki&lt;br /&gt;
--    OpenStreetMap&lt;br /&gt;
-- Version: 20182705&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Localization on [[Module:מפה/i18n]]&lt;br /&gt;
local i18n = {&lt;br /&gt;
	[&amp;quot;coordinate-invalid&amp;quot;] = &amp;quot;Parameter $1 is an invalid value of \&amp;quot;latitude,longitude\&amp;quot;.&amp;quot;,&lt;br /&gt;
	[&amp;quot;type-invalid&amp;quot;] = &amp;quot;Type $1 is invalid. Use mapframe or maplink.&amp;quot;,&lt;br /&gt;
	[&amp;quot;geotype-invalid&amp;quot;] = &amp;quot;Geotype $1 is an invalid value.&amp;quot;,&lt;br /&gt;
	[&amp;quot;ids-invalid&amp;quot;] = &amp;quot;Parameter ids $1 is invalid.&amp;quot;,&lt;br /&gt;
	[&amp;quot;polygon-required-points&amp;quot;] = &amp;quot;A polygon requires a minimum of 4 coordinate points.&amp;quot;,&lt;br /&gt;
	[&amp;quot;polygon-not-closed&amp;quot;] = &amp;quot;A closed polygon requires last point equal to first one.&amp;quot;,&lt;br /&gt;
	['ids-not-found'] = &amp;quot;Ids not found for external data.&amp;quot;,&lt;br /&gt;
	['not-from-content-page'] = &amp;quot;Do not invoke from content page. Use a template or use a module subpage like /sandbox for testing .&amp;quot;,&lt;br /&gt;
	-- local categories, leave empty at /i18n for no categories&lt;br /&gt;
	['cat-several-features'] = &amp;quot;Maps with several objects&amp;quot;,&lt;br /&gt;
	['cat-linestring-drawn'] = &amp;quot;Maps with lines&amp;quot;,&lt;br /&gt;
	['cat-polygon-drawn'] = &amp;quot;Maps with polygons&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local cat = {['cat-several-features'] = false, ['cat-linestring-drawn'] = false, ['cat-polygon-drawn'] = false}&lt;br /&gt;
&lt;br /&gt;
-- Credit to http://stackoverflow.com/a/1283608/2644759, cc-by-sa 3.0&lt;br /&gt;
local function tableMerge(t1, t2)&lt;br /&gt;
	for k, v in pairs(t2) do&lt;br /&gt;
		if type(v) == &amp;quot;table&amp;quot; then&lt;br /&gt;
			if type(t1[k] or false) == &amp;quot;table&amp;quot; then&lt;br /&gt;
				tableMerge(t1[k] or {}, t2[k] or {})&lt;br /&gt;
			else&lt;br /&gt;
				t1[k] = v&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			t1[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return t1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function loadI18n()&lt;br /&gt;
	local exist, res = pcall(require, &amp;quot;Module:מפה/i18n&amp;quot;)&lt;br /&gt;
	if exist and next(res) ~= nil then&lt;br /&gt;
		tableMerge(i18n, res.i18n)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
loadI18n()&lt;br /&gt;
&lt;br /&gt;
local errormessage&lt;br /&gt;
local function printError(key, par)&lt;br /&gt;
	-- just print first error&lt;br /&gt;
	errormessage = errormessage or ('&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;' .. (par and mw.ustring.gsub(i18n[key], &amp;quot;$1&amp;quot;, par) or i18n[key]) .. '&amp;lt;/span&amp;gt;')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Convert coordinates input format to geojson table&lt;br /&gt;
local function parseGeoSequence(data, geotype)&lt;br /&gt;
	local coordsGeo = {}&lt;br /&gt;
	for line_coord in mw.text.gsplit(data, ':', true) do -- Polygon - linearRing:linearRing...&lt;br /&gt;
		local coordsLine = {}&lt;br /&gt;
		for point_coord in mw.text.gsplit(line_coord, ';', true) do -- LineString or MultiPoint - point;point...&lt;br /&gt;
			local valid = false&lt;br /&gt;
			local val = mw.text.split(point_coord, ',', true) -- Point - lat,lon&lt;br /&gt;
			-- allow for elevation&lt;br /&gt;
			if #val &amp;gt;= 2 and #val &amp;lt;= 3 then&lt;br /&gt;
				local lat = tonumber(val[1])&lt;br /&gt;
				local lon = tonumber(val[2])&lt;br /&gt;
				if lat ~= nil and lon ~= nil then&lt;br /&gt;
					table.insert(coordsLine, {lon, lat})&lt;br /&gt;
					valid = true&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if not valid and point_coord ~= '' then printError('coordinate-invalid', point_coord) end&lt;br /&gt;
		end&lt;br /&gt;
		if geotype == 'Polygon' then&lt;br /&gt;
			if #coordsLine &amp;lt; 4 then&lt;br /&gt;
				printError('polygon-required-points')&lt;br /&gt;
			elseif table.concat(coordsLine[1]) ~= table.concat(coordsLine[#coordsLine]) then&lt;br /&gt;
				printError('polygon-not-closed')&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		table.insert(coordsGeo, coordsLine)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if geotype == 'Point' then&lt;br /&gt;
		coordsGeo = coordsGeo[1][1]&lt;br /&gt;
	elseif geotype == &amp;quot;LineString&amp;quot; or geotype == &amp;quot;MultiPoint&amp;quot; then&lt;br /&gt;
		coordsGeo = coordsGeo[1]&lt;br /&gt;
	elseif geotype ~= 'Polygon' then&lt;br /&gt;
		printError('geotype-invalid', geotype)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
    return coordsGeo&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- data Point - {lon,lat}&lt;br /&gt;
-- data LineString - { {lon,lat}, {lon,lat}, ... }&lt;br /&gt;
-- data Polygon - { { {lon,lat}, {lon,lat} }, { {lon,lat}, {lon,lat} }, ... }&lt;br /&gt;
-- output as LineString format&lt;br /&gt;
local function mergePoints(stack, merger)&lt;br /&gt;
	if merger == nil then return stack end&lt;br /&gt;
	for _, val in ipairs(merger) do&lt;br /&gt;
		if type(val) == &amp;quot;number&amp;quot; then -- Point format&lt;br /&gt;
			stack[#stack + 1] = merger&lt;br /&gt;
			break&lt;br /&gt;
		elseif type(val[1]) == &amp;quot;table&amp;quot; then -- Polygon format&lt;br /&gt;
			for _, val2 in ipairs(val) do&lt;br /&gt;
				stack[#stack + 1] = val2&lt;br /&gt;
			end&lt;br /&gt;
		else -- LineString format&lt;br /&gt;
			stack[#stack + 1] = val&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return stack&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getCoordBounds(data)&lt;br /&gt;
	local latN, latS = -90, 90&lt;br /&gt;
	local lonE, lonW = -180, 180&lt;br /&gt;
	for i, val in ipairs(data) do&lt;br /&gt;
		latN = math.max(val[2], latN)&lt;br /&gt;
		latS = math.min(val[2], latS)&lt;br /&gt;
		lonE = math.max(val[1], lonE)&lt;br /&gt;
		lonW = math.min(val[1], lonW)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return latN, latS, lonE, lonW&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getCoordCenter(data)&lt;br /&gt;
	local latN, latS, lonE, lonW = getCoordBounds(data)&lt;br /&gt;
	&lt;br /&gt;
	local latCenter = latS + (latN - latS) / 2&lt;br /&gt;
	local lonCenter = lonW + (lonE - lonW) / 2&lt;br /&gt;
	&lt;br /&gt;
	return lonCenter, latCenter&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- meters per degree by latitude&lt;br /&gt;
local function mxdByLat(lat)&lt;br /&gt;
	local latRad = math.rad(lat)&lt;br /&gt;
	-- see [[Geographic coordinate system#Expressing latitude and longitude as linear units]], by CSGNetwork&lt;br /&gt;
	local mxdLat = 111132.92 - 559.82 * math.cos(2 * latRad) + 1.175 * math.cos(4 * latRad) - 0.023 * math.cos(6 * latRad)&lt;br /&gt;
	local mxdLon = 111412.84 * math.cos(latRad) - 93.5 * math.cos(3 * latRad) + 0.118 * math.cos(5 * latRad)&lt;br /&gt;
	return mxdLat, mxdLon&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Calculate zoom to fit coordinate bounds into height and width of frame&lt;br /&gt;
local function getZoom(data, height, width)&lt;br /&gt;
	local lat1, lat2, lon1, lon2 = getCoordBounds(data)&lt;br /&gt;
	&lt;br /&gt;
	local latMid = (lat1 + lat2) / 2 -- mid latitude&lt;br /&gt;
	local mxdLat, mxdLon = mxdByLat(latMid)&lt;br /&gt;
	-- distances in meters&lt;br /&gt;
	local distLat = math.abs((lat1 - lat2) * mxdLat)&lt;br /&gt;
	local distLon = math.abs((lon1 - lon2) * mxdLon)&lt;br /&gt;
	&lt;br /&gt;
	-- margin 100px in height and width, right upper icon is about 50x50px&lt;br /&gt;
	local validHeight = math.max(height - 100, 100)&lt;br /&gt;
	local validWidth = math.max(width - 100, 100)&lt;br /&gt;
	&lt;br /&gt;
	-- maximum zoom fitting all points&lt;br /&gt;
	local latRad = math.rad(latMid)&lt;br /&gt;
	for zoom = 19, 0, -1 do&lt;br /&gt;
		-- see https://wiki.openstreetmap.org/wiki/Zoom_levels#Metres_per_pixel_math&lt;br /&gt;
		-- equatorial circumference 40 075 036 m: [[Equator#Exact length]]&lt;br /&gt;
		local distLatFrame = 40075036 * validHeight * math.cos(latRad) / (2 ^ (zoom + 8))&lt;br /&gt;
		local distLonFrame = 40075036 * validWidth * math.cos(latRad) / (2 ^ (zoom + 8))&lt;br /&gt;
		if distLatFrame &amp;gt; distLat and distLonFrame &amp;gt; distLon then&lt;br /&gt;
			return zoom&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return 0&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Geotype based on coordinates format pattern&lt;br /&gt;
local function findGeotype(coord)&lt;br /&gt;
	local _, semicolons = string.gsub(coord, ';', '')&lt;br /&gt;
	local firstcoord = string.match(coord, &amp;quot;[0-9%.%-]+%s*,%s*[0-9%.%-]+&amp;quot;)&lt;br /&gt;
	local lastcoord = string.match(string.reverse(coord), &amp;quot;[0-9%.%-]+%s*,%s*[0-9%.%-]+&amp;quot;)&lt;br /&gt;
	if firstcoord == nil or lastcoord == nil then&lt;br /&gt;
		printError('coordinate-invalid', coord)&lt;br /&gt;
	else&lt;br /&gt;
		lastcoord = string.reverse(lastcoord)&lt;br /&gt;
	end&lt;br /&gt;
	if string.find(coord, ':') or (semicolons &amp;gt; 2 and firstcoord == lastcoord) then&lt;br /&gt;
		return 'Polygon'&lt;br /&gt;
	elseif semicolons &amp;gt; 0 then&lt;br /&gt;
		return 'LineString' -- or MultiPoint&lt;br /&gt;
	else&lt;br /&gt;
		return 'Point'&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function fetchWikidata(id, snak)&lt;br /&gt;
	-- snak is a table like {'claims', 'P625', 1, 'mainsnak', 'datavalue', 'value'}&lt;br /&gt;
	-- see function ViewSomething on Module:Wikidata&lt;br /&gt;
	local value&lt;br /&gt;
	id = mw.text.trim(id)&lt;br /&gt;
	if not string.find(id, &amp;quot;^Q%d+$&amp;quot;) then&lt;br /&gt;
		printError('ids-invalid', id)&lt;br /&gt;
	else&lt;br /&gt;
		value = mw.wikibase.getBestStatements(id, snak[2])&lt;br /&gt;
		for i = 3, #snak do&lt;br /&gt;
			if value == nil then break end&lt;br /&gt;
			value = value[snak[i]]&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return value&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Fetch coordinates from Wikidata for a list of comma separated ids&lt;br /&gt;
local function getCoordinatesById(ids)&lt;br /&gt;
	if ids == nil then return end&lt;br /&gt;
	local coord = {}&lt;br /&gt;
	local snak = {'claims', 'P625', 1, 'mainsnak', 'datavalue', 'value'}&lt;br /&gt;
	for idx in mw.text.gsplit(ids, '%s*,%s*') do&lt;br /&gt;
		local value = fetchWikidata(idx, snak)&lt;br /&gt;
		if value then&lt;br /&gt;
			coord[#coord+1] = value.latitude .. ',' .. value.longitude&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return #coord &amp;gt; 0 and table.concat(coord, ';') or nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getBoundsById(ids, coordInput)&lt;br /&gt;
	if ids == nil then return {} end&lt;br /&gt;
	local coord = mw.text.split(coordInput, '%s*;%s*')&lt;br /&gt;
	local id = mw.text.split(ids, '%s*,%s*')&lt;br /&gt;
	if #coord ~= #id then return {} end&lt;br /&gt;
	local bounds = {}&lt;br /&gt;
	-- try to fetch Wikidata in this order: area, watershed area, population&lt;br /&gt;
	local snak_area = {'claims', 'P2046', 1, 'mainsnak', 'datavalue', 'value'} -- area and unit&lt;br /&gt;
	local snak_warea = {'claims', 'P2053', 1, 'mainsnak', 'datavalue', 'value'} -- area and unit&lt;br /&gt;
	local snak_pop = {'claims', 'P1082', 1, 'mainsnak', 'datavalue', 'value'} -- population&lt;br /&gt;
	local convert_area = {['Q712226'] = 1000000, ['Q35852'] = 10000, ['Q232291'] = 2589988.110336, ['Q81292'] = 4046.8564224,&lt;br /&gt;
		['Q935614'] = 1600, ['Q857027'] = 0.09290304, ['Q21074767'] = 1138100, ['Q25343'] = 1} -- to square metres&lt;br /&gt;
		-- query Wikidata: http://tinyurl.com/j8aez2g&lt;br /&gt;
	for i = 1, #id do&lt;br /&gt;
		local amount, unit, area&lt;br /&gt;
		local value = fetchWikidata(id[i], snak_area) or fetchWikidata(id[i], snak_warea)&lt;br /&gt;
		if value then&lt;br /&gt;
			amount = tonumber(value.amount)&lt;br /&gt;
			unit = string.match(value.unit, &amp;quot;(Q%d+)&amp;quot;)&lt;br /&gt;
			if convert_area[unit] then&lt;br /&gt;
				area = amount * convert_area[unit]&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if area == nil then&lt;br /&gt;
			value = fetchWikidata(id[i], snak_pop)&lt;br /&gt;
			if value then&lt;br /&gt;
				amount = tonumber(value.amount)&lt;br /&gt;
				-- average density estimated for populated areas: 100; see [[Population density]]&lt;br /&gt;
				area = amount / 100 * 1000000&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if area then&lt;br /&gt;
			local radius = math.sqrt(area / math.pi) -- approximation with a circle&lt;br /&gt;
			local latlon = mw.text.split(coord[i], '%s*,%s*')&lt;br /&gt;
			local mxdLat, mxdLon = mxdByLat(latlon[1])&lt;br /&gt;
			bounds[#bounds+1] = {latlon[2] + (radius / mxdLon), latlon[1] + (radius / mxdLat)} -- NE bound, geoJSON format&lt;br /&gt;
			bounds[#bounds+1] = {latlon[2] - (radius / mxdLon), latlon[1] - (radius / mxdLat)} -- SW bound&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return bounds&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function addCategories(geotype, i)&lt;br /&gt;
	if not mw.title.getCurrentTitle().isContentPage then return end&lt;br /&gt;
	&lt;br /&gt;
	if i &amp;gt; 2 and i18n[&amp;quot;cat-several-features&amp;quot;] ~= '' then&lt;br /&gt;
		cat[&amp;quot;cat-several-features&amp;quot;] = true&lt;br /&gt;
	end&lt;br /&gt;
	if geotype == &amp;quot;LineString&amp;quot; and i18n[&amp;quot;cat-linestring-drawn&amp;quot;] ~= '' then&lt;br /&gt;
		cat[&amp;quot;cat-linestring-drawn&amp;quot;] = true&lt;br /&gt;
	elseif geotype == &amp;quot;Polygon&amp;quot; and i18n[&amp;quot;cat-polygon-drawn&amp;quot;] ~= '' then&lt;br /&gt;
		cat[&amp;quot;cat-polygon-drawn&amp;quot;] = true&lt;br /&gt;
	end&lt;br /&gt;
	return&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Main function&lt;br /&gt;
function p._tag(args)&lt;br /&gt;
	local tagname = args.type or 'mapframe'&lt;br /&gt;
	if tagname ~= 'maplink' and tagname ~= 'mapframe' then printError('type-invalid', tagname) end&lt;br /&gt;
	&lt;br /&gt;
	local geojson&lt;br /&gt;
	local tagArgs = {&lt;br /&gt;
		text = args['טקסט'],&lt;br /&gt;
		zoom = tonumber(args['זום']),&lt;br /&gt;
		latitude = tonumber(args['רוחב']),&lt;br /&gt;
		longitude = tonumber(args['אורך'])&lt;br /&gt;
	}&lt;br /&gt;
	local defaultzoom = tonumber(args['זום ברירת מחדל'])&lt;br /&gt;
	if tagname == 'mapframe' then&lt;br /&gt;
		tagArgs.width = args['רוחב מפה'] or 250&lt;br /&gt;
		tagArgs.height = args['אורך מפה'] or 250&lt;br /&gt;
		tagArgs.align = args['יישור'] or 'center'&lt;br /&gt;
		if args['ללא מסגרת'] ~= nil and tagArgs.text == nil then tagArgs.frameless = true end&lt;br /&gt;
	else&lt;br /&gt;
		tagArgs.class = args.class&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args['קואורדינטות1'] == nil and args['geotype1'] == nil then -- single feature&lt;br /&gt;
		args['קואורדינטות1'] = args['קואורדינטות'] or args[1]&lt;br /&gt;
		if args['קואורדינטות1'] == nil and args['רוחב'] and args['אורך'] then&lt;br /&gt;
			args['קואורדינטות1'] = args['רוחב'] .. ',' .. args['אורך']&lt;br /&gt;
		elseif args['קואורדינטות1'] == nil then&lt;br /&gt;
			args['קואורדינטות1'] = getCoordinatesById(mw.wikibase.getEntityIdForCurrentPage())&lt;br /&gt;
			if args['קואורדינטות1'] == nil then&lt;br /&gt;
				local headQ = mw.wikibase.getBestStatements( mw.wikibase.getEntityIdForCurrentPage(), 'P159' )&lt;br /&gt;
				if #headQ &amp;gt; 0 and headQ[1] and headQ[1].mainsnak and headQ[1].mainsnak.datavalue then&lt;br /&gt;
					args['קואורדינטות1'] = getCoordinatesById(headQ[1].mainsnak.datavalue.value.id)&lt;br /&gt;
					if not (args['סמל סמן1'] or args['סמל סמן']) then&lt;br /&gt;
						args['סמל סמן1']='building'&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		args['שם1'] = args['שם1'] or args['שם']&lt;br /&gt;
		args['תמונה1'] = args['תמונה1'] or args['תמונה']&lt;br /&gt;
		args['תיאור1'] = args['תיאור1'] or args['תיאור']&lt;br /&gt;
		args['geotype1'] = args['geotype1'] or args['geotype']&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local externalData = {['geoshape'] = true, ['geomask'] = true, ['geoline'] = true}&lt;br /&gt;
	local featureCollection = {['Point'] = true, ['MultiPoint'] = true, ['LineString'] = true, ['Polygon'] = true}&lt;br /&gt;
	local myfeatures, myexternal, allpoints = {}, {}, {}&lt;br /&gt;
	local i, j = 1, 1&lt;br /&gt;
	while args['קואורדינטות'..i] or externalData[args['geotype'..i]] do&lt;br /&gt;
		local geotypex = args['geotype'..i] or args['geotype']&lt;br /&gt;
		if geotypex ~= nil and not (featureCollection[geotypex] or externalData[geotypex]) then&lt;br /&gt;
			printError('geotype-invalid', geotypex)&lt;br /&gt;
			break&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		local mystack&lt;br /&gt;
		if externalData[geotypex or ''] then&lt;br /&gt;
			mystack = myexternal&lt;br /&gt;
			j = #mystack + 1&lt;br /&gt;
			mystack[j] = {}&lt;br /&gt;
			mystack[j]['type'] = &amp;quot;ExternalData&amp;quot;&lt;br /&gt;
			mystack[j]['service'] = geotypex&lt;br /&gt;
			mystack[j]['ids'] = args['פריטים'..i] or args['פריטים'] or mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
			if mystack[j]['ids'] == nil then printError('ids-not-found'); break end&lt;br /&gt;
			local mycoordinates = args['קואורדינטות'..i]&lt;br /&gt;
			if mycoordinates == nil and (tagArgs.latitude == nil or tagArgs.longitude == nil or tagArgs.zoom == nil) then&lt;br /&gt;
				mycoordinates = getCoordinatesById(mystack[j]['ids'])&lt;br /&gt;
			end&lt;br /&gt;
			if mycoordinates ~= nil then&lt;br /&gt;
				local mypoints = getBoundsById(mystack[j]['ids'], mycoordinates)&lt;br /&gt;
				if #mypoints == 0 then&lt;br /&gt;
					mypoints = parseGeoSequence(mycoordinates, mycoordinates:find(';') and 'MultiPoint' or 'Point')&lt;br /&gt;
				end&lt;br /&gt;
				allpoints = mergePoints(allpoints, mypoints)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			mystack = myfeatures&lt;br /&gt;
			j = #mystack + 1&lt;br /&gt;
			mystack[j] = {}&lt;br /&gt;
			mystack[j]['type'] = &amp;quot;Feature&amp;quot;&lt;br /&gt;
			mystack[j]['geometry'] = {}&lt;br /&gt;
			mystack[j]['geometry']['type'] = geotypex or findGeotype(args['קואורדינטות'..i])&lt;br /&gt;
			mystack[j]['geometry']['coordinates'] = parseGeoSequence(args['קואורדינטות'..i], mystack[j]['geometry']['type'])&lt;br /&gt;
			allpoints = mergePoints(allpoints, mystack[j]['geometry']['coordinates'])&lt;br /&gt;
			addCategories(mystack[j]['geometry']['type'], i)&lt;br /&gt;
		end&lt;br /&gt;
		mystack[j]['properties'] = {}&lt;br /&gt;
		mystack[j]['properties']['title'] = args['שם'..i] or (geotypex and geotypex .. i) or mystack[j]['geometry']['type'] .. i&lt;br /&gt;
		if args['תמונה'..i] then&lt;br /&gt;
			args['תיאור'..i] = (args['תיאור'..i] or '') .. '[[File:' .. args['תמונה'..i] .. '|300px]]'&lt;br /&gt;
		end&lt;br /&gt;
		mystack[j]['properties']['description'] = args['תיאור'..i]&lt;br /&gt;
		mystack[j]['properties']['marker-size'] = args['גודל סמן'..i] or args['גודל סמן']&lt;br /&gt;
		mystack[j]['properties']['marker-symbol'] = args['סמל סמן'..i] or args['סמל סמן']&lt;br /&gt;
		mystack[j]['properties']['marker-color'] = args['צבע סמן'..i] or args['צבע סמן']&lt;br /&gt;
		mystack[j]['properties']['stroke'] = args['צבע קו מתאר'..i] or args['צבע קו מתאר']&lt;br /&gt;
		mystack[j]['properties']['stroke-opacity'] = tonumber(args['אטימות קו מתאר'..i] or args['אטימות קו מתאר'])&lt;br /&gt;
		mystack[j]['properties']['stroke-width'] = tonumber(args['עובי קו מתאר'..i] or args['עובי קו מתאר'])&lt;br /&gt;
		mystack[j]['properties']['fill'] = args['מילוי'..i] or args['מילוי']&lt;br /&gt;
		mystack[j]['properties']['fill-opacity'] = tonumber(args['אטימות מילוי'..i] or args['אטימות מילוי'])&lt;br /&gt;
		&lt;br /&gt;
		i = i + 1&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- calculate defaults for static mapframe; maplink is dynamic&lt;br /&gt;
	if (tagArgs.latitude == nil or tagArgs.longitude == nil) and #allpoints &amp;gt; 0 then&lt;br /&gt;
		if tagname == &amp;quot;mapframe&amp;quot; or tagArgs.text == nil then -- coordinates needed for text in maplink&lt;br /&gt;
			tagArgs.longitude, tagArgs.latitude = getCoordCenter(allpoints)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if tagArgs.zoom == nil then&lt;br /&gt;
		if tagname == &amp;quot;mapframe&amp;quot; then&lt;br /&gt;
			if #allpoints == 1 then&lt;br /&gt;
				local currentId = mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
				local coordInput = allpoints[1][2] .. ',' .. allpoints[1][1]&lt;br /&gt;
				local mybounds = getBoundsById(currentId, coordInput) -- try to fetch by area&lt;br /&gt;
				allpoints = mergePoints(allpoints, mybounds)&lt;br /&gt;
			end&lt;br /&gt;
			if #allpoints &amp;lt;= 1 then&lt;br /&gt;
				tagArgs.zoom = defaultzoom or 9&lt;br /&gt;
			else&lt;br /&gt;
				tagArgs.zoom = getZoom(allpoints, tagArgs.height, tagArgs.width)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			tagArgs.zoom = defaultzoom&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local geojson = myexternal&lt;br /&gt;
	if #myfeatures &amp;gt; 0 then&lt;br /&gt;
		geojson[#geojson + 1] = {type = &amp;quot;FeatureCollection&amp;quot;, features = myfeatures}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args.debug ~= nil then&lt;br /&gt;
		local html = mw.text.tag{name = tagname, attrs = tagArgs, content = mw.text.jsonEncode(geojson, mw.text.JSON_PRETTY)}&lt;br /&gt;
		return 'syntaxhighlight', tostring(html) .. ' Arguments:' .. mw.text.jsonEncode(args, mw.text.JSON_PRETTY), {lang = 'json'}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return tagname, geojson and mw.text.jsonEncode(geojson) or '', tagArgs&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.tag(frame)&lt;br /&gt;
	if mw.title.new(frame:getParent():getTitle()).isContentPage and not mw.title.new(frame:getTitle()).isSubpage then&lt;br /&gt;
		-- invoked from a content page and not invoking a module subpage&lt;br /&gt;
		printError('not-from-content-page')&lt;br /&gt;
	end&lt;br /&gt;
	local getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	local tag, geojson, tagArgs = p._tag(args)&lt;br /&gt;
	&lt;br /&gt;
	local categories = ''&lt;br /&gt;
	&lt;br /&gt;
	if errormessage then&lt;br /&gt;
		categories = mw.message.new('Kartographer-broken-category'):inLanguage(mw.language.getContentLanguage().code):plain()&lt;br /&gt;
		return errormessage .. '[[Category:' .. categories .. ']]'&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	return frame:extensionTag(tag, geojson, tagArgs) .. categories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>יענק'ל</name></author>
		
	</entry>
</feed>