-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
Looking at your welcome page, it's clear you see value in queries for maps, but there is some friction in this library when it comes to these things (#1765).
Other libraries (eg. Parse, MongoDB) have the concept of points with coordinates, with operators that make these kind of queries pretty easy.
I'm proposing a RealmGeoPoint, with latitude and longitude (maybe altitude, I can't see a use for that), with a set of operators to apply on the RealmQuery.
Possible operators:
- .inRange(String fieldName, LatLng origin, double range)
- .inBounds(String fieldName, LatLngBounds bounds)
- .orderByDistance(String fieldName, LatLng origin)
- .closest(String fieldName, LatLng origin)
- .farthest(String fieldName, LatLng origin)
I guess this could be even better if these comes from core, but (as we say here) it's not always Christmas.