Skip to content

Commit 075f1cb

Browse files
committed
【fix】ol 矢量瓦片 兼容sprite图错误时的处理 review by xiongjj
1 parent 563c2ec commit 075f1cb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/openlayers/overlay/vectortile/MapboxStyles.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ export class MapboxStyles extends Observable {
275275
this._spriteImage = img;
276276
this._initStyleFunction();
277277
};
278+
img.onerror = () => {
279+
this._spriteImage = null;
280+
this._initStyleFunction();
281+
}
278282
img.src = this._spriteImageUrl;
279283
});
280284
} else {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy