File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/maptalks/src/renderer/layer/tilelayer Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -610,7 +610,7 @@ const TileLayerRenderable = function <T extends MixinConstructor>(Base: T) {
610
610
loadTile ( tile : Tile [ 'info' ] ) : Tile [ 'image' ] {
611
611
let tileImage = { } as Tile [ 'image' ] ;
612
612
// fixme: 无相关定义,是否实现?
613
- if ( this . loadTileBitmap ) {
613
+ if ( this . loadTileBitmap && isFunction ( this . loadTileBitmap ) ) {
614
614
const onLoad = ( bitmap ) => {
615
615
this . onTileLoad ( bitmap , tile ) ;
616
616
} ;
@@ -677,6 +677,14 @@ const TileLayerRenderable = function <T extends MixinConstructor>(Base: T) {
677
677
tileImage . onerror = falseFn ;
678
678
tileImage . src = emptyImageUrl ;
679
679
}
680
+ if ( this . loadTileBitmap && isFunction ( this . loadTileBitmap ) ) {
681
+ const url = tileInfo . url ;
682
+ this . loadTileBitmap ( url , tileInfo , ( ) => {
683
+
684
+ } , {
685
+ command : 'abortTile'
686
+ } )
687
+ }
680
688
}
681
689
682
690
onTileLoad ( tileImage : Tile [ 'image' ] , tileInfo : Tile [ 'info' ] ) : void {
You can’t perform that action at this time.
0 commit comments