Skip to content

Instantly share code, notes, and snippets.

@filiptronicek
Created May 18, 2019 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filiptronicek/a1b0ac9444f63fe15264163aefaaa263 to your computer and use it in GitHub Desktop.
Save filiptronicek/a1b0ac9444f63fe15264163aefaaa263 to your computer and use it in GitHub Desktop.
A function that creates a dynamic link for my geography project
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