Skip to content Skip to sidebar Skip to footer

Using Google Map Javascript Library With Cordova

I am trying to use Google map JavaScript API with a cordova project, I am getting the map, after few seconds, I am getting RefererNotAllowedMapError for file:///android_asset/www/i

Solution 1:

As of May 2017, the issue has been solved by Google. Now you can use file:/ referrers with API keys. You can see the following text in the documentation

file:// referers need a special representation to be added to the Key restriction. The "file:/" part should be replaced with "__file_url__" before being added to the Key restriction. For example, "file://path/to/" should be formatted as "__file_url__/path/to/*". After enabling file:// referers, it is recommended you regularly check your usage, to make sure it matches your expectations

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

Post a Comment for "Using Google Map Javascript Library With Cordova"