From c05efa8d7ae464235cf83d7c0956e42dc6974103 Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:14 +0200 Subject: move *.html to *.md --- files/fr/web/api/geolocation/clearwatch/index.html | 89 ---------------------- files/fr/web/api/geolocation/clearwatch/index.md | 89 ++++++++++++++++++++++ 2 files changed, 89 insertions(+), 89 deletions(-) delete mode 100644 files/fr/web/api/geolocation/clearwatch/index.html create mode 100644 files/fr/web/api/geolocation/clearwatch/index.md (limited to 'files/fr/web/api/geolocation/clearwatch') diff --git a/files/fr/web/api/geolocation/clearwatch/index.html b/files/fr/web/api/geolocation/clearwatch/index.html deleted file mode 100644 index c4952eb7cf..0000000000 --- a/files/fr/web/api/geolocation/clearwatch/index.html +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Geolocation.clearWatch() -slug: Web/API/Geolocation/clearWatch -tags: - - API - - Besoin d'exemple - - Géolocalisation - - Géolocalisation API - - Méthode - - Reference -translation_of: Web/API/Geolocation/clearWatch ---- -

{{ APIref("Geolocation API") }}

- -

La méthode Geolocation.clearWatch() est utilisée pour libérer les ressources de localisation/erreur créées antérieurement en utilisant {{domxref("Geolocation.watchPosition()")}}.

- -

Syntaxe

- -
navigator.geolocation.clearWatch(id);
- -

Paramètres

- -
-
id
-
Le nombre ID est donné par la méthode qui permet la localisation : {{domxref("Geolocation.watchPosition()")}} ; ressource que vous désirez supprimer.
-
- -

Exemple

- -
var id, target, option;
-
-function success(pos) {
-  var crd = pos.coords;
-
-  if (target.latitude === crd.latitude && target.longitude === crd.longitude) {
-    console.log('Congratulation, you reach the target');
-    navigator.geolocation.clearWatch(id);
-  }
-};
-
-function error(err) {
-  console.warn('ERROR(' + err.code + '): ' + err.message);
-};
-
-target = {
-  latitude : 0,
-  longitude: 0,
-}
-
-options = {
-  enableHighAccuracy: false,
-  timeout: 5000,
-  maximumAge: 0
-};
-
-id = navigator.geolocation.watchPosition(success, error, options);
-
- -

Spécifications

- - - - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{SpecName('Geolocation')}}{{Spec2('Geolocation')}}Spécification initiale.
- -

Compatibilité des navigateurs

- -

{{Compat("api.Geolocation.clearWatch")}}

- -

Voir aussi

- - diff --git a/files/fr/web/api/geolocation/clearwatch/index.md b/files/fr/web/api/geolocation/clearwatch/index.md new file mode 100644 index 0000000000..c4952eb7cf --- /dev/null +++ b/files/fr/web/api/geolocation/clearwatch/index.md @@ -0,0 +1,89 @@ +--- +title: Geolocation.clearWatch() +slug: Web/API/Geolocation/clearWatch +tags: + - API + - Besoin d'exemple + - Géolocalisation + - Géolocalisation API + - Méthode + - Reference +translation_of: Web/API/Geolocation/clearWatch +--- +

{{ APIref("Geolocation API") }}

+ +

La méthode Geolocation.clearWatch() est utilisée pour libérer les ressources de localisation/erreur créées antérieurement en utilisant {{domxref("Geolocation.watchPosition()")}}.

+ +

Syntaxe

+ +
navigator.geolocation.clearWatch(id);
+ +

Paramètres

+ +
+
id
+
Le nombre ID est donné par la méthode qui permet la localisation : {{domxref("Geolocation.watchPosition()")}} ; ressource que vous désirez supprimer.
+
+ +

Exemple

+ +
var id, target, option;
+
+function success(pos) {
+  var crd = pos.coords;
+
+  if (target.latitude === crd.latitude && target.longitude === crd.longitude) {
+    console.log('Congratulation, you reach the target');
+    navigator.geolocation.clearWatch(id);
+  }
+};
+
+function error(err) {
+  console.warn('ERROR(' + err.code + '): ' + err.message);
+};
+
+target = {
+  latitude : 0,
+  longitude: 0,
+}
+
+options = {
+  enableHighAccuracy: false,
+  timeout: 5000,
+  maximumAge: 0
+};
+
+id = navigator.geolocation.watchPosition(success, error, options);
+
+ +

Spécifications

+ + + + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName('Geolocation')}}{{Spec2('Geolocation')}}Spécification initiale.
+ +

Compatibilité des navigateurs

+ +

{{Compat("api.Geolocation.clearWatch")}}

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf