Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
loadMap : function(component,event,helper,contacts) {
var mapsArray = [];
for(let index=0; index < contacts.length; index++){
var Mobj = {
location: {
Street: contacts[index].MailingStreet,
City: contacts[index].MailingCity,
PostalCode: contacts[index].MailingPostalCode,
State: contacts[index].MailingState,
Country: contacts[index].MailingCountry
icon: 'standard:contact',
title: contacts[index].Name,
description: contacts[index].Phone
component.set('v.mapMarkers', mapsArray);
component.set('v.centerObj', {
location: {
City: 'Noida'
component.set('v.zoomLevel', 12);
component.set('v.markersTitle', 'Contacts locations');
component.set('v.showFooter', true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment