Skip to content

Commit 7b55aac

Browse files
committed
【examples】fix es 飞机例子飞机可能不出来的问题 review by
1 parent 450bf30 commit 7b55aac

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

dist/leaflet/include-leaflet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
var excludes = (targetScript.getAttribute('exclude') || "").split(",");
5151
if (!inArray(excludes, 'leaflet')) {
5252
inputCSS("https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.1/leaflet.css");
53-
inputScript("https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.1/leaflet-src.js");
53+
inputScript("https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.1/leaflet.js");
5454
}
5555
if (inArray(includes, 'mapv')) {
5656
inputScript("http://mapv.baidu.com/build/mapv.min.js");

examples/data/plane.svg

Lines changed: 1 addition & 1 deletion
Loading

examples/leaflet/PlanesMonitor.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,15 @@
280280
$.ajaxSetup({
281281
async: false
282282
});
283-
flightIdens.map(function (ident, key) {
284-
var svgUrl = "data:image/svg+xml;utf8,";
283+
var count = flightIdens.length;
284+
285285
$.get('../data/plane.svg', function (svg) {
286-
$(svg).children('svg').children('path').attr('fill', colors[key]);
287-
svgUrl += $(svg).children('svg')[0].outerHTML;
288-
var img = new Image();
289-
img.src = svgUrl;
290-
planes[ident] = {color: colors[key], img: img};
286+
flightIdens.map(function (ident, key) {
287+
$(svg).children('svg').css("fill",colors[key]);
288+
var svgUrl= "data:image/svg+xml;utf8,"+$(svg).children('svg')[0].outerHTML;
289+
var img = new Image();
290+
img.src = svgUrl;
291+
planes[ident] = {color: colors[key], img: img};
291292
});
292293
});
293294
return planes;

0 commit comments

Comments
 (0)