diff options
Diffstat (limited to 'files/fr/web/api/navigator/geolocation/index.html')
| -rw-r--r-- | files/fr/web/api/navigator/geolocation/index.html | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/files/fr/web/api/navigator/geolocation/index.html b/files/fr/web/api/navigator/geolocation/index.html new file mode 100644 index 0000000000..d2bf92e515 --- /dev/null +++ b/files/fr/web/api/navigator/geolocation/index.html @@ -0,0 +1,106 @@ +--- +title: Navigator.geolocation +slug: Web/API/Navigator/geolocation +tags: + - API + - Géolocalisation API + - Navigateur + - Propriété + - Reference +translation_of: Web/API/Navigator/geolocation +--- +<div>{{APIRef("Geolocation API")}}</div> + +<p><strong><code>Navigator.geolocation</code></strong> est une propriété en lecture seule, qui retoune un objet {{domxref("Geolocation")}} donnant accès aux contenus web de localisation de l'appareil. Ceci permet à un site Internet ou à une application d'offrir des résultats personnalisés basés sur la localisation des utilisateurs.</p> + +<div class="note"> +<p><strong>Note:</strong> Pour des raisons de sécurité, quand une page web essaie d'accéder aux informations de localisation, l'utilisateur reçoit une notification qui lui demande la permission d'activer cette fonctionnalité. Chaque navigateur a sa propre politique et ses propres méthodes pour demander cette permission.</p> +</div> + +<h2 id="Syntaxe"><br> + Syntaxe</h2> + +<pre class="syntaxbox"><var>geo</var> = <var>navigator</var>.geolocation +</pre> + +<h2 id="Spécifications"><br> + Spécifications</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Spécification</th> + <th scope="col">Statut</th> + <th scope="col">Commentaire</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('Geolocation', '#navi-geo', 'Navigator.geolocation')}}</td> + <td>{{Spec2('Geolocation')}}</td> + <td>Initial definition</td> + </tr> + </tbody> +</table> + +<h2 id="Compatibilité_navigateur"><br> + Compatibilité navigateur</h2> + +<p>{{CompatibilityTable}}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>Basic support</td> + <td>5</td> + <td>{{CompatGeckoDesktop("1.9.1")}}</td> + <td>9</td> + <td>10.60<br> + {{CompatNo}} 15.0<br> + 16.0</td> + <td>5</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</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>Basic support</td> + <td>51</td> + <td>51</td> + <td>{{CompatGeckoMobile("4")}}</td> + <td>10</td> + <td>10.60</td> + <td>3.2</td> + </tr> + </tbody> +</table> +</div> + +<h2 id="Voir_aussi"><br> + Voir aussi</h2> + +<ul> + <li><a href="/en-US/docs/WebAPI/Using_geolocation">Utiliser la géolocalisation</a></li> +</ul> |
