Skip to content

Autocomplete search box not limiting results to within map bounds #6

@metastew

Description

@metastew

I came across an issue in the Autocomplete portion of the course. I was running my autocomplete code to display pizza restaurants and noticed that when I typed in 'pizza', it would zoom the map all the way out to show North America continent and show international listings instead of inside NYC area. It worked fine if I typed in 'pizza NYC' though. At first I thought I had made a mistake in my code, so I copied over the code sample from github repo. Same thing happened again with the code from github.

It's my understanding that in the code, when you call searchBox.setBounds(map.getBounds()) in the code, it would display searchBox results to be within NYC area, not internationally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions