We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27fa7a1 commit 7b3afa1Copy full SHA for 7b3afa1
playgrounds/geo-javascript/setup/settings.json
@@ -1,12 +1,4 @@
1
{
2
- "rankingRules": [
3
- "words",
4
- "typo",
5
- "proximity",
6
- "attribute",
7
- "sort",
8
- "exactness"
9
- ],
10
"filterableAttributes": [
11
"_geo"
12
],
src/utils/geographic.ts
@@ -51,8 +51,13 @@ export function middleGeoPoints(
51
let lng3 = Math.atan2(y, x)
52
let lat3 = Math.atan2(z, Hyp)
53
54
- lat3 = rad2degr(lat3)
55
- lng3 = rad2degr(lng3)
+ if (lng1 < lng2 || (lng1 > lng2 && lng1 > Math.PI && lng2 < -Math.PI)) {
+ lat3 = lat3 + Math.PI
56
+ lng3 = lng3 + Math.PI
57
+ } else {
58
+ lat3 = rad2degr(lat3)
59
+ lng3 = rad2degr(lng3)
60
+ }
61
62
if (
63
Math.abs(x) < Math.pow(10, -9) &&
0 commit comments