Javascript error in Google Maps API v3 (RefererDeniedMapError)

前端 未结 2 1712
滥情空心
滥情空心 2020-12-16 17:31

We were using Google Maps without key and because of our traffic increase we had to create and add the API key in our JS call. But now, when we are calling the JS we are rec

相关标签:
2条回答
  • 2020-12-16 17:58

    I’ve found an URL to your website in google’s thread and I was able to reproduce this problem locally. I’ve just added your host name in hosts file and addressed it to localhost. I’ve got the same error. It’s definitely domain name related problem.

    I was able to make map works only using IP and path to a map page, instead of domain name, like:

       <!DOCTYPE html>
       <html>
         <head>
           <title>A page where should be a map</title>
         </head>
         <body>
           <iframe src='http://127.0.0.1/mapa.html'></iframe>
         </body>
       </html>
    

    You could try to disable IP to domain name redirection (as you have now), and use your IP in the example above. It’s not a pure solution, but at least you can have a map on your website.

    0 讨论(0)
  • 2020-12-16 18:00

    Javascript error in Google Maps API v3 (RefererDeniedMapError)

    After a detailed research into your issue that you are currently facing,i have come across with some possible answers to your question apart from the other answers.

    There are two types of Referer errors :

    1. RefererNotAllowedMapError

      The current URL loading the Google Maps JavaScript API has not been added to the list of allowed referrers. Please check the referrer settings of your API key on Google Cloud Console.

    2. RefererDeniedMapError

      Your request has not been completed. You may be able to find the more details about the error in the Google Cloud Console(please have a look).

    We were using Google Maps without key and because of our traffic increase we had to create......

    1. What are the usage limits for the Google Maps JavaScript API v3?
    2. What are the usage limits for the Google Earth API?

    Requests that constitute page views are applied against the total number of page views purchased with your Google Maps API for Work license. When this limit is reached, you will need to renew your license promptly.

    Please read more limitations here

    Error message that you are facing may be a clear indication that you have crossed any limitations ,and that would be hard to guess at this point from this end as detailed analysis and configuration report from your account(console) is required.

    Keep Checking the limitations , errors in your cloud console.

    As a final call you can contact the paid support from google.

    Find More references below :

    1. Google terms

    2. Keys FAQ

    3. SO post on multiple APIs

    Hope that would be useful .. Thanks

    0 讨论(0)
提交回复
热议问题