Pinpoint Map Location in Salesforce Flow (with Leaflet JS)

If you’re looking for a Map solution within Salesforce Flow, you may already have seen this great solution from Nick Sauer which allows you to present a map location inside flow. But since that solution utilizes the standard lightning-map component from Salesforce, there are some limitations within that solution that won’t let you pinpoint / move / drag the map marker. So, in this article I will show you can present and modify map locations inside Salesforce flow utilizing external JS library, Leaflet.

Main Features

  1. Allow your flow users to move/drag map location pinpoint/marker
  2. Access your flow user’s current location and show that on the map
  3. Map shown in Google Maps Context

Attributes

Installation

Production
Sandbox
Source Code

Special appreciation to Leaflet JS open source library that enable us to build this component with their awesome map library.

There you go, now you have a map component that is draggable and can access your flow user’s location. The beauty of flow is you will be able to combine this component with other actions / components that can help your business use cases. For example, you can combine this with Google Maps Geocoding API and get the estimated latitude and longitude based on address input and let your flow user to modify the pinpoint so your company have accurate location of the clients.

Clap if you think this is helpful and comment if you have any questions, will try to help the best as I can :).

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store