Skip to content

Instantly share code, notes, and snippets.

@arun12209
Created February 21, 2020 18:02
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/6e91fee4fb52ac7285b87a5676f31b54 to your computer and use it in GitHub Desktop.
Save arun12209/6e91fee4fb52ac7285b87a5676f31b54 to your computer and use it in GitHub Desktop.
AccountOnMapHelper
({
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