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

Posts: 281
Registered: ‎05-31-2012
My Device: Playbook
My Carrier: o2
Accepted Solution

Access to "https://maps.google.com[...]" not allowed

Hi, I want to use the Google Maps API in my Webworks App. But when I ran it on the devAlpha I get:

Access to "https://maps.google.com[...]" not allowed

In my config I have: 

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

 And I use the Api like this: 

function getPosition()
   //First test to see that the browser supports the Geolocation API
   if (navigator.geolocation !== null)
      var options;
      navigator.geolocation.getCurrentPosition(geolocationSuccess, geolocationError, options);
   else {
      alert("HTML5 geolocation is not supported.");

function geolocationError(error)
   alert("An unexpected error occurred [" + error.code + "]: " + error.message);

function geolocationSuccess(position)
   //Extract information about the users current position:
   var time = position.timestamp;
   var coordinates = position.coords;

   //Retrieve geographic information about the GPS fix:
   var lat = coordinates.latitude;
   var lon = coordinates.longitude;
   var alt = coordinates.altitude;
   var acc = coordinates.accuracy;
   var altAcc = coordinates.altitudeAccuracy;
   var head = coordinates.heading;
   var speed = coordinates.speed;

   alert("You are located at " + lat + ", " + lon);

 what is wrong here?

Plase "+Like" my post if it was helpful.
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Access to "https://maps.google.com[...]" not allowed

It's http://maps.googleapis.com/


Got mine working without even whitelisting it (may have changed)

Click the like button if you find my posts useful!