Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes web interface #145

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ To run the program in interactive mode:
./dump1090 --interactive

To run the program in interactive mode, with networking support, and connect
with your browser to http://localhost:8080 to see live traffic:
with your browser to http://localhost:8080 to see live traffic, first get a
[google maps javascript API key](https://developers.google.com/maps/documentation/javascript/get-api-key)
and replace `GOOGLE_MAPS_JAVASCRIPT_API_KEY` in gmap.html with your key.
Then run:

./dump1090 --interactive --net

Expand Down
8 changes: 4 additions & 4 deletions gmap.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?sensor=true">
src="https://maps.googleapis.com/maps/api/js?key=GOOGLE_MAPS_JAVASCRIPT_API_KEY">
</script>
<script type="text/javascript">
Map=null;
map=null;
CenterLat=45.0;
CenterLon=9.0;
Planes={};
Expand Down Expand Up @@ -123,7 +123,7 @@
} else {
marker = new google.maps.Marker({
position: new google.maps.LatLng(plane.lat, plane.lon),
map: Map,
map: map,
icon: getIconForPlane(plane)
});
plane.marker = marker;
Expand Down Expand Up @@ -156,7 +156,7 @@
zoom: 5,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
Map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);

/* Setup our timer to poll from the server. */
window.setInterval(function() {
Expand Down