--- title: Navigator.geolocation slug: Web/API/Navigator/geolocation tags: - API - Geolocation API - Navigator - Property - Reference - Secure context translation_of: Web/API/Navigator/geolocation ---
Navigator.geolocation
읽기 전용 속성은 웹에서 장치의 위치를 알아낼 때 사용할 수 있는 {{domxref("Geolocation")}} 객체를 반환합니다. 웹 사이트나 웹 앱은 위치정보를 사용해 결과 화면을 맞춤 설정할 수 있습니다.
참고: 보안 상의 문제로, 웹 페이지가 위치 정보에 접근을 시도하면 사용자에게 알림을 보내고 권한을 허용할지 묻습니다. 각 브라우저는 자신만의 권한 정책과 요청 방식을 가지고 있으므로 주의해야 합니다.
Specification | Status | Comment |
---|---|---|
{{SpecName('Geolocation', '#dom-navigator-geolocation', 'Navigator.geolocation')}} | {{Spec2('Geolocation')}} | Initial definition |
{{Compat("api.Navigator.geolocation")}}