Dump1090 Google Maps Not Displaying Publicly

Hello,

When I connect to my dump1090 server locally over the network with any browser i.e 10.0.0.96:8080 everything works perfectly

When I port forward my public ip address to port 8080 on the Raspberry Pi and try to connect to it from outside of my network, the right hand part of the screen with all the statistics works perfectly, however google maps comes up with an error.

This used to work for me and is something that I only recently became aware of when I re-enabled port forwarding so that a friend that was interested in PiAware could take a look at it up in action.

Here is the ip: 73.92.161.105:8080/

Does anyone have any suggestions or can point me in the right direction?

Thank you,

Luke

It is a change in Google’s map policy: developers.google.com/maps/pric … 016-update

Existing installs might continue to work but it depends on exactly how you access them, as the grandfathering is done on a domain-by-domain basis. New installs, or access to old installs via a new IP/domain, won’t work.

I have a work in progress that changes dump1090 to use alternative map providers here: github.com/mutability/dump1090/tree/ol3
Alternatively you can apply for a google maps API key and insert that into your local install.

Thanks for the great information.

I like your work in progress and will continue to follow it’s development.

I applied for and received a google maps API key. Can you tell me where would I place it in my install?

Also this is a new install as I wanted to take advantage of a larger SD card that I had available.

I bet if I went back to the old install which I have an image of, it would probably work.

In the meantime, I am interested in applying the API key that I received into my install, I just need to know where.

Thanks for the help!

Luke

Untested, but it should just be a case of changing the script URL that that loads the google API in gmap.html. Something like this:



<script type="text/javascript"  src="//maps.googleapis.com/maps/api/js?key=YOURKEYHERE&libraries=geometry"></script>


Hello Obj,

Thanks for the info. I can’t see, to locate gmap.html ← Would you happen to know what directory it’s in?

Luke

Ok I found it in:

/usr/share/dump1090/public_html/gmap.html

Let me see what I can do with it…

I’ll keep you posted

Luke

Hello Obj,

I dropped my key information into that spot within gmap.html and it failed to work from inside my network as well as from the outside.

I pulled the key info back out and everything is working fine again inside my local network, but still no joy for the rest of the world trying to access it from outside.

Luke

Ok finally got the dump1090 server to display maps publicly. Please see: 73.92.161.105:8080

And Obj was absolutely correct on where to add the Google API Key to the script in gmaps.html

The error I made was in the API settings under HTTP referrals. I added my external IP address and port, thinking they were asking what IP address the API was associated with. When in reality, you can limit the API to specific HTTP referrers, If you leave that field blank, your server can accept requests from anyone.

Once I cleaned that setting up, everything worked like magic.

The process of getting your FREE API key is a simple one and should take no more then 1 minute.

Here is the link to get your Free Google maps API key.

developers.google.com/maps/docu … et-api-key

Have fun,

Luke

I merged my openlayers work to master, so dump1090-mutability should now work without needing a google api key (and, unfortunately, without being able to use the google imagery; but you can enable Bing if you like with a key)

I had a slightly different problem after I enabled the API key. I got a javascript error “TypeError: a is undefined”. The error was coming from the google map api script. I did not have any IP information in the API setup. After some googling around, it seems that this error means the parameters to the map request are not constructed properly. It fails in Firefox and IE.

Now if I remove the API key, everything works fine, as it has for many months. Very strange. I’m guessing including the API key results in a different version of the google map JS which looks at the parms differently. I should be “grandfathered” so I’ll just skip using the key for now.

running dump1090-mutability 1.15~dev.

Update: I spent some time today looking at this. The error is related to an undefined a.lat variable in the google maps javascript. The problem goes away if Lat/Long are NOT specified in /etc/default/dump1090-mutability. I had them both in there, for some reason I can’t recall. I commented out those two line, and my new API key worked like a charm. I just wanted to update this in case anyone else hit the same problem.

Update 2: or maybe not! I put lat/long back in the config file, so that first time users will get their map centered in the right place to see the planes my receiver is picking up. and it worked! so, I don’t know what caused this JS TypeError, nor what I did to fix it. oh well.

I have no problem with it. I’m using a subdomain through homenet.org.

What I do use use two different ports, say, x and y, and forward one to one of my Pis, and the other to the other one. Port 8080 from the outside world doesn’t see my Pi.

BTW, probably not a good idea to post a link that connects directly to your Pi. It won’t take long for bots to pick it up and flood it with requests. In my previous post I explain how I use a DNS service. It has worked perfectly for me without ever a google maps issue.

moved a pi to a new remote location and lost dump1090 display.

Put in the google key and all working again.

Obj thanks for the heads up on the fix.

Thanks for the fix.
Applied for a Google API, took 2 minutes to get issued.

I found gmap.html file here on my RPi.

/home/pi/dump1090/public_html

Edited gmap.html. Works great.

**** DUMP1090