Siva
Siva

Reputation: 89

GoogleMaps JS API v3 not working in iOS

I am using Google Maps Java Script API V3 in iOS. First I created a sample html Hello World example in the page

https://developers.google.com/maps/documentation/javascript/tutorial

I used proper Google Maps API for Business client id. It is working fine when I launch the html page.

But the same is not working when I load the same html page in iOS project by creating a webview and loading the view with this html page.

I am getting the following error

"Google has disabled use of the Maps API for this application. This site is not authorized to use the Google Maps client ID provided. If you are the owner of the application, you can learn more about registering URLs here: https://developers.google.com/maps/documentaion/business/guide#URLs"

Do I nee to do anything specifically for iOS projects ?

Upvotes: 3

Views: 2161

Answers (2)

Baidaly
Baidaly

Reputation: 1849

It appears that in iOS 9 the URL has been change to: file:///var/mobile/Containers/Bundle/Application

Upvotes: 1

Timothy Nott
Timothy Nott

Reputation: 55

As mentioned in previous comments, in order to use Google Maps for Business with a webview within an iOS or Android app, you have to register appropriate URLs in the Google console. These URLs begin with 'file://' and at this time cannot be entered by users. A Google representative can help get these URLs registered on your behalf. They are:

<= iOS7 -- file:///var/mobile/Applications

iOS8 -- file:///private/var/mobile/Containers/Bundle/Application/

Android -- file:///android_asset/www/index.html

Upvotes: 3

Related Questions