验证中...
Languages: Clojure
Categories: Web开发技术
Latest update 2019-01-18 07:12
geo location
Raw Copy
(defn error-callbak [error] (prn "errors"))
(defn success-callback [position] (prn (.-longitude js/position.coords) " " (.-latitude js/position.coords)))
(def geo (.-geolocation js/navigator))
(.getCurrentPosition geo success-callback error-callback #js {:enableHighAccuracy true, :timeout 5000, :maximumAge 3000})

Comment list( 0 )

You need to Sign in for post a comment

Help Search