Dynamic geolocation functionality

The user should be able to search for a location listed in my database on google maps.

However I cannot get the method to work.

Insert searchBox, then I would like to select dynamic choices to only reflect locations in my database, as oppose to geographic places which will return all locations on Google maps.

When selecting dynamic choices, Bubble’s not allowing me to search for the address field specified in my database. It’s only returning text values. Is there another way to achieve my goal?

In order to search based off of an address/location, your data type should use the field type of geographic address (not text).

So, if we’re looking at “Event” as the data type, it might have the following fields:

  • Event_name (field type: text)
  • Event_location (field type: geographic address)
  • Event_date (field type: date)
  • Etc…

In the search box, the user should be able to type in any geographic address they want. For example,. they may type in Brooklyn, NY, but your intent is to show events within a 20 mile radius of Brooklyn by default (So, keep this set to geographic places).

Then, your data source for your map will be based around a “List” of events that relate to that geographic area (similar to the screenshot below)


Dan (creator of LearnTo - 15+ hours of Bubble tutorials and live coaching)

2 Likes

Hi Dan,

Thanks that worked well!

How will you propose to include event_date and event_type with event_location to reflect relevant markers on the map. The event date doesn’t have to be the exact date, it can vary by say 10 days, but event type must be exact?
Your assistance is much appreciated!!

This preview of a lesson from LearnTo should help…

This topic was automatically closed after 70 days. New replies are no longer allowed.