---
schema_version: "1"
id: 8974f25745bb02371b70a76133bcdbb95c419bf996ef4aa8db8307d3e2dfdec0
title: Formatted Location
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lightning-base-components/lightning-design-system/guides/lwc/components/lightning/formattedLocation/lightning-formatted-location.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/lightning-formatted-location.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4608da11dce529366d702b7156ac338830d952abf0f654a631adc973c69ba0fe
products:
  - Lightning Component Reference
---

# Formatted Location

**`lightning-formatted-location`**

Displays a geolocation in decimal degrees using the format [latitude, longitude].

**For Use In**

Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out (Beta), Standalone Lightning App, Mobile Offline

::::::tabset{tabs='["Example", "Develop", "Specifications"]'}

:::::tab

::component-playground{component="formattedLocation" model="lwc" namespace="lightning"}


:::::

:::::tab

A `lightning-formatted-location` component shows a read-only representation
of a latitude and longitude value. Latitude and longitude are geographic
coordinates specified in decimal degrees. If one of the values is invalid or
outside the allowed range, this component doesn't show anything.

Here are a few examples of latitudes: -30, 45, 37.12345678, -10.0. Values such
as 90.5 or -90.5 aren’t valid latitudes. Here are a few examples of
longitudes: -100, -120.9762, 115.84. Values such as 180.5 or -180.5 aren't
valid longitudes.

This example displays a geolocation with a latitude of 37.7938460 and a
longitude of -122.3948370.

<!-- prettier-ignore-start -->
```html
<template>
    <lightning-formatted-location
        latitude="37.7938460"
        longitude="-122.3948370"
    >
    </lightning-formatted-location>
</template>
```
<!-- prettier-ignore-end -->

## See Also

[_Object Reference for the Salesforce Platform_: Field Types](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/field_types.htm)


:::::

:::::tab
::component-specification{component="formattedLocation" model="lwc" namespace="lightning"}

:::::

::::::
