javascript - Show list of co-ordinates in google map using geolocation in html5 -


For a small school project, I need something like this Bella

So I created a html file test.html and added all the code of Bella below. But when I open the html page in the browser, I do not get any output. How can I make this work? Thanks in advance.

  & lt; Div id = "map" & gt; & Lt; / Div & gt; & Lt; Script & gt; Var map; Var elevator; Var myOptions = {Zoom: 12, center: new google.maps.LatLng (-33.950198, 151.25 9 302), map type EID: 'terrain'}; Map = new google.maps.Map ($ ('# map') [0], myOptions); Var marker = []; Var Beach = [['Bondi Beach', -33.890542, 151.274856, 4], ['Kogi Beach', -33.923036, 151.25 9 52, 5], ['Cronula Beach', -34.02824 9, 151.157507, 3], ['Manly Beach', -33.80010128657071, 151.28747820854187, 2], ['Maroubra Beach', -33.950198, 151.259302, 1]]; Var range = new google.maps.LatLngBounds (); For (in beaches x) {var data = beaches [x]; Console.log (data) var lat = beach [x] [1]; Var lng = beach [x] [2] var latLng = new google.maps.LatLng (latitude, LNG); Var marker = new google.maps.Marker ({map: map, position: latLng}); Markers.push (marker); Bounds.extend (LatLng); } Map.fitBounds (bounds) new google.maps.Rectangle ({bounds: bounds, fillcolor: '# 000000', map: map}) var centerBounds = new google.maps.Marker ({Map: Map, Status: Limits GetCenter (), Icon: 'http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=C|FF0000|000000'}); & Lt; / Script & gt;  

Include jQuery library on your page:

  & lt; Script src = "// ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></criptcript> Include  

Map API :

  



  

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? -