mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
fix(search): normalize geocoder bias across the antimeridian (#1272)
Keep geocoder viewport bias near the antimeridian and omit misleading wrapped viewboxes. Contribution by @asturksever.
This commit is contained in:
1 parent
ba292ce475
commit
a43ff8619e
6 files changed
+50
-7
No files matched your search
@@ -173,3 +173,12 @@ test('a viewport hint is sent only when every edge is a real coordinate', () =>
|
||||
`${JSON.stringify(bounds)} must not become a viewbox`,
|
||||
);
|
||||
});
|
||||
|
||||
test('wrapped viewports omit the Nominatim bias without rejecting the search', () => {
|
||||
assert.equal(nominatimViewboxFromBounds('-20,170|-10,-171'), null);
|
||||
assert.equal(nominatimViewboxFromBounds('50,175|60,-165'), null);
|
||||
assert.equal(
|
||||
nominatimViewboxFromBounds('-20,170|-10,180'),
|
||||
'170,-10,180,-20',
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user