Here is my code.
<!-- Google Map Section --> <div id="map"></div> <script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
It works fine on localhost but doesn’t show on live website.
To make google map visible on live website we need to get an api key for google maps from google.
Here are the steps:
Go to Google api console
Then from top left corner select your project there will be 3 options
Now go to Credentials then click Create credentials and select API key from dropdown.Restrict API key from choices given.
Now you have got the API key.
Now simply put your code like this
<!-- Google Map Section --> <div id="map"></div> <script src="https://maps.googleapis.com/maps/api/js?key=Your-API-Key"></script>
and now go to live website, it should show google map now.
You need to login before you can make any post submission.