Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

Google Map Block - Searchable

cancel
Showing results for 
Search instead for 
Did you mean: 
Melanie_LaDue
5 - Automation Enthusiast
5 - Automation Enthusiast

I have the Maps block enabled in my table, but need to be able to search the map with an address and have it show the “nearest” locations from my database on the map. Is this possible? PLEASE say it is! ! Basically, it’s what I do in Google Maps, but can’t seem to figure out how to get a search box onto my Maps Block map!

13 Comments
Elias_Gomez_Sai
13 - Mars
13 - Mars

You can add a fake Record with your location and select it on the map :grinning_face_with_smiling_eyes:

Melanie_LaDue
5 - Automation Enthusiast
5 - Automation Enthusiast

Appreciate this suggestion! What I actually need to do is be able to search addresses that are NOT in my database to see what locations IN the database are closest to the address I’m searching up. I just need a search box for the map in the map block.

drassi
6 - Interface Innovator
6 - Interface Innovator

I totally agree with this product suggestion! The Maps Block is simple and great for exposing location databases, however in the somewhat common use case where a user needs to find records located near their current physical location, the block doesn’t provide much help—the user needs to navigate the map location and zoom from the overall starting map down to their specific location to do this, and has no other way to “search” the map.

A very small addition that would solve my use case of a user finding nearby records would be to simply query the HTML5 Geolocation API for the user’s current location and if they accept the request, navigate the map from the global view down to feature their current location and zoom so that a few nearest neighbor records are shown.

The Geolocation API getCurrentPosition function is very well supported by all major browsers and used specifically in Google Maps and other mapping products to solve this problem very simply!

Scott_Thomas
5 - Automation Enthusiast
5 - Automation Enthusiast

@Melanie_LaDue @drassi @Elias_Gomez_Sainz

Did you guys ever find a way to do this or a workaround? Trying to figure out a way to do this now.
Thanks

drassi
6 - Interface Innovator
6 - Interface Innovator

Nothing like this was added unfortunately : (

You likely have to create a wrapper, where you rebuild a map and just import coordinates from the airtable geocode data. It’s too bad

Bill_French
17 - Neptune
17 - Neptune

Here’s how to resolve this (somewhat) today: In a script block…

  • First, an assumption; this app is running in Airtable on a notebook, ergo - the need to run this from a variety of unknown future locations.

  • Create a “search” UI that prompts for current location. This could be a call to a service that extracts lat/lng based on IP data and/or other metrics. Since the DOM is not accessible from Script Blocks, you cannot use HTML5’s knowledge, but you can mimic this ability in other ways.

  • Use the current lat/lng to find nearby records based on distance geometry (fully possible in Script Blocks).

  • Collect the list of nearby items and display as a result set in the Block itself (as a table) with links to each associated (nearby) record. You could also flag the actual records in some way to push them into a search results view.

Scott_Thomas
5 - Automation Enthusiast
5 - Automation Enthusiast

@Bill.French
I need a way to search the map block for a new address that is not currently in my Airtable records. Basically just a search bar that drops a pin for the address I entered.

The use case would be to say that I am trying to book a new order, and I need to determine which orders are close by this new orders address, to determine what worker to give it to.

I don’t know for sure if that is possible with the scripting block, but I don’t think it is. Do you know if there is a way around this?

Thanks

Bill_French
17 - Neptune
17 - Neptune

Okay - so let’s unpack this more — enter an address - that really doesn’t need a map, does it?

Given an address, a Script Block (while challenged to display a map) can still compute it’s relative nearby-ness to other known locations.

Question - in your process, is it possible to determine who to give the order to after the order has been placed? (i.e., why not just take orders and have a smart API process that figures all this stuff out behind the scenes?)

Scott_Thomas
5 - Automation Enthusiast
5 - Automation Enthusiast

Hmmm good call. That may be a better way to go about this actually.

Basically an order is placed online or over the phone, then when the order is inputted into Airtable we assign a worker at that time.

Maybe the best way for me to go about this is to enter the new address in a scripting block, and then from my current records, it will display the top 5 closest orders to the new address or something along those lines.

Bill_French
17 - Neptune
17 - Neptune

Why do anything in a block? I may be missing something, but my inclination is to build a smart(er) system that doesn’t need human decision points (if at all possible) and even if there are some ambiguities with certain orders, treat those as process exceptions and provide a way to introduce human assistance when and only when needed through alerts and such.

Yes - this is entirely possible in a Script Block - a simple utility that lists the closest orders and selection links that perform a matching or linking process or whatever is needed.