Author Topic: Google Maps API and Key  (Read 468 times)

quepsi83

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Google Maps API and Key
« on: May 23, 2018, 04:07:33 AM »
This may not affect some VAM users (yet). But it has affected my beta VA. The Live Flights Map and the Past 10 Flights Map no longer works. The following error message/dialog pops up...


Oops! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.


This is NOT (I repeat... NOT) a VAM coding surprise issue. The problem is caused by an change implemented by Google... requiring users of the Map API to get an API Key from Google.

My question to VAM is...  Is this API Key necessity going to be resolved during new version of VAM?

My thoughts are... if I were to get a Key independently... and regain Map display ( some minor tweaking of source code required ) when an update to VAM is released... will the update wipe out the mods previously performed by the individual user(s) to get the Map working again?

I've looked around at another VAM installation (Lufthansa) and that VA's Maps also do not work - just like my beta site. So, I'm NOT making this up.

Hope to hear back from VAM Dev.

Cheers,

Keith

Geroma76

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Google Maps API and Key
« Reply #1 on: May 23, 2018, 06:36:14 AM »
How to fix the Propblem ?

Quote

Own API KEY for Java Map application from google cloud would certainly be helpful.

Apparently the API query has been changed at Google.
All spaces must be removed in each php.


airport_map.php
hub_routes_map.php
pilot_flights_map.php
vam_live_flights_map.php


old :  key= AIzaSyAse6CjTQffTPy_k4oYaUj34d1A7py3rUQ &callback=initMap"   

new : key=AIzaSyAse6CjTQffTPy_k4oYaUj34d1A7py3rUQ&callback=initMap"



 Sophie

Change it and everthing is fine.

Of course all necessary PHP files will be updated  in a later version of VAM.

Sophie
« Last Edit: May 29, 2018, 06:12:09 PM by Geroma76 »
Please use the search function, this will help you with most of the questions asked here.

quepsi83

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: Google Maps API and Key
« Reply #2 on: May 23, 2018, 04:20:45 PM »
Thank you very much Sophie. The 'edits' to those .PHP files (appear to) have worked.  Now, that raises NEW possibilities for me to research... "Hmmm... like having the ability to CLICK on each of the 'Push Pins' and display data for the Airport... OR... have a default where (at least) the ICAO of the Airport is displayed along with the Push Pin... OR... Hover over the Push Pin to display the ICAO data?"

Regards,

Keith

p.colin

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Google Maps API and Key
« Reply #3 on: May 28, 2018, 07:01:01 PM »
thank you very much for this interesting information.

Pascal

p.colin

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Google Maps API and Key
« Reply #4 on: May 30, 2018, 12:13:21 PM »
Finally, you also need the file:  vampirep_map.php

quepsi83

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: Google Maps API and Key
« Reply #5 on: May 31, 2018, 10:50:14 PM »
"Yep!  That one too..."

VAM

  • Administrator
  • Hero Member
  • *****
  • Posts: 1325
    • View Profile
    • virtual Airlines Manager
Re: Google Maps API and Key
« Reply #6 on: June 12, 2018, 12:20:22 AM »
Fix added to VAM 2.6.3 that will be released end next week.
Thanks!
VAM Creator and programmer.

p.colin

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Google Maps API and Key
« Reply #7 on: June 13, 2018, 01:42:05 PM »
Excellent !  8)

quepsi83

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: Google Maps API and Key
« Reply #8 on: June 14, 2018, 10:26:14 PM »
Please review the suggestions page as well? I'm adding an item or two that may be an easy fix before you release the update to consider? Thank you...

Keith