1. A concise explanation of the problem you're experiencing.
I am running Cesium v1.4.1 inside Cordova, my application is picking up the correct position from the device, however the negative value for latitude is ignored and the camera ends up positioned in the wrong hemisphere.
I have tried casting to a Number, two significant figures and even reversing the parameter to no avail.
Thanks in advance
Duncan
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
function flyToPosition(pos) {
var latitude = Number(pos.coords.latitude).toFixed(2);
var longitude = Number(pos.coords.longitude)toFixed(2);
console.log(latitude);
console.log(longitude);
viewer.camera.flyTo({
destination: Cesium.Cartesian3.fromDegrees(latitude, longitude, 4000000),
duration: 0
});
}
var options = {
enableHighAccuracy: true,
maximumAge: 3600000
}
function onError(error) {
alert('code: ' + error.code + '\n' + 'message: ' + error.message + '\n');
}
navigator.geolocation.getCurrentPosition(flyToPosition, onError, options);
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I would like to have the app start out above the current location for the user.
4. The Cesium version you're using, your operating system and browser.
Cesium v1.41, Android 7.0 & Chrome 65.0.3325.109