You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a collection of objects that happens to have geographic coordinates. I want to sort them by distance and used this method before, and mapped the output to restore the properties, adding distance:
The 3.0 version changes the input for that method so that the only relevant properties are the coordinates. I couldn't find an example of what a code that uses this method achieves now.
Is the purpose of orderByDistance different? Should I sort my collection myself using getDistance as orderByDistance does internally?
The text was updated successfully, but these errors were encountered:
Same problem here. Almost all of our use cases of orderByDistance use the actual distance values so this method becomes redundant.
Another problem with the new changes is that the output is typed as GeolibInputCoordinates[] even though it outputs the original objects passed in to coords. Even if you don't want to use the actual distance values, you wont be able to reference any other values in your original object without casting it back. A better type would be something like
I have a collection of objects that happens to have geographic coordinates. I want to sort them by distance and used this method before, and mapped the output to restore the properties, adding
distance
:The 3.0 version changes the input for that method so that the only relevant properties are the coordinates. I couldn't find an example of what a code that uses this method achieves now.
Is the purpose of
orderByDistance
different? Should I sort my collection myself usinggetDistance
asorderByDistance
does internally?The text was updated successfully, but these errors were encountered: