@morpheus/plugin-location
패키지에서 제공되는 모듈
Before M.location.current
현재 위치(위도, 경도)를 가져옵니다.
Parameters
options
(optional)
Object
number
number
Return
Promise<Object>
"SUCCESS"
| "FAILE"
string
string
string
string
Usage
import { getCurrentPosition } from '@morpheus/plugin-location'
getCurrentPosition({
timeout: 10000,
maximumAge: 5000
}).then(result => {
if (result.status === 'SUCCESS') {
console.log('현재 위치:', result.coords.latitude, result.coords.longitude);
} else {
console.error('위치 가져오기 실패:', result.message);
}
})