Advertisement
Guest User

Untitled

a guest
Feb 9th, 2015
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. <html>
  2. <body>
  3. <style>
  4. html, body, #map-canvas {
  5. height: 100%;
  6. margin: 0px;
  7. padding: 0px
  8. }
  9. </style>
  10.  
  11. <script src="https://maps.googleapis.com/maps/api/js?
  12.  
  13. v=3.exp&signed_in=true"></script>
  14. <script>
  15. // This example creates a 2-pixel-wide red polyline showing
  16. // the path of William Kingsford Smith's first trans-Pacific flight between
  17. // Oakland, CA, and Brisbane, Australia.
  18.  
  19.  
  20. function initialize() {
  21. var mapOptions = {
  22. zoom: 14,
  23. center: new google.maps.LatLng(52.204844, 21.013098),
  24. mapTypeId: google.maps.MapTypeId.ROADMAP
  25. };
  26.  
  27.  
  28. var map = new google.maps.Map(document.getElementById('map-canvas'),
  29. mapOptions);
  30.  
  31.  
  32.  
  33. var flightPlanCoordinates = [
  34. new google.maps.LatLng(52.211148, 21.010195),
  35. new google.maps.LatLng(52.211568, 21.012748),
  36. new google.maps.LatLng(52.208610, 21.014164),
  37. new google.maps.LatLng(52.209419, 21.018563),
  38. new google.maps.LatLng(52.206953, 21.019582),
  39. new google.maps.LatLng(52.205724, 21.012673),
  40. new google.maps.LatLng(52.206072, 21.012415),
  41. new google.maps.LatLng(52.205697, 21.010237),
  42. new google.maps.LatLng(52.204981, 21.010559),
  43. new google.maps.LatLng(52.205093, 21.011610),
  44. new google.maps.LatLng(52.203679, 21.012383),
  45. new google.maps.LatLng(52.204080, 21.014711),
  46. new google.maps.LatLng(52.201719, 21.016889),
  47. new google.maps.LatLng(52.198971, 21.018187),
  48. new google.maps.LatLng(52.198011, 21.012801),
  49. new google.maps.LatLng(52.196025, 21.013745),
  50. new google.maps.LatLng(52.195998, 21.013520),
  51. new google.maps.LatLng(52.208814, 21.007244)
  52.  
  53. ];
  54.  
  55.  
  56. var flightPath = new google.maps.Polyline({
  57. path: flightPlanCoordinates,
  58. geodesic: true,
  59. strokeColor: '#FF0000',
  60. strokeOpacity: 1.0,
  61. strokeWeight: 2
  62. });
  63.  
  64.  
  65. flightPath.setMap(map);
  66. }
  67.  
  68. google.maps.event.addDomListener(window, 'load', initialize);
  69.  
  70. </script>
  71. <div id="map-canvas"></div>
  72. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement