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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 4
Registered: ‎07-10-2012
My Device: 9800
My Carrier: Airtel
Accepted Solution

maps.google.com/maps not opening on Blackberry

We came across one issue on BlackBerry OS6 & OS7 that Google maps are not working as expected. As per current implementation, we are sending user to http://maps.google.com/maps

when user submits “Get Direction” button to show maps. Somehow, Blackberry OS6 is redirecting this URL to something different .

 

For example , If I am trying to open URL  http://maps.google.com/maps?hl=en&ie=UTF8&t=k&ll=40.52923,-79.820223&spn=0.014972,0.041499&z=15,

It is automatically getting redirected to http://maps.google.com/m/local?hl=en&ie=UTF8&ll=40.530176,-79.826746&spn=0.016244,0.046649&t=k&z=15 - i.e. the Mobile Local maps web service.

 

Please provide fix is possible.

 

Note: There are 2 type of views in blackberry when accessing google.com

1. Mobile view

2. Classic view

 Maps works fine on classic view but there is no way to set is as default view

Highlighted
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: maps.google.com/maps not opening on Blackberry

This behavior is caused by Google's servers detecting the BlackBerry as a mobile device and delivering the targeted URL as a result.  Likely this is based on the user-agent header being send during the HTTP request for that resource.  Note: there is no way to override that UA value from the device.

 

Question: do you have to use Google Maps?  Have you considered any alternatives, such as:

http://devblog.blackberry.com/2012/05/lightweight-maps-for-mobile-part-1/

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
Posts: 4
Registered: ‎07-10-2012
My Device: 9800
My Carrier: Airtel

Re: maps.google.com/maps not opening on Blackberry

I can not change the implementaion as website is about to launch now!!!

 

I am able to find solution for it.

 

I passed parameter "ui=maps" and now google maps are opening well.

 

Thanks for your support.

 

-Ankur Garg 

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: maps.google.com/maps not opening on Blackberry

Glad you found a solution.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
Posts: 2
Registered: ‎06-09-2009
My Device: Not Specified

Re: maps.google.com/maps not opening on Blackberry

Hi,

I am having the same issue right .

I would like to know where you added  parameter "ui=maps" ?

In my code i am using : <script src="jquery.ui.map.min.js"></script>

and  $('#map_canvas_1').gmap({'center': getLatLng(), 'zoom': 16});

 

function getLatLng() {
     // GpsIt();
      var geocoder = new google.maps.Geocoder();
     // var latlng = new google.maps.LatLng(Lat, Lng);
      var latlng = new google.maps.LatLng(40.758195, -73.980878);
      geocoder.geocode({'latLng': latlng}, function(results, status) {
                     if (status == google.maps.GeocoderStatus.OK) {
                        if (results[0]){
                           $('#map_canvas_1').gmap('addMarker', {'position': latlng, 'title': 'Current Location'});
                           $("#from").val(results[0].formatted_address);
                        }
                        } else {
                           alert("Geocoder failed due to: " + status);
                           $('#map_canvas_1').gmap('addMarker', {'position': latlng, 'title': 'DDS Location'});
                     $("#from").val('64 West 48 St,New York,NY 10036');
                        }
                     });
      return latlng;
     }

 

Thanks,

 

New Contributor
Posts: 4
Registered: ‎07-10-2012
My Device: 9800
My Carrier: Airtel

Re: maps.google.com/maps not opening on Blackberry

I was trying to open maps.google.com/maps  Like Below URL

 

http://maps.google.com/maps?saddr=Piscataway%20Township,%20NJ%2008854,%20USA&daddr=1303%20CENTENIAL%...

 

Above URL was not opening in blackerry, it was getting rediercted to something which was not showing maps.

 

I added "ui=maps" to this URL.

 

I hope this helps

 

-Ankur