Skip to content

Commit 76d66b1

Browse files
authored
Merge pull request #675 from openlayers/ol_update
Update OpenLayers to version 5.3.0
2 parents 7578dc4 + 627640c commit 76d66b1

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Changes
99
* CanvasPattern and CanvasGradient styles are now handled for polygons.
1010
* Port to Cesium 1.51.
11+
* Port to OpenLayers 5.3.0.
1112

1213
# v 2.4 - 2018-10-01
1314

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"jsdoc": "3.5.5",
3737
"ls": "0.2.1",
3838
"nomnom": "1.8.1",
39-
"ol": "5.2.0",
39+
"ol": "5.3.0",
4040
"proj4": "2.4.4",
4141
"temp": "0.8.3",
4242
"webpack": "^4.20.2",

src/olcs/FeatureConverter.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -718,10 +718,10 @@ class FeatureConverter {
718718
});
719719

720720
if (imageStyle instanceof olStyleIcon) {
721-
bbOptions.pixelOffset = new Cesium.Cartesian2(
722-
image.width / 2 - imageStyle.getAnchor()[0],
723-
image.height / 2 - imageStyle.getAnchor()[1]
724-
);
721+
const anchor = imageStyle.getAnchor();
722+
if (anchor) {
723+
bbOptions.pixelOffset = new Cesium.Cartesian2(image.width / 2 - anchor[0], image.height / 2 - anchor[1]);
724+
}
725725
}
726726

727727
const bb = this.csAddBillboard(billboards, bbOptions, layer, feature, olGeometry, style);

0 commit comments

Comments
 (0)