I am trying to build a web app where it uses Airtable Data that connects to a Map, where I can see bunch of location or markers generated from Airtable that I configured on a map.
The question - First, does the map element have features or I could possibly display a multiple data (like basic information of a person or appointment) when clicking the marker? Second, does it have a features or ways that I could implement a filter for markers that displayed on a Map? For example you can filter by assigned users by clicking the name or filter by cities, it could be a button or text. Lastly, I am not sure if the map has group pin on markers.
Any help from you guys would be appreciated. Thank you.
I really appreciate your response and thank you. Below is my response.
I actually tried that one using the data pulled from Airtable Database. But unfortunately I wasn’t able to get/show multiple data that I wanted, only the names that I could get. Please see the image below.
That’s great news. I actually want to implement that but when I tried I couldn’t see that option or features on map configuration. Can you please give me a relevant documentation or any similar samples that I could look for?
Hi @thisismetrying@Chan
One way to display any content that you want in the marker content is to create a custom one
Custom marker content
Create an object variable currentMarker
Create a new workflow on the map instance. Select the On marker click
In that workflow, you have access to the Event content that contains the rawData (all information retrieved from your source) and the domEvent that indicate where the marker is positionned. You can affect the whole Event object to your variable.
Create a card, located in the same container as the map instance. Give it a position absolute and bind the Left an Top position respectively to the x and y value of the domEvent of your currentMarker variable.
Add content to your card, and bind any content that you want.
PS: That can create unwanted behavior like when the user moves the map or on screen resize. Might be a way to fix that.
If you still strungle with that, I can put out a step-by-step video to show you how to do this
If you are not restricted to using Google Map, I would recommend using the Mapbox integration which is easier to play with.
With it you can access the instance and use mapbox methods.
And to achieve a zoom to a location, you could use the flyTo combined with a zoomTo.
You can use those functions with custom code by targeting the instance