Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Define custom areas within Google Maps Autocomplete

Dear community,

I am using maps autocomplete on my website to allow users to filter for a specific city (see screenshot below) Showcase of my Autocomplete UI

A lot of users are asking us to define custom areas which are widely recognized here in Sweden, such as for example "South of Sweden" or "North of Sweden". These are not officially recognized areas, and hence not available within the Google maps autocomplete. Ideally I would like to store these areas somehow and allow user to select them (either via Google autocomplete or just a normal dropdown field)

Example: South of Sweden

Hence I wanted to ask you guys what the best way to achieve this would be? Each searchable item has long/lat

Would best approach be to define the areas (North of Sweden, South of Sweden etc) as a set of long/lat polygons, and then display those "pre-defined" areas as a dropdown for the user to search within?

Note: We do not currentl allow our users to do map search as drawings like I did in example screenshot. That was just for illustrative purposes to describe the problem.

Any advice would be highly appreciated!

Comments