This package contains a Lightning component that gets a device's geolocation and returns it to a flow.
This Lightning Web Component is intended to be a (mostly) silent component that you can drag onto a flow screen and retrieve the device's current geolocation. The latitude, longitude, altitude, speed, and heading are returned in a set of variables that can be used by the flow.
Read the disclaimer below and click on the Install the Package link. This will install the component to your org.
If you are a Salesforce employee installing in an SDO, CDO, or IDO, you probably want to make sure that you select the button under the "Advanced" twisty to compile only the Apex in the package (although there is no Apex in the package).
The component is meant to be a minimalist mechanism for returning the device's location data to a Salesforce screen flow. To add the component to a flow, look for it in the Custom section of the Flow Builder. Simply drag it onto the screen and configure it.
There are three options you can configure for additional capability:
The component will return five variables: latitude
, longitude
, altitude
, speed
, and heading
as output variables to the flow. You can use your own variables or use the defaults that are assigned by the flow. If you use your own, create them as follows:
There is an example flow called Example Flow for Get Geolocation LWC
included in the package that you can use as a template. Make sure that you make a copy before you make changes to it as it will be overwritten the next time you upgrade the package.
I am a pre-sales Solutions Engineer for Salesforce and I develop solutions for my customers to demonstrate the capabilities of the amazing Salesforce platform. This package represents functionality that I have used for demonstration purposes and the content herein is definitely not ready for actual production use; specifically, it has not been tested extensively nor has it been written with security and access controls in mind. By installing this package, you assume all risk for any consequences and agree not to hold me or my company liable. If you are OK with that ...
Current Version: 1.1.2