guard for null
against map.getPixelFromCoordinateInternal() returning null Per https://github.com/openlayers/openlayers/issues/11478
This commit is contained in:
@@ -458,6 +458,9 @@ class Overlay extends BaseObject {
|
||||
.getView()
|
||||
.getCenterInternal());
|
||||
const centerPx = map.getPixelFromCoordinateInternal(center);
|
||||
if (!centerPx) {
|
||||
return;
|
||||
}
|
||||
const newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];
|
||||
|
||||
const panOptions = panIntoViewOptions.animation || {};
|
||||
|
||||
Reference in New Issue
Block a user