Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
initialize
Posts: 8
Registered: ‎03-07-2013
My Device: BB10
Accepted Solution

Blackberry 10 Error (Google Maps API)

[ Edited ]

I am trying to use the google map api with

script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"

But when I run my app in my blackberry 10 I get this error:

 

Access to "http://maps.google.com/maps/api/js?sensor=false" not allowed

 

 

here:

index.html : pastebin.com/Rs8T07ki actual function: pastebin.com/iAyHT7mL 


If you can, please give me some advice, I been stuck for hours

any help or comment is appreciated

Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Blackberry 10 Error (Google Maps API)

Had the same thing myself

 

Cut & Paste time...

 

Add these to config.xml

 

    <access uri="https://googleapis.com" subdomains="true" />
    <access uri="https://gstatic.com" subdomains="true" />




Click the like button if you find my posts useful!
Please use plain text.
New Contributor
initialize
Posts: 8
Registered: ‎03-07-2013
My Device: BB10

Re: Blackberry 10 Error (Google Maps API)

omg thanks a lot! will try it tonight. Do you know why this solve the problem?

Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Blackberry 10 Error (Google Maps API)

I had the same problem myself

 

I can't be 100% sure this will work as your device may have put them on a bad list

 

What those lines do is tell WebWorks that it can use these to allow a source not on the device to tell it what to do

 

Usually you want nothing controlling things other than you

 

In this specific case you wanna let Google play

 

This is called whitelisting

 

A White is something you trust without question

 

Lets say you had maps.ripmeoff.cn.com who just want your CC info - they could do so without being on a whitelist

 

This stuff prevents that scenario

 

It may sound a little draconian but @ the end of the day you might get sued

 

Hence - whitelists

 

 




Click the like button if you find my posts useful!
Please use plain text.
New Contributor
initialize
Posts: 8
Registered: ‎03-07-2013
My Device: BB10

Re: Blackberry 10 Error (Google Maps API)

Thanks =)
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Blackberry 10 Error (Google Maps API)

Did the whitelist work?

 

Got my own mapping app I'll build and install on my brand-spanking new Z10 a little later




Click the like button if you find my posts useful!
Please use plain text.