how to enter api key for google maps

  • Posted in : cvCard WP
  • zims.uk
    Member

    I have installed the theme and are using your template for the contact page and it will not show the map unless i use an api key (which i have optained). now my question is how do i include this key on the page…

    google sys this code must be included:

    <script async defer src=”https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap&#8221;
    type=”text/javascript”></script>

    with YOUR_API_KEY replaced by my api key…

    please help

    zims.uk
    Member

    I get the error on my page http://css-webdesign.dk/#/contact

    serkan
    Moderator

    Google map api requires api key for new domains to show the map, otherwise throw js errors, which might be breaking the js codes of the theme. We will add google map api key support to the template with the next update, if you can’t wait for the next update, you can try to apply this fix;

    you will need to find this code line;

    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&"></script>
    

    and replace it with this line;

    <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY_HERE"></script>
    

    and get your google map api key here;

    https://developers.google.com/maps/documentation/javascript/get-api-key

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register