Guest User

Untitled

a guest
May 24th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <head>
  3. <title>Maps</title>
  4. </head>
  5. <body>
  6. <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
  7. <script type="text/javascript">
  8. window.onload = function () {
  9. var mapOptions = {
  10. center: new google.maps.LatLng(18.9300, 72.8200),
  11. zoom: 14,
  12. mapTypeId: google.maps.MapTypeId.ROADMAP
  13. };
  14. var infoWindow = new google.maps.InfoWindow();
  15. var latlngbounds = new google.maps.LatLngBounds();
  16. var map = new google.maps.Map(document.getElementById("dvMap"), mapOptions);
  17. google.maps.event.addListener(map, 'click', function (e) {
  18. alert("Latitude: " + e.latLng.lat() + "rnLongitude: " + e.latLng.lng());
  19. });
  20. }
  21. </script>
  22. <div id="dvMap" style="width:100%; height: 100%">
  23. </div>
  24. </body>
  25. </html>
Add Comment
Please, Sign In to add comment