0
我们有一个显示地图上cordova.we没有任何错误,但地图不display.What我们做错了? enter image description here地图不显示在科尔多瓦与leaflet.js
(function() {
"use strict";
document.addEventListener('deviceready', onDeviceReady.bind(this), false);
function onDeviceReady() {
document.addEventListener('pause', onPause.bind(this), false);
document.addEventListener('resume', onResume.bind(this), false);
var map = L.map('mapid').fitWorld();
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
maxZoom: 18
}).addTo(map);
};
function onPause() {
};
function onResume() {
};
})();
你能至少显示一个外部图像吗?例如。如果您在某个URL或“http:// a.tile.openstreetmap.org/0/0/0.png”中包含'src'的''标签? – ghybs