Display flight paths on Google maps

Hi, I want to display flight paths on Google maps. I have geo coordinates and you want to create something like this in this image: http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/02/flightarrivals.png?54167

Is there a good example? Is it possible?

Thanks Nik

+4
source share
1 answer

What about API docs?

http://code.google.com/apis/maps/documentation/javascript/overlays.html

You can add bullets, lines, text, etc. Everything is described in the API.

An example is shamelessly captured from documents on how to draw a polyline on a map:

function initialize() { var myLatLng = new google.maps.LatLng(0, -180); var myOptions = { zoom: 3, center: myLatLng, mapTypeId: google.maps.MapTypeId.TERRAIN }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var flightPlanCoordinates = [ new google.maps.LatLng(37.772323, -122.214897), new google.maps.LatLng(21.291982, -157.821856), new google.maps.LatLng(-18.142599, 178.431), new google.maps.LatLng(-27.46758, 153.027892) ]; var flightPath = new google.maps.Polyline({ path: flightPlanCoordinates, strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2 }); flightPath.setMap(map); } 

There are many more examples on Google pages.

+5
source

All Articles