TIL 3(Geolocation API)

김민수·2024년 4월 18일
0
post-thumbnail

Geolocation API

사용자의 현재 위치를 가져오는 api


사용법

navigator.geolocation 을 통해 사용


현재위치 가져오기

getCurrentPosition()을 이용함
navigator.geolocation.getCurrentPosition(success, error, [options])


예시)

navigator.geolocation.getCurrentPosition(onGeoOk, onGeoError)


결과(이미지와 css등으로 꾸며본 결과)

profile
Hello~

0개의 댓글

관련 채용 정보