You need to sign in to do that
Don't have an account?
satheesh 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..
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..