Hi ,
I have a webapp running for quite some time made using sencha touch 1.1 .
I have used google map api and it was working fine on ios , android (samsung , htc) .
Recently it has stopped working on Samsung Android phones. It is still working on HTC.
I have used
Code:
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
a view mapPlaces.js
xyz.views.mapPlaces = new Ext.Map({
layout:'card',
id:'myMappp',
mapOptions : {
zoom : 12,
panControl: false,
streetViewControl: true,
mapTypeId : google.maps.MapTypeId.ROADMAP,
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.DEFAULT
},
zoomControl: true,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.SMALL
}
}
});
var marker = new google.maps.Marker({
position: new google.maps.LatLng(lat, lon),
title : name,
map: CardForYou.views.mapPlaces.map,
discount:discount,
icon: icon ,
description:description,
bild:bild,
fotos:fotos,
adress:adress,
street:street,
zip:zip,
city:city
});
markersArray.push(marker);
new google.maps.event.addListener(marker, 'mousedown', function(event) {
....
}
and then
mapOnSuccess = function(position) {
myLat = position.coords.latitude;
myLon = position.coords.longitude;
glob_Lat = myLat;
glob_Lon = myLon;
var myPosition = new google.maps.LatLng(myLat, myLon);
new google.maps.Marker({
position: myPosition,
title : 'My location',
map: xyz.views.mapPlaces.map,
icon:'images/my_location.png',
});
xyz.views.mapPlaces.update(myPosition);
loadDataPlaces(myLat, myLon, globRange);
};
now it is showing default location of california in samsung phones and not asking permission to use gps. I have done activating location services, clearing cache etc.
Update
I tried opening http://maps.google.com/ on the same phone and there also google maps could not get the current location. I also tried http://html5demos.com/geo
and it could also not get current position and failed.
Is this an HTML5 problem.