Skip to content

Commit 85d262f

Browse files
authored
Merge pull request #1190 from openlayers/convert_all_wms_load_functions
Convert all image WMS load functions
2 parents 088b1fa + 101b9c5 commit 85d262f

10 files changed

+153
-114
lines changed

CHANGES.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
4+
## v 2.20.0
5+
6+
* Changes
7+
* Convert all image WMS sources regardless of their load functions
8+
* Allow to force a specific tileLoadFunction using the olcs\_tileLoadFunction property
9+
* Test with OL 9.1
10+
11+
* Breaking changes
12+
* Rename all 'olcs.xx' properties to 'olcs\_xx' and document them in PROPERTIES.md
13+
314
## v 2.19.3
415

516
* Changes

PROPERTIES.md

+24-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# OLCEsium Properties
1+
# OLCEsium Properties
22

3-
## olcs_extruded_height
3+
## olcs_extruded_height
44
Value: number
55
The distance in meters between the polygon's extruded face and the ellipsoid surface.
66
Check buildings example for usage in context.
77

88
## olcs_shadows
99
Value: boolean
10-
Enables shadow casting in 3D. Can be either applied to the entire feature set or by feature individually.
10+
Enables shadow casting in 3D. Can be either applied to the entire feature set or by feature individually.
1111
In order for it to work, [shadowMap](https://cesium.com/learn/cesiumjs/ref-doc/Scene.html?classFilter=scene#shadowMap) needs to be enabled in the Cesium scene. To use the sun as light source, enable [enableLighting](https://cesium.com/learn/cesiumjs/ref-doc/Globe.html#enableLighting) on the Globe.
1212
Check buildings example for usage in context.
1313

@@ -33,5 +33,26 @@ Value: number
3333
Allows you to set a minimum zoom level for rendering 3D tiles in the Cesium view. This property helps to control the level of detail displayed in the 3D view based on the current zoom level.
3434
Check mvt example for usage in context.
3535

36+
## olcs_tileLoadFunction (ImageWMS sources)
37+
Value: https://openlayers.org/en/latest/apidoc/module-ol_Tile.html#~LoadFunction
38+
Allows to use a custom function, for example when converting a WMS image source to a tiled one.
3639

40+
## olcs_projection
41+
Value: https://openlayers.org/en/latest/apidoc/module-ol_proj_Projection-Projection.html
42+
Allows to use an alternative projection in CesiumJS. See the customProj example.
3743

44+
## olcs_polygon_kind
45+
Value: "rectangle"
46+
Allows to use the Cesium Rectangle geometry instead of a polygon geometry. See the vector example.
47+
48+
## olcs_3d_geometry (OL vector source)
49+
Value: https://openlayers.org/en/latest/apidoc/module-ol_geom_Geometry-Geometry.html
50+
Allows to use an alternative geometry in CesiumJS.
51+
52+
## olcs_proxy
53+
Value: https://cesium.com/learn/cesiumjs/ref-doc/Proxy.html
54+
Allows to add authentication information to requests sent by CesiumJS or manipulate request.
55+
56+
## olcs_extent
57+
Value: An array of numbers representing an extent: [minx, miny, maxx, maxy]
58+
Allows to restrict a tiled imagery layer to a rectangle. This avoid sending useless requests.

examples/customProj.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const customProjSource = new olSourceImageWMS({
1818
url: 'https://wms.geo.admin.ch/'
1919
});
2020

21-
customProjSource.set('olcs.projection', getProjection('EPSG:3857'));
21+
customProjSource.set('olcs_projection', getProjection('EPSG:3857'));
2222

2323
Cesium.Ion.defaultAccessToken = OLCS_ION_TOKEN;
2424
const ol2d = new olMap({

examples/vectors.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ const cartographicRectangleStyle = new olStyleStyle({
246246
});
247247
const cartographicRectangleGeometry = new olGeomPolygon([[[-5e6, 11e6],
248248
[4e6, 11e6], [4e6, 10.5e6], [-5e6, 10.5e6], [-5e6, 11e6]]]);
249-
cartographicRectangleGeometry.set('olcs.polygon_kind', 'rectangle');
249+
cartographicRectangleGeometry.set('olcs_polygon_kind', 'rectangle');
250250
const cartographicRectangle = new olFeature({
251251
geometry: cartographicRectangleGeometry
252252
});
@@ -263,7 +263,7 @@ const cartographicRectangleGeometry2 = new olGeomMultiPolygon([
263263
[-5e6, 11e6, 1e6], [-5e6, 11.5e6, 1e6]
264264
]]
265265
]);
266-
cartographicRectangleGeometry2.set('olcs.polygon_kind', 'rectangle');
266+
cartographicRectangleGeometry2.set('olcs_polygon_kind', 'rectangle');
267267
const cartographicRectangle2 = new olFeature({
268268
geometry: cartographicRectangleGeometry2
269269
});

0 commit comments

Comments
 (0)