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: 27
Registered: ‎04-05-2011
My Device: playbook
My Carrier: moblie app developer

google map in mobile mxml project for playbook

When I use Google map in mobile mxml project for playbook , It takes several seconds (about 10s~30s) to load the view which inculde google map.
 Is it normal??


** when i pressed the button in view of "home"..it will hold several seconds (about 10s~30s) before go to the view of "googleMap" . and the app can't detect any action when loading to "googleMap" view.


the home view:

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
		actionBarVisible="false" tabBarVisible="false" title="Home">
			protected function button1_clickHandler(event:MouseEvent):void
				// TODO Auto-generated method stub

		<!-- Place non-visual elements (e.g., services, value objects) here -->
	<s:Button x="10" y="10" width="210" height="35" label="GoogleMap"

the view inculde googe map

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
		actionBarVisible="false" tabBarVisible="false" title="GooglMap">
			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.overlays.MarkerOptions;
			import com.google.maps.InfoWindowOptions;

			private function onMapReady(event:Event):void {
				this.map.setCenter(new LatLng(40.736072,-73.992062), 14, MapType.NORMAL_MAP_TYPE);
				var marker:Marker = new Marker(map.getCenter(), new MarkerOptions({draggable: false}));
				marker.openInfoWindow(new InfoWindowOptions({contentHTML:"<html><body><p>ddd</p><h1>My First Heading</h1><a href='url'>Link text</a></body></html>"}));

		<!-- Place non-visual elements (e.g., services, value objects) here -->
	<maps:Map xmlns:maps="com.google.maps.*"
			  id="map" x="317" y="10" width="643" height="434"
			  mapevent_mapready="onMapReady(event)" url="http://localhost" sensor="false"/>



Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: google map in mobile mxml project for playbook



from the threads in the past, google maps in the AIR takes a while to load (as ur estimation went). here is a thread you can use as a reference:




hope that clears things up. good luck!

J. Rab (Blog) (Twitter)
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman