This commit is contained in:
Philipp Schaefer
2014-07-16 11:20:27 +02:00
parent 7c85e7247b
commit 4781ea9627
5 changed files with 21 additions and 6 deletions

View File

@ -75,7 +75,7 @@ window.plugin.userLocation.onZoomEnd = function() {
}
};
window.plugin.userLocation.locate = function(lat, lng, accuracy) {
window.plugin.userLocation.locate = function(lat, lng, accuracy, persistentZoom) {
if(window.plugin.userLocation.follow) {
window.plugin.userLocation.follow = false;
if(typeof android !== 'undefined' && android && android.setFollowMode)
@ -94,7 +94,7 @@ window.plugin.userLocation.locate = function(lat, lng, accuracy) {
// an extremely close view is pretty pointless (especially with maps that support zoom level 20+)
// so limit to 17 (enough to see all portals)
zoom = Math.min(zoom,17);
zoom = (persistentZoom) ? map.getZoom() : Math.min(zoom,17);
if(window.map.getCenter().distanceTo(latlng) < 10) {
window.plugin.userLocation.follow = true;