Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using bounds not filtering suggests #496

Open
bayerlse opened this issue Feb 17, 2023 · 1 comment
Open

Using bounds not filtering suggests #496

bayerlse opened this issue Feb 17, 2023 · 1 comment

Comments

@bayerlse
Copy link

Short description

I am using bounds like:

import Geosuggest from 'react-geosuggest';

//...

<Geosuggest
        ref={geoSuggestEl}
        placeholder="placeholder"
        onSuggestSelect={onSuggestSelect}
        autoComplete="off"
        autoActivateFirstSuggest={true}
        country="de"
        ignoreEnter={false}
        bounds={bounds}
 />

where bounds defined as:

const southwest = new google.maps.LatLng(47.270111, 9.530952);
const northeast = new google.maps.LatLng(50.558835, 13.835972);
const bounds = new google.maps.LatLngBounds(southwest, northeast);

Expected results

I expected that by providing the boundary (bavaria), I am just getting suggestions within these
boundary.

Actual results

Instead of just getting suggestions within these boundary, I also get e.g. "New York" in my suggestions, shouldn't this be filtered out?

Reproduction steps

  1. Use provided code snippets from above
  2. Type in "New"
@plumdumpling
Copy link
Contributor

Hi @bayerlse!
I had a look at your issue, but couldn't reproduce it. With all the information you gave here, I get the following suggestions:

Bildschirmfoto 2023-08-09 um 12 31 20

There's no "New York" in the list.

Can you provide a more detailed example or link to a code playground to see this issue in action?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants