I am working on magento-1.9 version. When I am going to contact us page, I got the following error which is Oops! Something went wrong.

Please help me on this. Please let me know the requirements what I have to share here to get the solution.enter image description here

Based on user SH Patel's suggestion, i ran the URL with my API key. Then i got following screen. Please find the attachment.enter image description here


Google map JS use API for display map.

<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">

Check API key which you have used, Check API for host is match for your current host or not.

  • I mean check created API which you have used is specific for domain. – Suresh Chikani Dec 1 '16 at 9:27
  • Can you give me site URL ? – Suresh Chikani Dec 1 '16 at 9:31

Follow the steps to setup the google map.

Step 1: Generate API key.

  • Get an API key from here.
  • Go to the Google API Console.
  • Create or select a project.
  • Click Continue to enable the API and any related services.
  • On the Credentials page, get an API key (and set the API key restrictions). enter image description here

Step 2: Create configuration file to add the below Javascript file.

<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">

Configuration file

To do this use the same script or link XML as normal but include src_type="url". As noted in the documentation

<?xml version="1.0" ?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap" src_type="url"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.