Skip to content

Commit 1d4ebfa

Browse files
committed
Moved the selected-at() tip up
1 parent 49243be commit 1d4ebfa

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/form-question-types.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,6 +1495,14 @@ Captures the current geolocation from the device. The location is displayed in d
14951495

14961496
This question type shows a dialog with the current accuracy and lets the data collector decide when to capture the point. For capturing location without data collector intervention, see :ref:`start-geopoint <metadata-start-geopoint>`. For a geopoint with a user-selected location, see :ref:`placement-map <placement-map-widget>`.
14971497

1498+
.. tip::
1499+
1500+
You can use :func:`selected-at()` to require geopoints meet a particular threshold. For example, if you need points with an accuracy better than 10 meters, use this constraint:
1501+
1502+
`selected-at(${geopoint_widget}, 3) < 10`.
1503+
1504+
The ``3`` in the above constraint references accuracy, the fourth space-separated value in the `geopoint data type <https://getodk.github.io/xforms-spec/#data-types>`_. The `selected-at` function uses 0-based indexing so you can use ``0`` to reference latitude, ``1`` for longitude, and ``2`` for altitude.
1505+
14981506
.. rubric:: XLSForm with optional parameters
14991507

15001508
.. csv-table:: survey
@@ -1523,14 +1531,6 @@ You can also train data collectors to use time elapsed to take some action. For
15231531

15241532
.. _accuracy-constraint:
15251533

1526-
.. tip::
1527-
1528-
You can use :func:`selected-at()` to require geopoints meet a particular threshold. For example, if you need points with an accuracy better than 10 meters, use this constraint:
1529-
1530-
`selected-at(${geopoint_widget}, 3) < 10`.
1531-
1532-
The ``3`` in the above constraint references accuracy, the fourth space-separated value in the `geopoint data type <https://getodk.github.io/xforms-spec/#data-types>`_. The `selected-at` function uses 0-based indexing so you can use ``0`` to reference latitude, ``1`` for longitude, and ``2`` for altitude.
1533-
15341534
.. tip::
15351535

15361536
If you rely on mock locations, keep in mind that only GPS can be spoofed. The system may still retrieve real location data from WI-FI or cellular networks, which can override the mock location and as a result, deliver a mix of real and fake location data. To avoid this, go to ``Android Settings`` > ``Location`` and turn off ``Improve location accuracy``. This forces the device to use only GPS, ensuring your mock location is applied consistently.

0 commit comments

Comments
 (0)