8000 Geofire querying data totally out of range for radius zero · Issue #265 · firebase/geofire-js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Geofire querying data totally out of range for radius zero #265
Open
@gutoamg

Description

@gutoamg

Version info

Firebase: V8 Modular (using cloud functions)

GeoFire: V6.0.0

Test case

If you try to query documents around [pointLatitude, pointLongitude] with radiusInM = 0 the query returns unexpected documents totally out of range(and not because of Geohashing approximations).

The radiusInM = 0 may happen if you're querying inside a loop, which is not so uncommon.

Steps to reproduce

Use geofire.geohashQueryBounds(center, radiusInM) as specified in the Firebase documentation for Firestore and assign radiusInM = 0.

Expected behavior

Would return the documents within the given radius around a center point [pointLatitude, pointLongitude].

Actual behavior

Returns many other documents completely out of range and may result in high costs depending on your application.
If you have documents around the given center but away from the radius, the query may still return them.

If I query for the same center but with a slightly bigger radius the query works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0