Skip to content

Commit

Permalink
Merge pull request #675 from openlayers/ol_update
Browse files Browse the repository at this point in the history
Update OpenLayers to version 5.3.0
  • Loading branch information
gberaudo authored Nov 7, 2018
2 parents 7578dc4 + 627640c commit 76d66b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Changes
* CanvasPattern and CanvasGradient styles are now handled for polygons.
* Port to Cesium 1.51.
* Port to OpenLayers 5.3.0.

# v 2.4 - 2018-10-01

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"jsdoc": "3.5.5",
"ls": "0.2.1",
"nomnom": "1.8.1",
"ol": "5.2.0",
"ol": "5.3.0",
"proj4": "2.4.4",
"temp": "0.8.3",
"webpack": "^4.20.2",
Expand Down
8 changes: 4 additions & 4 deletions src/olcs/FeatureConverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,10 +718,10 @@ class FeatureConverter {
});

if (imageStyle instanceof olStyleIcon) {
bbOptions.pixelOffset = new Cesium.Cartesian2(
image.width / 2 - imageStyle.getAnchor()[0],
image.height / 2 - imageStyle.getAnchor()[1]
);
const anchor = imageStyle.getAnchor();
if (anchor) {
bbOptions.pixelOffset = new Cesium.Cartesian2(image.width / 2 - anchor[0], image.height / 2 - anchor[1]);
}
}

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

0 comments on commit 76d66b1

Please sign in to comment.