Created
May 18, 2019 18:49
-
-
Save filiptronicek/a1b0ac9444f63fe15264163aefaaa263 to your computer and use it in GitHub Desktop.
A function that creates a dynamic link for my geography project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ArrayFunc(item, index) { | |
console.log('Renderování <li> elementu pro ' + item + ', které je v seznamu ' + realIndex + '. (Aleš list)'); | |
var map = | |
'<iframe width="600" height="500" id="gmap_canvas" src="https://maps.google.com/maps?q=' + | |
encodeURIComponent(item) + | |
'&t=&z=13&ie=UTF8&iwloc=&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>'; | |
var link = | |
" <li><a id='location' onClick='openMap(\"" + item + '")\'>' + item + '</a></li>'; | |
document.getElementById('ales').innerHTML += link + '<br />'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment