This is the link click on get started now first you have to obtain the API key
<script ”text/javascript” src=”https://maps.googleapis.com/maps/api/js?key=AIzaSyDnwbR1GH6NhNL_mdqigbI8GjwO_o89EsM&sensor=false”> </script> <script ”text/javascript”> ‘use strict’; var map; var myLatlng = new google.maps.LatLng(-25.363882,131.044922); var contentString = ‘<div id=”content”>’+ ‘<div id=”siteNotice”>’+ ‘</div>’+ Live link ‘<h1 id=”firstHeading”>Uluru</h1>’+ ‘<div id=”bodyContent”>’+ ‘<p><b>Uluru</b>, also referred to as <b>Ayers Rock</b>, is a large ‘ + ‘sandstone rock formation in the southern part of the ‘+ ‘Northern Territory, central Australia. It lies 335 km (208 mi) ‘+ ‘Heritage Site.</p>’+ ‘<p>Attribution: Uluru, <a href=”http://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194″>’+ ‘http://en.wikipedia.org/w/index.php?title=Uluru</a> ‘+ ‘(last visited June 22, 2009).</p>’+ ‘</div>’+ ‘</div>’; function initialize() { var mapOptions = { center: myLatlng, zoom: 10 }; map = new google.maps.Map(document.getElementById(“map-canvas”), mapOptions); var marker = new google.maps.Marker({ position: myLatlng, map: map, title: ‘Hello World!’ }); var infowindow = new google.maps.InfoWindow({ content: contentString }); google.maps.event.addListener(marker, ‘click’, function() { infowindow.open(map,marker); }); } google.maps.event.addDomListener(window, ‘load’, initialize); </script> live example
0 Comments
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |