Catch CORS exceptions when loading icons
This commit is contained in:
@@ -429,7 +429,11 @@ ol.style.IconImage_.prototype.load = function() {
|
||||
goog.events.listenOnce(this.image_, goog.events.EventType.LOAD,
|
||||
this.handleImageLoad_, false, this)
|
||||
];
|
||||
this.image_.src = this.src_;
|
||||
try {
|
||||
this.image_.src = this.src_;
|
||||
} catch (e) {
|
||||
this.handleImageError_();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user