Skip to content

[IDEA] GeoSpatial plugin tm-request-geolocation returns excessive decimal places #9789

@ericshulman

Description

@ericshulman

When using tm-request-geolocation, the returned latitude and longitude values can include 14 or more decimal places depending upon the browser's internal implementation of navigator.geolocation.getcurrentpostion(). However, a maximum 7 decimal places are needed for <1cm accuracy.

For reference:
0 Decimal Places: 111km (69 miles) – Accuracy: Country/Region
1 Decimal Place: 11.1km (6.9 miles) – Accuracy: Large City/District
2 Decimal Places: 1.11km (0.69 miles) – Accuracy: Neighborhood
3 Decimal Places: 111m (364 feet) – Accuracy: Street Level
4 Decimal Places: 11.1m (36 feet) – Accuracy: Accurate Street Level
5 Decimal Places: 1.11m (3.6 feet) – Accuracy: High-precision (e.g., precise location)
6 Decimal Places: 11.1cm (4.4 inches) – Accuracy: Extremely high (e.g., surveying)
7+ Decimal Places: <1cm – Accuracy: Micrometer-level (superfluous for GPS)

I suggest that tm-request-location automatically limit the returned latitude and longitude values to a maximum of 7 decimal places. Alternatively, the message could use a new maxdigits param to explicitly specify the maximum number of decimal digits desired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionableIssue is actionable and contributions (pull requests) are very welcomebasicBasic complexity; Low risk of backwards compatibility problems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions