Jump to content

Live Map Google Map Code


in2tech

Recommended Posts

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?

Link to comment
Share on other sites

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 by flyalaska
Link to comment
Share on other sites

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 by jnascar
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...

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 by TAV1702
Link to comment
Share on other sites

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 by TAV1702
Link to comment
Share on other sites

  • 1 month later...

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 by OmerAslan
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...