SFDC-Assets / Get-Geolocation

This package contains a Lightning component that gets a device's geolocation and returns it to a Salesforce flow.
Creative Commons Zero v1.0 Universal
8 stars 3 forks source link
geolocation lightning-web-components salesforce salesforce-lightning salesforce-lightning-components salesforce-lightning-web-components

Creative Commons License In Development

GET GEOLOCATION

This package contains a Lightning component that gets a device's geolocation and returns it to a flow.

Summary

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.

Installation and Setup

Read the disclaimer below and click on the Install the Package link. This will install the component to your org.

Installation

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.

Installation and Setup

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:

Variables

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.

How to Deploy This Package to Your Org

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 ...

Install the Package

Maintainer

John Meyer / johnsfdemo

Current Version: 1.1.2