javascript - Set Latitude and Longitude Parameters using Google Api -


im start to get javascript, api and so on. I'm trying to use the Google Maps API with some JavaScript, so my main idea was to create a button with the stored latitude and underlined values ​​to display in the map, but there is a hard time passing through the parameters of the IM.

This is my code so far

  & lt; Script & gt; Function Load () {var mapOpt = {center: new google.maps.LatLng (0.0.0.0), Zoom: 5, Map Typied: google.maps.MapTypeId.ROADMAP}; Var map = new google.maps.Map (document.getElementById ("googleMap"), mapOpt); & Lt; / Script & gt;  

As you can see, I am trying to pass the stored latitude and the LAN to work, how can I do this?

If you want your function to provide different locations, then I think it's a Parameter function load (latitude, LNG) and then center: new google.maps.LatLng (latitude, LNG),

see:


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -