Skip to content

Instantly share code, notes, and snippets.

@noviluni
Last active January 27, 2020 14:23
Show Gist options
  • Save noviluni/4a7fda07e6665de07ff0a161d9eee62b to your computer and use it in GitHub Desktop.
Save noviluni/4a7fda07e6665de07ff0a161d9eee62b to your computer and use it in GitHub Desktop.
var solutions = {
"Albania": 27, "Austria": 29, "Bélgica": 30, "Bulgaria": 31,
"Bosnia y Herzegovina": 32, "Bielorrusia": 33, "Suiza": 34,
"República Checa": 35, "Alemania": 36, "Dinamarca": 37, "España": 40,
"Estonia": 41, "Finlandia": 42, "Francia": 43, "Reino Unido": 46,
"Grecia": 49, "Croacia": 52, "Hungría": 53, "Islandia": 54, "Irlanda": 55,
"Italia": 56, "Kosovo": 60, "Lituania": 61, "Luxemburgo": 62, "Letonia": 63,
"Moldavia": 64, "Macedonia del Norte": 65, "Países Bajos": 66,
"Montenegro": 67, "Noruega": 68, "Polonia": 73, "Portugal": 74, "Rumania": 75,
"Rusia": 76, "República de Serbia": 90, "Eslovenia": 91, "Eslovaquia": 92,
"Suecia": 93, "Ucrania": 94, "Georgia": 95, "Turquía": 96, "Mónaco": 99,
"Liechtenstein": 100, "San Marino": 101, "Ciudad del Vaticano": 102,
"Andorra": 103, "Malta": 104, "Chipre": 105
}
function solve_question() {
let country_name = $('.objetivo').html()
if (country_name) {
let solution = solutions[country_name]
map._layers[solution].fire('click') }
}
setInterval(solve_question, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment