[Support request] Key Google Maps

Home Forums Support [Support request] Key Google Maps

Home Forums Support Key Google Maps

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1406428
    noe_sp

    Hello,

    I’ve created an api key for a restrict domain.

    In the website, I’ve created a new hook and put this code:

    <script async defer src=”https://maps.googleapis.com/maps/api/js?key=MY API KEY&callback=initMap”
    type=”text/javascript”></script>

    wp_head, entire site and for all users, but I the map not works..

    Thank you

    Regards

    #1406826
    Leo
    Staff
    Customer Support

    Hi there,

    Is that supposed to be in wp_head hook?

    Can you link me to the instruction?

    #1407184
    noe_sp

    Map 1
    Map 2

    Thank you

    #1407408
    David
    Staff
    Customer Support

    Hi there,

    those links require a password.

    However, that API key script needs to be added to the WP_footer.

    You will then need to add the HTML for displaying the map in the content of your page or another Hook that comes before the WP_footer.

    More detail here:

    https://developers.google.com/maps/documentation/javascript/adding-a-google-map

    #1407703
    noe_sp
    #1408316
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    The other info that David provided should help. The script should be added to wp_footer, and then you need to add the map HTML to the page.

    You should just need to follow their instructions step by step to get it to work.

    #1410566
    noe_sp

    Hello,

    I have done the indications and I continue with the same problem,

    Thank you,

    Regards

    #1410770
    David
    Staff
    Customer Support

    There is more to it then just adding the script.
    In this link you will see there is a HTML element and an Init function that has to exist in the pages content.

    Maybe use a Plugin to handle this

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.