aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/api/navigator/geolocation/index.html
blob: 5bc748ee479455efd82db16636885f6321ee5649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
title: Navigator.geolocation
slug: Web/API/Navigator/geolocation
translation_of: Web/API/Navigator/geolocation
---
<p>{{ APIRef("Geolocation API") }}</p>

<p>Свойство <strong><code>Navigator.geolocation</code></strong> только для чтения, возвращающие объект {{domxref("Geolocation")}}, который дает веб контенту доступ к месторасположению устройства. Это позволяет веб-сайту или приложению предложить индивидуальный результат основанный на месторасположении пользователя.</p>

<div class="note">
<p><span id="result_box" lang="ru"><strong><span class="hps">Примечание</span><span>:</span> </strong><span class="hps">По соображениям</span> <span class="hps">безопасности</span><span>,</span> <span class="hps">когда</span> <span class="hps">веб-страница</span> <span class="hps">пытается</span> <span class="hps">получить доступ к информации</span> <span class="hps">о местоположении,</span> <span class="hps">пользователь получает уведомление</span> <span class="hps">с просьбой</span> <span class="hps">дать разрешение</span><span>.</span></span><span id="result_box" lang="ru"><span class="hps"> Помните, что</span> <span class="hps">каждый браузер</span> <span class="hps">имеет свои</span> <span class="hps">собственные правила</span> <span class="hps">и методы</span> <span class="hps">для запроса</span> <span class="hps">этого разрешения</span><span>.</span></span></p>
</div>

<h2 id="Синтаксис">Синтаксис</h2>

<pre class="syntaxbox"><em>geo</em> = <em>navigator</em>.geolocation
</pre>

<h2 id="Спецификации">Спецификации</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Спецификация</th>
   <th scope="col">Статус</th>
   <th scope="col">Коментарий</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('Geolocation', '#navi-geo', 'Navigator.geolocation')}}</td>
   <td>{{Spec2('Geolocation')}}</td>
   <td>Изначальная спецификация</td>
  </tr>
 </tbody>
</table>

<h2 id="Доступность_в_браузере">Доступность в браузере</h2>

<p>{{ CompatibilityTable() }}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Свойство</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Базовая поддержка</td>
   <td>5</td>
   <td>{{CompatGeckoDesktop("1.9.1")}}</td>
   <td>9</td>
   <td>10.60<br>
    Removed in 15.0<br>
    Reintroduced in 16.0</td>
   <td>5</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Свойство</th>
   <th>Android</th>
   <th>Chrome for Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Базовая поддержка</td>
   <td>{{CompatUnknown()}}</td>
   <td>{{CompatUnknown()}}</td>
   <td>{{CompatGeckoMobile("4")}}</td>
   <td>{{CompatUnknown()}}</td>
   <td>10.60</td>
   <td>{{CompatUnknown()}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="Смотрите_также">Смотрите также</h2>

<ul>
 <li><a href="/en-US/docs/WebAPI/Using_geolocation" title="/en-US/docs/WebAPI/Using_geolocation">Использование геолокации.</a></li>
</ul>