Using Name Text Field with Google Map?

I want to be able to show a map to a logged in user of the nearest company name I pass to it from a prior screen. I want it to search markers by name, as I do not have the addresses for all of the companies entered. I have the magic text set to current sponsor name (text). I tested it with passing an address and that works, so I know the API and map feature works, but just can’t get it to work passing a text Name property. Am I doing something wrong?


Hi @apreston48

I don’t quite follow. Can you explain what you want it to do with actual example results.
In your case what is a sponsor?

Thanks @Rozza, it’s an app that users can use to find the sponsors of their favorite sports team. I have a screen that lists the sponsors per team. A user can click on an icon by the sponsor’s name (ex. Capital One Bank) and be taking to this map screen where they can see that sponsor’s location near them. For example, say a sponsor is Capital One Bank, I want the map to show locations of “Capital One Bank” near them with marker one the map. To do this, I want the map to use the text field called, Name, in my Sponsor collection. Am I doing something wrong?

I would start with data structure as follows.

teams
sponsors
sponsor_locations

Then your map component list settings look a bit like this

There are some things to consider, like a sponsor could sponsor more than one team.
Perhaps you want to use an external collection of sponsor_locations, so you don’t need to maintain one :+1:

1-1 help
Shout me a coffee :point_right: :coffee: = :grinning:

Thanks! I will give this a try. I do have collections for sponsors and teams, but not for locations. And, I like the thought of clicking them to update the input that feeds the map. Appreciate the help.

No worries. It’s a lot of data to maintain so I would be tempted to hook into a Google API by means of an external collection, to give you all your sponsor_locations. Good luck with it :+1:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.