1a47b92d by ex

查看Android的GPS

1 parent d197998b
......@@ -76,7 +76,7 @@ AppClient.prototype.getGPS = function (jsonStr, callback) {
var isRes = false
if(this.isAndroid) {
var toNonExponential = function (num) {
var m = num.toExponential().match(/\d(?:\.(\d*))?E([+-]\d+)/);
var m = num.toExponential().match(/\d(?:\.(\d*))?e([+-]\d+)/);
return num.toFixed(Math.max(0, (m[1] || '').length - m[2]));
}
......@@ -92,8 +92,6 @@ AppClient.prototype.getGPS = function (jsonStr, callback) {
longitude = arr[1].split('=')[1]
latitude = toNonExponential(latitude)
longitude = toNonExponential(longitude)
layer.open({
content: latitude
})
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!