From 4bb76df8965d83a31ed6c6ab5525a87421ccb287 Mon Sep 17 00:00:00 2001 From: Eason010212 <1371033826@qq.com> Date: Tue, 5 Sep 2023 20:35:42 +0800 Subject: [PATCH] fix geolocation --- js/MixIO.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/MixIO.js b/js/MixIO.js index 348a37d..4f256b4 100644 --- a/js/MixIO.js +++ b/js/MixIO.js @@ -7,6 +7,13 @@ curlong = 0 curlati = 0 +navigator.geolocation.getCurrentPosition(function(position){ + curlong = position.coords.longitude + curlati = position.coords.latitude +}, function(error){ + console.log(error) +}) + function MixIOLogicError(message){ this.message = message this.name = "MixIOLogicError"