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

Adobe AIR Development

Posts: 229
Registered: ‎08-14-2009
My Device: Bold 9900, DevAlpha A
My Carrier: Vodafone DE

Re: how to invoke maps in Playbook

[ Edited ]

Did you notice the code parts where i wrote some text in capital letters? You have to put your api key and domain for which you requested that key there. You can obtain those keys from the official GoogleMaps API Page.

Willy R.
If my post solved your problem, make it easier for others to find by Accepting it as a solution or provide a Kudo if it was helpful for you. Thanks.
Posts: 526
Registered: ‎05-17-2009
My Device: 9900
My Carrier: ATT

Re: how to invoke maps in Playbook

Yes you need the api key, and really if you are using burrito it should be as easy as dragging and dropping a map container on to your app... that is if you are building a flex mobile app and not actionscript only

Like all of my posts
New Member
Posts: 1
Registered: ‎01-12-2011
My Device: Not Specified

Re: how to invoke maps in Playbook

I have the problem of Nothing showing up on the Playbook with the maps code.

I have got a relevant key and registered url on Google maps.  Using the same key, I can see map mashups in java script. The mykey and myurl are replaced with the right values in my code (not in the cut and paste below)


I built the app in AS3 using Flash builder 4.0 (not burrito) for Playbook and if I include map_flex_1_20.swc only, I see the app just being blank.


I am able to build and deploy other apps using the same tools.



If I use the debugger the Map ready event never fires




import com.google.maps.LatLng;

import com.google.maps.Map;

import com.google.maps.MapEvent;

import com.google.maps.MapType;

import com.google.maps.controls.MapTypeControl;

import com.google.maps.controls.ZoomControl;

import com.google.maps.overlays.Marker;

import com.google.maps.services.Directions;

import com.google.maps.services.DirectionsEvent;


import flash.display.Sprite;

import flash.display.StageAlign;

import flash.display.StageScaleMode;

import flash.events.Event;

import flash.events.TimerEvent;

import flash.geom.Point;

import flash.utils.Timer;




[SWF(width="1024", height="600", backgroundColor="#FFFFFF", frameRate="30")]


public class GoogleMapsInt extends Sprite


protected var _map:Map;

private var _dirSmiley Very Happyirections;

public var startTimer:Timer;


public function GoogleMapsInt()








stage.align = StageAlign.TOP_LEFT;

stage.scaleMode = StageScaleMode.NO_SCALE;


_map = new Map();

 _map.key = "my key";

_map.url  = "my url";

_map.language = "en";

_map.setSize(new Point(stage.stageWidth, stage.stageHeight));

_map.addEventListener(MapEvent.MAP_READY, onMapReady);


_map.sensor = "false";






private function onMapReady(event:Event):void {

_map.addControl(new ZoomControl());

_map.addControl(new MapTypeControl());


_map.setCenter(new LatLng(43.786072, -79.892062), 11, MapType.NORMAL_MAP_TYPE);






Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: how to invoke maps in Playbook

You're adding the map to the Sprite as stage.addChild( _map ) instead of adding it to the Sprite itself.


For fun, set the map's size to something like 300, 300.  The sprites stage many not have a width or height yet during the constructor of this Sprite.  Set the width and height on map ready (guess).


Does it work as an AIR app or is it just not showing in the simulator?




Regular Contributor
Posts: 82
Registered: ‎11-12-2010
My Device: Android Droid Incredible
My Carrier: Verizion

Re: how to invoke maps in Playbook

I'm using the Javascript V3 of the maps and for some reason the geolocation service fails when I run it in the simulator but I can click to agree to use the geolocation service for the QNXStageWebView. Anyone know if the actual geolocation service that should be working with the QNXStageWebView is actuallly working or not?

New Member
Posts: 1
Registered: ‎05-25-2011
My Device: Playbook, 9800
My Carrier: Simobil

Re: how to invoke maps in Playbook



I am trying to embed Google Maps into my PlayBook FlashBuilder app. I am confused about API Key? 


When signing for it, it says I have to enter URL of my page… but it makes no 

sense when my app runs on tablet. 

Does anyone knows, how to obtain Key for Blackberry tablets?


Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: how to invoke maps in Playbook

Have you looked at the Google map API that discusses this? AIR apps require a key and a host name that was associated with the key at registration.