GM - Map List

(gmpkg:mapListLWC)

Documentation

GM - Google Map List component enables users to conveniently map multiple records for any object (Standard or Custom). This component offers a unique blend of map view and list view, facilitating record filtering and action-taking capabilities.

Use case: Display list of Accounts on Google Maps and And filter Accounts by Billing Country. See GM - Google Map List .

Specification

PropertyTypeDescription

Map Provider

String

The map provider (google | osm). Currently we support Google and OpenStreetMap.

Object Name*

String

The API Name of the related object to display. Don’t forget __c for custom objects.

Custom Label

String

The title of the map.

Filter

String

JSON string to define filter criteria. Don’t forget __c for custom fields. See example below:

{
    "BillingLatitude": {
        "operator": "!=",
        "value": null
    }
}

Street Field*

String

Street Field. EX BillingStreet

City Field

String

City Field. EX BillingCity

Postal Code Field

String

Postal Code Field. EX BillingPostalCode

State Field

String

State Field. EX BillingState

Country Field

String

Country Field. EX BillingCountry

LatitudeField*

String

Latitude Field. Ex BillingLatitude.

Longitude Field

String

Longitude Field. Ex BillingLongitude.

Title Field

String

Title Field to build the popup when the user click on the marker. It's used also for the item list. EX Name

Detail Fields*

String

',' Separated list of fields to build the record details when the user expand the item.EX Type,BillingCity,Website

Search Fields

String

',' separated search fields. With this option enabled, the user will be able to search for specific records.

Enable Filtering

Boolean

Check this option if you enable Quick/Advanced filtering.

Marker Icon

String

Map Marker Icon. All utility lightning icons are supported. The list of icons is available under https://lightningdesignsystem.com/icons/

List Icon

String

The list item icon. All lightning icons are supported. The list of icons is available under https://lightningdesignsystem.com/icons/

Show Border

Boolean

Check this option to add a border to the card.

Height

Integer

The height of the map. Set the height to 9999 for a responsive height.

Marker Coloring

String

JSON conditions for marker coloring. You can define a list of coloring and the corresponding conditions.

[
    {
        "color": "#60ace6",
        "exp": {
            "Type": {
                "operator": "=",
                "value": "Prospect"
            }
        }
    },
    {
        "color": "#8cedbb",
        "exp": {
            "Type": {
                "operator": "=",
                "value": "Customer"
            }
        }
    }
]

See GM - RelatedList Grid cell coloring fields property for more details.

Search Around

String

JSON Search Around configuration. See Search Around Setup.

Actions

String

JSON string to initialize the list of available mass actions.

Record Actions

String

Json string to initialize the list of available record actions.

The GM - Google Map List component requires either a street set of fields (Street, City, Postal Code, State, Country) or a geolocation (Latitude, Longitude) to map an given object.

If the map provider is OSM only geolocations (Latitude, Longitude) is supported.

API Reference

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>60.0</apiVersion>
    <masterLabel>GM - Map List</masterLabel>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage">
            <property
                name="mapProvider"
                type="String"
                label="Map Provider"
                description="Map Provider : (google | osm)"
            />

            <property name="objectName" type="String" label="Object Name" description="Object API Name" />
            <property name="customLabel" type="String" label="Custom Label" description="Custom Label" />
            <property name="filter" type="String" label="Filter" description="JSON Filters" />

            <property name="streetField" type="String" label="Street Field" description="Street Field" />
            <property name="cityField" type="String" label="City Field" description="City Field" />
            <property name="postalCodeField" type="String" label="Postal Code Field" description="Postal Code Field" />
            <property name="stateField" type="String" label="State Field" description="State Field" />
            <property name="countryField" type="String" label="Country Field" description="Country Field" />

            <property name="latitudeField" type="String" label="Latitude Field" description="Latitude Field" />
            <property name="longitudeField" type="String" label="Longitude Field" description="Longitude Field" />

            <property name="titleField" type="String" label="Title Field" description="Title Field" />
            <property name="descriptionField" type="String" label="Description Field" description="Description Field" />
            <property name="detailFields" type="String" label="Detail Fields" description="Detail Fields" />

            <property
                name="searchFields"
                type="String"
                label="Search Fields"
                description="',' separated search fields"
            />
            <property
                name="canFilter"
                type="Boolean"
                label="Enable Filtering"
                description="Check this option if you want to use filters"
            />

            <property name="mapIcon" type="String" label="Marker Icon" description="Map Marker Icon" />
            <property name="listIcon" type="String" label="List Icon" description="Item List Icon" />

            <property name="showBorder" type="Boolean" label="Show Border" description="Show Border" />
            <property name="height" type="Integer" label="Map Height" description="Map Height" />

            <property
                name="colring"
                type="String"
                label="Marker Coloring"
                description="JSON Marker Coloring Configuration"
            />

            <property
                name="searchAround"
                type="String"
                label="Search Around"
                description="JSON Search Around Configuration"
            />

            <property
                name="jsonActions"
                type="String"
                label="Actions"
                description="Json string to initialize the list of available actions"
            />

            <property
                name="jsonRecordActions"
                type="String"
                label="Record Actions"
                description="Json string to initialize the list of available record actions"
            />            
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

Last updated