Adding conditional logic and legend to map component

Hi team,

I’m attempting to add conditional logic to change the background color of pins based on a custom field. If the custom field value is “Branch”, I’d like to make the pin blue and if the custom field value is “ATM”, I’d like to make the pin green. I’d also like to overlay a legend to note for users what these colors represent on the map. What’s the best way to accomplish this?

Best,
Josh

1 Like

I have a similar request, in my case i need to differentiate them by entity types ATMs and Locations

Hi @Lucas_Bonetti - this is technically possible today, and we are working on a guide so that you can implement this for your brand. We’ll follow up when the guide is ready.

Thanks,
Sam

Hello @Lucas_Bonetti - just circling back on your request here!

We have instructions on how to add custom map pins in our code examples repo, which you can find here. Please let me know if you have any questions as you implement this for your brand!

Best,
Sam

1 Like

Thanks Sam.

It does actually work

Awesome @Lucas_Bonetti - can you share a screenshot on this post once you have a final product with the legend included? Will be helpful for others to visualize going forward in reference to this post!

Thanks,
Sam

This is the final result.

Lucas B.

Thanks for this post, @Sam_Torres ! The instructions are super helpful. Are there updated instructions for the new full-page map vertical? I followed along and was able to create customize the map pins by vertical on the universal search, but not on the locations vertical search, which uses the new full-page map.

Thanks in advance,
Sherman

Hi @Sherman_Tabor - thanks for the note! We are wrapping up a new guide for the vertical full-page map and will have it posted in the Admin Code Snippets resource.

I will follow up on this post once the guide is available.

Awesome! Thanks, Sam.

Hey @Sam_Torres! The code snippet guide is awesome - it seems that previously the code snippet was for the original vertical map and now it has been updated for the vertical full page map, is that correct? I have a client that is fine with their original vertical map but would like the customized pins as described above - is this still possible and is that code snippet archived somewhere?

Hi @Garrrett_Prellberg here is the code snippet guide for the previous maps configuration.

Best,
Sam