07-10-2012 09:49 AM
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=4
It is automatically getting redirected to http://maps.google.com/m/local?hl=en&ie=UTF8&ll=40
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
Solved! Go to Solution.
07-13-2012 01:41 PM
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-
07-14-2012 03:20 AM
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
07-16-2012 09:43 AM
Glad you found a solution.
08-02-2012 03:39 PM
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,
08-03-2012 10:20 AM
I was trying to open maps.google.com/maps Like Below URL
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