mobile/user-location: Do not reload when switching between loc+sensor and loc-only

This commit is contained in:
fkloft
2013-12-23 20:35:19 +01:00
parent 7f82671276
commit 2823450857
6 changed files with 130 additions and 110 deletions

View File

@ -94,13 +94,25 @@ window.plugin.userLocation.onLocationChange = function(lat, lng) {
};
window.plugin.userLocation.onOrientationChange = function(direction) {
$(".container", window.plugin.userLocation.marker._icon)
.removeClass("circle")
.addClass("arrow")
.css({
"transform": "rotate(" + direction + "deg)",
"webkitTransform": "rotate(" + direction + "deg)"
});
var container = $(".container", window.plugin.userLocation.marker._icon);
if(direction === null) {
container
.removeClass("arrow")
.addClass("circle")
.css({
"transform": "",
"webkitTransform": ""
});
} else {
container
.removeClass("circle")
.addClass("arrow")
.css({
"transform": "rotate(" + direction + "deg)",
"webkitTransform": "rotate(" + direction + "deg)"
});
}
}
var setup = window.plugin.userLocation.setup;