Skip to content

Instantly share code, notes, and snippets.

@arun12209
Created February 21, 2020 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arun12209/da33c1c1f162c2228712c75f61425461 to your computer and use it in GitHub Desktop.
Save arun12209/da33c1c1f162c2228712c75f61425461 to your computer and use it in GitHub Desktop.
AccountsOnMap
<aura:component controller="LightningMapCntrl" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<!-- aura attributes -->
<aura:attribute name="mapMarkers" type="Object"/>
<aura:attribute name="centerObj" type="Object" />
<aura:attribute name="zoomLevel" type="Integer" />
<aura:attribute name="markersTitle" type="String" />
<aura:attribute name="showFooter" type="Boolean" />
<aura:attribute name="recordId" type="string"/>
<aura:attribute name="accObj" type="Account[]"/>
<!-- Init handlers-->
<aura:handler name="init" value="{! this }" action="{! c.doInit }"/>
<div class="slds">
<div id="container">
<div class="slds-page-header">
ACCOUNTS ON MAP.
</div>
<!-- the map component -->
<aura:if isTrue="{!v.mapMarkers.length > 0}" >
<lightning:map
mapMarkers="{! v.mapMarkers }"
center="{! v.centerObj }"
zoomLevel="{! v.zoomLevel }"
markersTitle="{! v.markersTitle }"
showFooter="{ !v.showFooter }"
listView="auto">
</lightning:map>
</aura:if>
</div>
</div>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment