in2tech Posted September 22, 2016 Report Share Posted September 22, 2016 Apparently starting around July 2016 you have to get a code to use Google Maps on your NEW phpVMS installation. I did that, but I have to refresh the page many times before the map shows up. I DO NOT have to do this on my old site that did not require the new code at this time. On that site the map shows up immediately when I click the menu link for the acars map. Any ideas? Quote Link to comment Share on other sites More sharing options...
web541 Posted September 22, 2016 Report Share Posted September 22, 2016 Check your browser's console for errors and post any here (if any). By code, are you talking about the GoogleMapsAPI Key? Quote Link to comment Share on other sites More sharing options...
flyalaska Posted September 23, 2016 Report Share Posted September 23, 2016 (edited) Apparently starting around July 2016 you have to get a code to use Google Maps on your NEW phpVMS installation. I did that, but I have to refresh the page many times before the map shows up. I DO NOT have to do this on my old site that did not require the new code at this time. On that site the map shows up immediately when I click the menu link for the acars map. Any ideas? If you are referring the api, than you need to get a google map api(javascript) than add this yo your core_htmlhead.php file. <script async defer src="https://maps.googleapis.com/maps/api/js?key=Y O U R A P I K E Y&callback=initMap"></script> replace "YOURAPIKEY with your actual key Edited September 23, 2016 by flyalaska Quote Link to comment Share on other sites More sharing options...
in2tech Posted September 23, 2016 Author Report Share Posted September 23, 2016 (edited) web541 and flyalaska, Yes the API key for maps. That's exactly what I did! Got the api key and entered it in the core_htmlhead.php file like above. Otherwise it would not work at all correct? And it will not work unless I press the menu links several times or refresh the page several times. phpVMS 5.5 and won't work hardly at all on the default crystal skin! Console errors: Failed to load resource: the server responded with a status of 404 (Not Found) ReferenceError: Can't find variable: google and repeats.... Edited September 23, 2016 by jnascar Quote Link to comment Share on other sites More sharing options...
web541 Posted September 23, 2016 Report Share Posted September 23, 2016 Failed to load resource -> sound to me like a file is missing on your server. Check to see if it exists and if it is needed in your code, otherwise take it out. ReferenceError: Can't find variable: google <-- Could be what's breaking it. Could you please paste your core_htmlhead and the <head> part of your layout.php so we can make sure everything has been entered correctly (as per flyalaska above). You're welcome to hide the API Key. Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted September 23, 2016 Moderators Report Share Posted September 23, 2016 with script async defer the page will load regardless if all the code is received from google, if you want your page to always load correctly then use <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOURSITEKEY=js?sensor=true"></script> Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 23, 2016 Report Share Posted October 23, 2016 Mark is there any way you can put this in to a code box? can't copy it due to the website destroying what you put in the post. Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted October 23, 2016 Moderators Report Share Posted October 23, 2016 <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOURKEY&=js?sensor=true"></script> Sure no problem Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 23, 2016 Report Share Posted October 23, 2016 Thanks bud. Appreciate it. And long time no talk chief. Hope all is well on your end. Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 23, 2016 Report Share Posted October 23, 2016 (edited) Hours later and I still have no map. I do have a valid API key in place. I opened my Java console and I have 2 warnings. "Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys"util.js:208:33 "Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required"util.js:208:33 "Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error" The code I used is the code right above this post that Mark graciously reposted for me. **EDIT** I just inspected the element and the google api key dont even appear. it just says oops. Sorry Edited October 24, 2016 by TAV1702 Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted October 24, 2016 Report Share Posted October 24, 2016 (edited) figured it out. Google cant access my api key as it is a local host server. If I could go back a map version i would. This is just plain stupid. **EDIT** I just moved the site over from WAMP to my live production server and all is well. Map works fine now. Edited October 24, 2016 by TAV1702 Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted November 30, 2016 Report Share Posted November 30, 2016 (edited) If you are referring the api, than you need to get a google map api(javascript) than add this yo your core_htmlhead.php file. <script async defer src="https://maps.googleapis.com/maps/api/js?key=Y O U R A P I K E Y&callback=initMap"></script> replace "YOURAPIKEY with your actual key When i add this code, map works in google chrome but mozzilla and others not working. Can i have some help? http://s.swissval.com/index.php/acars now not even working in google chrome i think Edited November 30, 2016 by OmerAslan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.