Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <style>
- html, body, #map-canvas {
- height: 100%;
- margin: 0px;
- padding: 0px
- }
- </style>
- <script src="https://maps.googleapis.com/maps/api/js?
- v=3.exp&signed_in=true"></script>
- <script>
- // This example creates a 2-pixel-wide red polyline showing
- // the path of William Kingsford Smith's first trans-Pacific flight between
- // Oakland, CA, and Brisbane, Australia.
- function initialize() {
- var mapOptions = {
- zoom: 14,
- center: new google.maps.LatLng(52.204844, 21.013098),
- mapTypeId: google.maps.MapTypeId.ROADMAP
- };
- var map = new google.maps.Map(document.getElementById('map-canvas'),
- mapOptions);
- var flightPlanCoordinates = [
- new google.maps.LatLng(52.211148, 21.010195),
- new google.maps.LatLng(52.211568, 21.012748),
- new google.maps.LatLng(52.208610, 21.014164),
- new google.maps.LatLng(52.209419, 21.018563),
- new google.maps.LatLng(52.206953, 21.019582),
- new google.maps.LatLng(52.205724, 21.012673),
- new google.maps.LatLng(52.206072, 21.012415),
- new google.maps.LatLng(52.205697, 21.010237),
- new google.maps.LatLng(52.204981, 21.010559),
- new google.maps.LatLng(52.205093, 21.011610),
- new google.maps.LatLng(52.203679, 21.012383),
- new google.maps.LatLng(52.204080, 21.014711),
- new google.maps.LatLng(52.201719, 21.016889),
- new google.maps.LatLng(52.198971, 21.018187),
- new google.maps.LatLng(52.198011, 21.012801),
- new google.maps.LatLng(52.196025, 21.013745),
- new google.maps.LatLng(52.195998, 21.013520),
- new google.maps.LatLng(52.208814, 21.007244)
- ];
- var flightPath = new google.maps.Polyline({
- path: flightPlanCoordinates,
- geodesic: true,
- strokeColor: '#FF0000',
- strokeOpacity: 1.0,
- strokeWeight: 2
- });
- flightPath.setMap(map);
- }
- google.maps.event.addDomListener(window, 'load', initialize);
- </script>
- <div id="map-canvas"></div>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement