Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google maps JS API referer URL

Does google maps JS API (v3) support any referer URLs other than http:// or https:// protocol?

I'm building a series of native mobile application (ios, android and windows), but wanted to integrate google maps js api, because most of the UIs in my application are developed with html5/js. And yes, we are bundling all our js/html assets with the native application. Therefore, the google maps js library will get a referer URL like file:///var/mobile/Container/...., but seems this kind of referer URL is not supported by google.

an alternative solution is to setup a mini server on the device to host all js/html assets, and then register http://localhost as one of the referer url. But I really want to avoid this.

like image 244
Ming Zhu Avatar asked Aug 05 '26 08:08

Ming Zhu


1 Answers

In the Google for Work Support Portal where you can authorize URLs they list under examples as well a file path (file:/C:/Documents/MapsDemo/main.html), but they write besides that you need to open a case for adding it. Adding file paths yourself doesn't work.

like image 149
Diego Frehner Avatar answered Aug 07 '26 23:08

Diego Frehner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!