Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
Sign in to follow this  
Rosie123

open map block within Javascript block

Question

I can open map on a button click in Javascript, but I need to be able to open a map with a gps coordinates that change what I would like is to open a map block with these new coordinates.  If that is not possible set the button code to open the map also with these new coordinates.

<html>
<body>
<p id="demo"></p>
<form>
    <label><b>message1</b></label>
    <input type="text" name="message" id="msg1">
    <label><b>Number</b></label>
    <input type="text" name="message" id="msg2">
</form>  
<input type="submit" onclick="showInput();"><br/>

<input type="button" onclick="location.href='http://maps.apple.com/?daddr='+'result[0][2]';" value="Apple Maps" /> // or googlemaps is fine too

</body>
<script>
function showInput() 
{
   // Do some stuff that changes the coordinates
   var lat= 41.4837;
   var lng = -72.876;

   // Here i would like to set the lat lng of the maps block and insert it to my webpage or open the map above to these new coordinates so when the user clicks it goes to this address. 
}

Share this post


Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in to follow this  

×
×
  • Create New...