Created
February 21, 2020 18:02
-
-
Save arun12209/6e91fee4fb52ac7285b87a5676f31b54 to your computer and use it in GitHub Desktop.
AccountOnMapHelper
This file contains hidden or 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
({ | |
loadMap : function(component,event,helper,account) { | |
var mapsArray = []; | |
for(let index=0; index < account.length; index++){ | |
var Mobj = { | |
location: { | |
Street: account[index].BillingStreet, | |
City: account[index].BillingCity, | |
PostalCode: account[index].BillingPostalCode, | |
State: account[index].BillingState, | |
Country: account[index].BillingCountry | |
}, | |
icon: 'standard:account', | |
title: account[index].Name, | |
description: account[index].Website | |
} | |
mapsArray.push(Mobj); | |
} | |
component.set('v.mapMarkers', mapsArray); | |
component.set('v.centerObj', { | |
location: { | |
City: 'Noida' | |
} | |
}); | |
component.set('v.zoomLevel', 12); | |
component.set('v.markersTitle', 'Accounts locations'); | |
component.set('v.showFooter', true); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment