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

Adobe AIR Development

Reply
Contributor
MSanghvi
Posts: 10
Registered: ‎08-20-2010
My Device: Not Specified
Accepted Solution

how to invoke maps in Playbook

i want to invoke google maps in my playbook app so how can i invoke that

Please use plain text.
Developer
kylefowler
Posts: 526
Registered: ‎05-17-2009
My Device: 9900
My Carrier: ATT

Re: how to invoke maps in Playbook

You can download the google maps for flash swc and include that into your project. I am using it in one of my apps right now.

Like all of my posts
Please use plain text.
Contributor
MSanghvi
Posts: 10
Registered: ‎08-20-2010
My Device: Not Specified

Re: how to invoke maps in Playbook

thanks for reply can you send me the link from where i can download google map for adobe air or flesh

Please use plain text.
Developer
willyyr
Posts: 229
Registered: ‎08-14-2009
My Device: Bold 9900, DevAlpha A
My Carrier: Vodafone DE

Re: how to invoke maps in Playbook

Hi MSanghvi,

 

the link you are looking for is: http://maps.googleapis.com/maps/flash/release/sdk.zip

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.
Please use plain text.
Super Contributor
Meghasanghvi
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: how to invoke maps in Playbook

thanks for reply i download the ZIP file as u told but now if i want google maps  in my application then where to put this  file and how to call them or use them in my application.

 

 

Please use plain text.
Developer
willyyr
Posts: 229
Registered: ‎08-14-2009
My Device: Bold 9900, DevAlpha A
My Carrier: Vodafone DE

Re: how to invoke maps in Playbook

I'm on mobile atm but i suggest you google for: "actionscript google maps api". I searched for it before and found several exampels which should get you started. It would be usefull if you tell us which IDE you are using to help you better.
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.
Please use plain text.
Super Contributor
Meghasanghvi
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: how to invoke maps in Playbook

i am develop application on Flash Builder Burrito and i want to invoke Google maps 

Please use plain text.
Developer
zezke
Posts: 1,004
Registered: ‎12-12-2010
My Device: Z10 (red Limited Edition)
My Carrier: Mobile Vikings

Re: how to invoke maps in Playbook

 


Meghasanghvi wrote:

i am develop application on Flash Builder Burrito and i want to invoke Google maps


 

You really should show some initiative of your own and at least try to read and search for yourself.

 

actionscript google maps api

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Please use plain text.
Developer
willyyr
Posts: 229
Registered: ‎08-14-2009
My Device: Bold 9900, DevAlpha A
My Carrier: Vodafone DE

Re: how to invoke maps in Playbook

[ Edited ]

To add your SWC in FB Burrito go to your project properties -> AS Build Path -> Library Path and click: Add SWC and add the two files from the sdk download. addswc.png

 

 

I put toghether a little sample code which gives you a fullscreen Google Maps on your simulator. 

 

 

package
{
	import com.google.maps.controls.MapTypeControl;
	import com.google.maps.controls.ZoomControl;
	import com.google.maps.LatLng;
	import com.google.maps.Map;
	import com.google.maps.MapEvent;
	import com.google.maps.MapType;
	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.geom.Point;
	import flash.display.Sprite;
	import qnx.events.QNXApplicationEvent;
	
	import qnx.system.QNXApplication;

	
	[SWF(width="1024", height="600", backgroundColor="#FFFFFF", frameRate="30")]
	
	public class GoogleMapsDemo extends Sprite
	{
		protected var _map:Map;
		private var _dir:Directions;
		
		public function GoogleMapsDemo()
		{
			super();
		
			stage.align = StageAlign.TOP_LEFT;
			stage.scaleMode = StageScaleMode.NO_SCALE;
			
			_map = new Map();
			_map.key = "YOUR API KEY";
			_map.url  = "THE URL YOU REQUESTED THE API KEY FOR";
			_map.language = "en";
			_map.setSize(new Point(stage.stageWidth, stage.stageHeight));
			_map.addEventListener(MapEvent.MAP_READY, onMapReady);
			
			_map.sensor = "false";
			addChild(_map);
			
		}
		
		private function onMapReady(event:Event):void {
			_map.addControl(new ZoomControl());
			_map.addControl(new MapTypeControl());
			
			_map.setCenter(new LatLng(40.736072, -73.992062), 14, MapType.NORMAL_MAP_TYPE);
		}
	}
}

 

Didn't do much commenting here but the code should be pretty much self-explanatory. From here on you should be able to countinue on your own. 

 

P.S.: I belive you are using to different accounts for posting which is a little bit confusing. 

 

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.
Please use plain text.
Super Contributor
Meghasanghvi
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: how to invoke maps in Playbook

thanks for replay i do the steps which you told in your last post.

i get message in simulator that

Please check API key ,swf location,version and network availibity

Please use plain text.