Module:Maki icon overview

local p = {} --p stands for package

p.icons = { "aerialway", "airfield", "airport", "alcohol-shop", "american-football", "amusement-park", "aquarium", "arrow", "art-gallery", "attraction", "bakery", "bank-jp", "bank", "bar", "barrier", "baseball", "basketball", "bbq", "beach", "beer", "bicycle-share", "bicycle", "blood-bank", "bowling-alley", "bridge", "building", "bus", "cafe", "campsite", "car-rental", "car-repair", "car", "casino", "castle-jp", "castle", "caution", "cemetery-jp", "cemetery", "charging-station", "cinema", "circle-stroked", "circle", "city", "clothing-store", "college-jp", "college", "commercial", "communications-tower", "confectionery", "construction", "convenience", "cricket", "cross", "dam", "danger", "defibrillator", "dentist", "diamond", "doctor", "dog-park", "drinking-water", "elevator", "embassy", "emergency-phone", "entrance", "farm", "fast-food", "fence", "ferry-jp", "ferry", "fire-station", "fire-station-jp", "fitness-centre", "florist", "fuel", "furniture", "gaming", "garden-centre", "garden", "gate", "gift", "globe", "golf", "grocery", "hairdresser", "harbor", "hardware", "heart", "heliport", "highway-rest-area", "historic", "home", "horse-riding", "hospital-jp", "hospital", "hotspring", "ice-cream", "industry", "information", "jewelry-store", "karaoke", "landmark-jp", "landmark", "land-use", "laundry", "library", "liftgate", "lighthouse-jp", "lighthouse", "lodging", "logging", "marker-stroked", "marker", "mobilephone", "monument-jp", "monument", "mountain", "museum", "music", "observation-tower", "optician", "paint", "park-alt1", "park", "parking-garage", "parking", "pharmacy", "picnic-site", "pitch", "place-of-worship", "playground", "police-jp", "police", "post-jp", "post", "prison", "racetrack-boat", "racetrack-cycling", "racetrack-horse", "racetrack", "rail-light", "rail-metro", "rail", "rangerstation", "recycling", "religious-buddhist", "religious-christian", "religious-jewish", "religious-muslim", "religious-shinto", "residential-community", "restaurant-bbq", "restaurant-noodle", "restaurant-pizza", "restaurant-seafood", "restaurant-sushi", "restaurant", "road-accident", "roadblock", "rocket", "school-jp", "school", "scooter", "shelter", "shoe", "shop", "skateboard", "skiing", "slaughterhouse", "slipway", "snowmobile", "soccer", "square-stroked", "square", "stadium", "star-stroked", "star", "suitcase", "swimming", "table-tennis", "teahouse", "telephone", "tennis", "theatre", "toilet", "tollbooth", "town-hall", "town", "triangle-stroked", "triangle", "tunnel", "veterinary", "viewpoint", "village", "volcano", "volleyball", "warehouse", "waste-basket", "watch", "water", "waterfall", "watermill", "wetland", "wheelchair", "windmill", "zoo", } 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

function p.list ( frame ) local outputList = '{|class="wikitable" \n |+ Maki icons \n |- \n ! Icon !! Name \n' for key,icon in pairs(p.icons) do		outputList = outputList..' |- \n | || ' ..icon..'\n' end return outputList..'|}' end

return p