File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 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" ) ;
Original file line number Diff line number Diff line change 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 ;
You can’t perform that action at this time.
0 commit comments