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
Developer
Posts: 128
Registered: ‎08-01-2008
My Device: Bold 9900, 9810, 9780, 9650 and so many others
My Carrier: T-Mobile

Google Maps Javascript API v3 and BlackBerry

Well it doesnt seem that the new Google Maps API is suppored 'officially' on BlackBerry. Still i used the code found on Google's web site in their tutorial section and created a simple web page. It loads great in IE but not on my Bold.

 

The page is here: http://www.3i-consulting.com/google2.html 

 

Has anyone used Google Maps API (v2 or v3) on a Blackberry and got it working?

 

Regards,

 

Alon

Guru I
Posts: 19,020
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Google Maps Javascript API v3 and BlackBerry

what is the OS on your device ?



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Developer
Posts: 128
Registered: ‎08-01-2008
My Device: Bold 9900, 9810, 9780, 9650 and so many others
My Carrier: T-Mobile

Re: Google Maps Javascript API v3 and BlackBerry

Hi Alex,


I am running a BB Bold with 4.6.0234

 

I also checked and Javascript is enabled.


Regards,

 

Alon

Guru I
Posts: 19,020
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Google Maps Javascript API v3 and BlackBerry

I tried on my Firefox 3 (desktop) -> I see the west coast of US.
I tried on my Storm (4.7) -> white page.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Developer
Posts: 128
Registered: ‎08-01-2008
My Device: Bold 9900, 9810, 9780, 9650 and so many others
My Carrier: T-Mobile

Re: Google Maps Javascript API v3 and BlackBerry

Thanks Alex. It is a shame they dont support the BlackBerry
Guru I
Posts: 19,020
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Google Maps Javascript API v3 and BlackBerry


araskin wrote:
Thanks Alex. It is a shame they dont support the BlackBerry
in my humble opinion, it's the other way around : the BlackBerry Browser does not yet support enough AJAX to be able to deal with that Google API.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Developer
Posts: 117
Registered: ‎07-16-2008
My Device: Not Specified

Re: Google Maps Javascript API v3 and BlackBerry

I've been trying to do the same thing (makes Google Maps API v2/v3 works on my Storm 9530 with the Blackberry Browser) without any success.

 

I also think that Google is not supporting the Blackberry browser cause it's too limited to handle all the Javascript/AJAX (even if Javascript is turned on).

 

The official response from the Google Support was to use the Google Maps Static API v2 instead, found here:

http://code.google.com/apis/maps/documentation/staticmaps/

 

Not great... but at least a static map can be displayed.

Highlighted
New Developer
Posts: 39
Registered: ‎02-24-2011
My Device: Not Specified
My Carrier: Verizon

Re: Google Maps Javascript API v3 and BlackBerry

Hello friends,

 

Even I used the code on this site:  http://www.3i-consulting.com/google2.html  and pulled it into a  browserfield by 

using myBrowserField.requestContent("http://www.3i-consulting.com/google2.html ");

the only changes I did to the code are:

 

mapcanvas 

 

<div id="map_canvas" style="width:320px; height:240px"></div> 

 

and set  user-scalable=yes" />  instead of "no"

 

Also to mark a specific location I changed the code to

 

 

<html> 
<head> 
<meta name="viewport" content="initial-scale=1.0, user-scalable=yes" /> 
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> 
<script type="text/javascript"> 
  function initialize() {
   
   var my_loc = new google.maps.LatLng(33.714657, -117.933223);
    var myOptions = {
      zoom: 8,
      center: my_loc,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
   var marker = new google.maps.Marker({position: my_loc,	map: map,	title:"destination" }); 
    marker.setMap(map);
  
  }
 
</script> 
</head> 
<body onload="initialize()"> 
  <div id="map_canvas" style="width:320px; height:240px"></div> 
</body> 
</html>

 

 

The map with the "my_loc" marked shows fine on Torch but when I tried the same code on Curve 9300 OS 5.0, the marker is not displayed though the map is centered at the correct location.Smiley Sad

 

Any idea what might be going wrong??

 

Thanks!