function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
satheesh psatheesh p 

Google map doesn't Show

Hi All,
 I am using Lefleat Packge for display google map but it doesn.t show the map(No error is displayed).in this  link http://leafletjs.com/download.html i found 3 packages and try that 3 packages(Uploaded in static resources)but display only empty screen.the soucrce code i am using is given below.

AccountMap.cmp
<aura:component>

    <aura:attribute name="map" type="Object"/>

    <ltng:require styles="/resource/leaflet/leaflet.css"
        scripts="/resource/leaflet/leaflet.js"
        afterScriptsLoaded="{!c.jsLoaded}" />

    <div id="map"></div>

</aura:component>

AccounMapController.js
({
   jsLoaded: function(component, event, helper) {

    setTimeout(function() {
        var map = L.map('map', {zoomControl: 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);
    });
  }
})

AccountMap.js
.THIS {
   width: 100%;
   height: 100%;
}

waiting for response.

Thank you..