Module:Maki icon overview

local p = {} --p stands for package

p.icons = { "roadblock", "rocket", "school", "scooter", "shop", "skiing", "slaughterhouse", "soccer", "square", "square-stroked", "star", "star-stroked", "suitcase", "swimming", "telephone", "tennis", "theatre", "toilets", "town", "town-hall", "triangle", "triangle-stroked", "village", "warehouse", "waste-basket", } p.step = 0.05 p.columnCount = 12

function p.grid( frame ) local outputTable = { 		{			"type": "FeatureCollection",			"features": [ }	p.coordGrid( outputTable ) table.insert(outputTable, 		 ]		}	) -- return table.concat(outputTable) return frame:preprocess(table.concat(outputTable)) end

function p.coordGrid( outputTable ) local iconIndex = 1 -- Stop iterating rows when we run out of icons. for y = 0, 999, p.step do	   for x = 0, p.columnCount * p.step, p.step do	    	local icon = p.icons[iconIndex] if not icon then return end -- Positive Y is up, so negate to read top-to-bottom. table.insert(outputTable, '	{ "type": "Feature", "geometry": { "type":"Point", "coordinates":['..x..', -'..y..'] }, "properties": { "title":"Maki Icon: '..icon..'", "marker-symbol":"'..icon..'"} },\n') iconIndex = iconIndex + 1 end end end

return p