Created
July 7, 2019 05:10
-
-
Save arun12209/7ada594d52a7015db2c3db0a9bdb1a50 to your computer and use it in GitHub Desktop.
LightningMapCmp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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="conObj" type="Contact[]"/> | |
<!-- Init handlers--> | |
<aura:handler name="init" value="{! this }" action="{! c.doInit }"/> | |
<div class="slds"> | |
<div id="container"> | |
<div class="slds-page-header"> | |
CONTACTS 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 }" > | |
</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