Guest User

Untitled

a guest
Dec 14th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. ngOnInit() {
  2. const mapOptions = {
  3. center: {lat: 0, lng: -180},
  4. zoom: 5,
  5. mapTypeId: google.maps.MapTypeId.ROADMAP
  6. };
  7. const myMap = new google.maps.Map(document.getElementById("my-map"), mapOptions);
  8.  
  9. const flightPlanCoordinates = [
  10. {lat: 37.772, lng: -122.214},
  11. {lat: 21.291, lng: -157.821},
  12. {lat: -18.142, lng: 178.431},
  13. {lat: -27.467, lng: 153.027}
  14. ];
  15. const flightPath = new google.maps.Polyline({
  16. path: flightPlanCoordinates,
  17. geodesic: true,
  18. strokeColor: '#FF0000',
  19. strokeOpacity: 1.0,
  20. strokeWeight: 2
  21. });
  22. flightPath.setMap(myMap);
Add Comment
Please, Sign In to add comment