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