You need to sign in to do that
Don't have an account?
Nandu
Component
Controler
Map container not found
Component
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" > <aura:attribute name="map" type="Object"/> <ltng:require styles="{!$Resource.mahesh_space__leaflet + '/leaflet.css'}" scripts="{!$Resource.mahesh_space__leaflet + '/leaflet.js'}" afterScriptsLoaded="{!c.jsLoaded}" /> <!--<ltng:require styles="{!$Resource.mahesh_space__leaflet + '/leaflet.css'}" scripts="{!join($Resource.mahesh_space__leaflet + '/leaflet.js', $Resource.mahesh_space__leaflet + '/leaflet-src.js')}" afterScriptsLoaded="{!c.jsLoaded}" />--> <lightning:card> <div aura:id="map" style="width:100%;hieght:100%"> </div> </lightning:card> </aura:component>
Controler
({ jsLoaded: function(component, event, helper) { var map = L.map('map', {zoomControl: false, tap: false}).setView([37.784173, -122.401557], 14); L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', { attribution: 'Tiles © Esri' }).addTo(map); component.set("v.map", map); } })