Jump to content

Module:Russo-Ukrainian War detailed map (oblasts)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Alexiscoutinho (talk | contribs) at 04:08, 3 May 2024 (Tweaked Urozhaine label and compacted code). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local m = require('Module:Russo-Ukrainian War detailed map')

m.containerArgs.AlternativeMap = nil
m.containerArgs.autoSwitcherLabel = true
m.containerArgs.width = 1000

local label2
for _, mark in ipairs(m.marks) do
	label = mark.label
	if label then
		label = mw.text.trim(label, '%[%]')
		label2 = mw.text.split(label, '[,|]')[1]
		label = m.marks[label2] and mw.text.split(label, '|')[1] or label2
		m.marks[label] = mark
	end
	if mark.label_size == 0 and mark.position and string.sub(mark.mark, 1, 1) == 'L' then
		mark.label_size = sizes[mark.marksize]
	end
end

-- Arranged by oblasts in alphabetical order. Crimea is at the bottom.
local mm = m.marks
--Dnipropetrovsk Oblast
mm["Nikopol"].position = "bottom"

--Donetsk Oblast
mm["Khartsyzk"].position = "bottom"
mm["Krasnohorivka"].label_width = 7
mm["Lyman"].position = "right"
mm["Nyzhnia Krynka"].position = "bottom"
mm["Ocheretyne"].position = "top"
mm["Sviatohirsk"].position = "top"
mm["Urozhaine"].position = "right"
mm["Volodymyrivka"].label_width = 7
mm["Yasynuvata"].label_width = nil
mm["Yenakiieve"].position = "left"

marks = {
	--Donetsk Oblast
	{ lat = "48.220", long = "37.145", mark = "Location dot blue.svg", marksize = 6, label = "[[Shevchenko, Donetsk Oblast|Shevchenko]]", link = "Territorial control during the Russo-Ukrainian War#Shevchenko", label_size = 50, position = "left" }, -- obstructed by Novohrodivka
	{ lat = "48.265", long = "38.160", mark = "Location dot red.svg", marksize = 8, label = "[[Sofiivka, Horlivka Raion, Donetsk Oblast|Sofiivka]]", link = "Sofiivka, Horlivka Raion, Donetsk Oblast", label_size = 60, position = "top" }, -- permanently obstructed by Yenakiieve
	{ lat = "48.232", long = "37.553", mark = "Location dot blue.svg", marksize = 6, label = "Sokil", link = "uk:Сокіл (Покровський район)", label_size = 50--[[66]], position = "left" }, -- obstructed by Ocheretyne
}

TableTools.extend(m.marks, marks)

return m