Skip to content

Instantly share code, notes, and snippets.

@hayskytech
Created April 13, 2023 09:30
Show Gist options
  • Save hayskytech/5c827205fc5db4fe8b23b1ddf23c1074 to your computer and use it in GitHub Desktop.
Save hayskytech/5c827205fc5db4fe8b23b1ddf23c1074 to your computer and use it in GitHub Desktop.
<iframe
id="map"
width="300"
height="170"
frameborder="0"
scrolling="no"
marginheight="0"
marginwidth="0"
src="https://maps.google.com/maps?q=15.855495, 78.258275&hl=es;z=14&output=embed"
>
</iframe>
<br />
Lan:<input type="number" id="x" onchange="run()" value="15.855495" step="0.0001"><br>
Long:<input type="number" id="y" onchange="run()" value="78.258275" step="0.0001"><br>
<script type="text/javascript">
function run(){
x = document.getElementById('x').value;
y = document.getElementById('y').value;
string = `https://maps.google.com/maps?q=${x}, ${y}&hl=es;z=14&output=embed`;
iframe = document.getElementById('map')
iframe.src = string;
iframe.contentWindow.location.reload();
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment