From 525492bb537af87826102fc525949eb1679b68eb Mon Sep 17 00:00:00 2001 From: ghybs Date: Wed, 12 Jun 2019 11:20:38 +0400 Subject: [PATCH] docs(tutorial): fix mobile locate accuracy snippey (#6693) Following PR #6140, the code snippet of mobile tutorial for "locationfound" event needs to be corrected accordingly. --- docs/examples/mobile/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/mobile/index.md b/docs/examples/mobile/index.md index 35650a359..2b8e497ed 100644 --- a/docs/examples/mobile/index.md +++ b/docs/examples/mobile/index.md @@ -47,7 +47,7 @@ Leaflet has a very handy shortcut for zooming the map view to the detected locat Here we specify 16 as the maximum zoom when setting the map view automatically. As soon as the user agrees to share its location and it's detected by the browser, the map will set the view to it. Now we have a working fullscreen mobile map! But what if we need to do something after the geolocation completed? Here's what the `locationfound` and `locationerror` events are for. Let's for example add a marker in the detected location, showing accuracy in a popup, by adding an event listener to `locationfound` event before the `locateAndSetView` call: function onLocationFound(e) { - var radius = e.accuracy / 2; + var radius = e.accuracy; L.marker(e.latlng).addTo(map) .bindPopup("You are within " + radius + " meters from this point").openPopup();