ol 9.2.4 → 9.2.5-dev.1716917419876

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/expr/cpu.js CHANGED
@@ -256,7 +256,16 @@ function compileAccessorExpression(expression, context) {
256
256
  const name = /** @type {string} */ (nameExpression.value);
257
257
  switch (expression.operator) {
258
258
  case Ops.Get: {
259
- return (context) => context.properties[name];
259
+ return (context) => {
260
+ const args = expression.args;
261
+ let value = context.properties[name];
262
+ for (let i = 1, ii = args.length; i < ii; ++i) {
263
+ const keyExpression = /** @type {LiteralExpression} */ (args[i]);
264
+ const key = /** @type {string|number} */ (keyExpression.value);
265
+ value = value[key];
266
+ }
267
+ return value;
268
+ };
260
269
  }
261
270
  case Ops.Var: {
262
271
  return (context) => context.variables[name];
@@ -135,9 +135,9 @@ export type ArgValidator = (arg0: Array<EncodedExpression>, arg1: ParsingContext
135
135
  * of bands, depending on the underlying data source and
136
136
  * {@link import ("../source/GeoTIFF.js").Options configuration}. `xOffset` and `yOffset` are optional
137
137
  * and allow specifying pixel offsets for x and y. This is used for sampling data from neighboring pixels (WebGL only).
138
- * * `['get', 'attributeName', typeHint]` fetches a feature property value, similar to `feature.get('attributeName')`
139
- * A type hint can optionally be specified, in case the resulting expression contains a type ambiguity which
140
- * will make it invalid. Type hints can be one of: 'string', 'color', 'number', 'boolean', 'number[]'
138
+ * * `['get', attributeName]` fetches a feature property value, similar to `feature.get('attributeName')`.
139
+ * * `['get', attributeName, keyOrArrayIndex, ...]` (Canvas only) Access nested properties and array items of a
140
+ * feature property. The result is `undefined` when there is nothing at the specified key or index.
141
141
  * * `['geometry-type']` returns a feature's geometry type as string, either: 'LineString', 'Point' or 'Polygon'
142
142
  * `Multi*` values are returned as their singular equivalent
143
143
  * `Circle` geometries are returned as 'Polygon'
@@ -1 +1 @@
1
- {"version":3,"file":"expression.d.ts","sourceRoot":"","sources":["expression.js"],"names":[],"mappings":"AAsJA;;;;GAIG;AACH,+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;IAHC,aAAgB;IAChB,iBAAwB;IACxB,mBAAgB;CAEnB;AA+FD;;GAEG;AACH;QAFiB,MAAM,GAAE,MAAM;EAgD7B;yBA7IW,iBAAiB,GAAC,cAAc;;;;;eAK/B,IAAI,MAAM,CAAC;;;;gBACX,IAAI,MAAM,CAAC;;;;eACX,OAAO;;;;kBACP,OAAO;;;;WACP,OAAO,kBAAkB,EAAE,SAAS,GAAC,OAAO,mBAAmB,EAAE,UAAU;;gCAiB5E,YAAY,QAAM;;;;;;;kCAoXT,MAAM,iBAAiB,CAAC,QAAE,cAAc,QAAE,MAAM,UAAU,CAAC,QAAE,MAAM,YAAG,MAAM,UAAU,CAAC,GAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BApfrG,UAAQ,GAAC,OAAO,aAAa,EAAE,KAAK,GAAC,MAAM,GAAC,MAAM,GAAC,OAAO;2BA0E1D,OAAO,GAAC,MAAM,GAAC,MAAM,GAAC,MAAM,MAAM,CAAC;;;;yCA4KnB,cAAc,QAAE,MAAM,KAAE,UAAU"}
@@ -25,9 +25,9 @@ import {isStringColor} from '../color.js';
25
25
  * of bands, depending on the underlying data source and
26
26
  * {@link import("../source/GeoTIFF.js").Options configuration}. `xOffset` and `yOffset` are optional
27
27
  * and allow specifying pixel offsets for x and y. This is used for sampling data from neighboring pixels (WebGL only).
28
- * * `['get', 'attributeName', typeHint]` fetches a feature property value, similar to `feature.get('attributeName')`
29
- * A type hint can optionally be specified, in case the resulting expression contains a type ambiguity which
30
- * will make it invalid. Type hints can be one of: 'string', 'color', 'number', 'boolean', 'number[]'
28
+ * * `['get', attributeName]` fetches a feature property value, similar to `feature.get('attributeName')`.
29
+ * * `['get', attributeName, keyOrArrayIndex, ...]` (Canvas only) Access nested properties and array items of a
30
+ * feature property. The result is `undefined` when there is nothing at the specified key or index.
31
31
  * * `['geometry-type']` returns a feature's geometry type as string, either: 'LineString', 'Point' or 'Polygon'
32
32
  * `Multi*` values are returned as their singular equivalent
33
33
  * `Circle` geometries are returned as 'Polygon'
@@ -250,27 +250,6 @@ export function newParsingContext() {
250
250
  };
251
251
  }
252
252
 
253
- /**
254
- * @param {string} typeHint Type hint
255
- * @return {number} Resulting value type (will be a single type)
256
- */
257
- function getTypeFromHint(typeHint) {
258
- switch (typeHint) {
259
- case 'string':
260
- return StringType;
261
- case 'color':
262
- return ColorType;
263
- case 'number':
264
- return NumberType;
265
- case 'boolean':
266
- return BooleanType;
267
- case 'number[]':
268
- return NumberArrayType;
269
- default:
270
- throw new Error(`Unrecognized type hint: ${typeHint}`);
271
- }
272
- }
273
-
274
253
  /**
275
254
  * @typedef {LiteralValue|Array} EncodedExpression
276
255
  */
@@ -398,20 +377,7 @@ export const Ops = {
398
377
  * @type {Object<string, Parser>}
399
378
  */
400
379
  const parsers = {
401
- [Ops.Get]: createParser(
402
- ([_, typeHint]) => {
403
- if (typeHint !== undefined) {
404
- return getTypeFromHint(
405
- /** @type {string} */ (
406
- /** @type {LiteralExpression} */ (typeHint).value
407
- ),
408
- );
409
- }
410
- return AnyType;
411
- },
412
- withArgsCount(1, 2),
413
- withGetArgs,
414
- ),
380
+ [Ops.Get]: createParser(AnyType, withArgsCount(1, Infinity), withGetArgs),
415
381
  [Ops.Var]: createParser(
416
382
  ([firstArg]) => firstArg.type,
417
383
  withArgsCount(1, 1),
@@ -668,19 +634,29 @@ const parsers = {
668
634
  * @type ArgValidator
669
635
  */
670
636
  function withGetArgs(encoded, context) {
671
- const arg = parse(encoded[1], context);
672
- if (!(arg instanceof LiteralExpression)) {
673
- throw new Error('Expected a literal argument for get operation');
674
- }
675
- if (typeof arg.value !== 'string') {
676
- throw new Error('Expected a string argument for get operation');
677
- }
678
- context.properties.add(arg.value);
679
- if (encoded.length === 3) {
680
- const hint = parse(encoded[2], context);
681
- return [arg, hint];
637
+ const args = [];
638
+ for (let i = 1, ii = encoded.length; i < ii; ++i) {
639
+ const arg = parse(encoded[i], context);
640
+ args.push(arg);
641
+ if (!(arg instanceof LiteralExpression)) {
642
+ throw new Error('Expected a literal argument for get operation');
643
+ }
644
+ if (i > 1) {
645
+ if (typeof arg.value !== 'string' && typeof arg.value !== 'number') {
646
+ throw new Error(
647
+ 'Expected key or array index of a get operation to be a string or number',
648
+ );
649
+ }
650
+ continue;
651
+ }
652
+ if (typeof arg.value !== 'string') {
653
+ throw new Error(
654
+ 'Expected the attribute name of a get operation to be a string',
655
+ );
656
+ }
657
+ context.properties.add(String(arg.value));
682
658
  }
683
- return [arg];
659
+ return args;
684
660
  }
685
661
 
686
662
  /**
@@ -72,7 +72,7 @@ export type SnapOnSignature<Return> = import("../Observable").OnSignature<import
72
72
  * as it is added before.
73
73
  *
74
74
  * The snap interaction modifies map browser event `coordinate` and `pixel`
75
- * properties to force the snap to occur to any interaction that them.
75
+ * properties to force the snap to occur to any interaction that uses them.
76
76
  *
77
77
  * Example:
78
78
  *
@@ -92,7 +92,7 @@ const tempSegment = [];
92
92
  * as it is added before.
93
93
  *
94
94
  * The snap interaction modifies map browser event `coordinate` and `pixel`
95
- * properties to force the snap to occur to any interaction that them.
95
+ * properties to force the snap to occur to any interaction that uses them.
96
96
  *
97
97
  * Example:
98
98
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "9.2.4",
3
+ "version": "9.2.5-dev.1716917419876",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
@@ -67,6 +67,10 @@ export type Options = {
67
67
  * ```
68
68
  */
69
69
  tileLoadFunction?: import("../Tile.js").LoadFunction | undefined;
70
+ /**
71
+ * An array of values specifying additional options to apply.
72
+ */
73
+ apiOptions?: string[] | undefined;
70
74
  /**
71
75
  * Wrap the world horizontally.
72
76
  */
@@ -119,6 +123,10 @@ export type SessionTokenRequest = {
119
123
  * The styles.
120
124
  */
121
125
  styles?: any[] | undefined;
126
+ /**
127
+ * An array of values specifying additional options to apply.
128
+ */
129
+ apiOptions?: string[] | undefined;
122
130
  };
123
131
  export type SessionTokenResponse = {
124
132
  /**
@@ -166,6 +174,7 @@ export type SessionTokenResponse = {
166
174
  * imageTile.getImage().src = src;
167
175
  * };
168
176
  * ```
177
+ * @property {Array<string>} [apiOptions] An array of values specifying additional options to apply.
169
178
  * @property {boolean} [wrapX=true] Wrap the world horizontally.
170
179
  * @property {number} [transition] Duration of the opacity transition for rendering.
171
180
  * To disable the opacity transition, pass `transition: 0`.
@@ -184,6 +193,7 @@ export type SessionTokenResponse = {
184
193
  * @property {Array<string>} [layerTypes] The layer types.
185
194
  * @property {boolean} [overlay] The overlay.
186
195
  * @property {Array<Object>} [styles] The styles.
196
+ * @property {Array<string>} [apiOptions] An array of values specifying additional options to apply.
187
197
  */
188
198
  /**
189
199
  * @typedef {Object} SessionTokenResponse
@@ -1 +1 @@
1
- {"version":3,"file":"Google.d.ts","sourceRoot":"","sources":["Google.js"],"names":[],"mappings":";;;;;SAiBc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAgCN,MAAM;;;;cACN,MAAM;;;;YACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAWN,MAAM;;;;YACN,MAAM;;;;eACN,MAAM;;;;gBACN,MAAM;;;;iBACN,MAAM;;AAnDpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;GAWG;AAEH;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA2FjB;IArEC;;;OAGG;IACH,gBAA0B;IAE1B;;OAEG;IACH,QAFU,KAAK,GAAC,IAAI,CAEF;IA6BlB;;;OAGG;IACH,6BAA+C;IAE/C;;;OAGG;IACH,2BAAuB;IAEvB;;;OAGG;IACH,0BAAsB;IAEtB;;;OAGG;IACH,qCAAiC;IAEjC;;;OAGG;IACH,gCAA4B;IAK9B;;;;;;;;;;;OAWG;IACH,YAXY,KAAK,GAAC,IAAI,CAarB;IAED;;;;;OAKG;IACH,uBAJW,MAAM,UACN,WAAW,GACV,QAAQ,QAAQ,CAAC,CAI5B;IAED;;;OAGG;IACH,uBAyDC;IAED;;;;OAIG;IACH,2BAmCC;CAMF;sBA/SqB,gBAAgB"}
1
+ {"version":3,"file":"Google.d.ts","sourceRoot":"","sources":["Google.js"],"names":[],"mappings":";;;;;SAiBc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAiCN,MAAM;;;;cACN,MAAM;;;;YACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAYN,MAAM;;;;YACN,MAAM;;;;eACN,MAAM;;;;gBACN,MAAM;;;;iBACN,MAAM;;AArDpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA8FjB;IAxEC;;;OAGG;IACH,gBAA0B;IAE1B;;OAEG;IACH,QAFU,KAAK,GAAC,IAAI,CAEF;IAgClB;;;OAGG;IACH,6BAA+C;IAE/C;;;OAGG;IACH,2BAAuB;IAEvB;;;OAGG;IACH,0BAAsB;IAEtB;;;OAGG;IACH,qCAAiC;IAEjC;;;OAGG;IACH,gCAA4B;IAK9B;;;;;;;;;;;OAWG;IACH,YAXY,KAAK,GAAC,IAAI,CAarB;IAED;;;;;OAKG;IACH,uBAJW,MAAM,UACN,WAAW,GACV,QAAQ,QAAQ,CAAC,CAI5B;IAED;;;OAGG;IACH,uBAyDC;IAED;;;;OAIG;IACH,2BAmCC;CAMF;sBApTqB,gBAAgB"}
package/source/Google.js CHANGED
@@ -37,6 +37,7 @@ const maxZoom = 22;
37
37
  * imageTile.getImage().src = src;
38
38
  * };
39
39
  * ```
40
+ * @property {Array<string>} [apiOptions] An array of values specifying additional options to apply.
40
41
  * @property {boolean} [wrapX=true] Wrap the world horizontally.
41
42
  * @property {number} [transition] Duration of the opacity transition for rendering.
42
43
  * To disable the opacity transition, pass `transition: 0`.
@@ -56,6 +57,7 @@ const maxZoom = 22;
56
57
  * @property {Array<string>} [layerTypes] The layer types.
57
58
  * @property {boolean} [overlay] The overlay.
58
59
  * @property {Array<Object>} [styles] The styles.
60
+ * @property {Array<string>} [apiOptions] An array of values specifying additional options to apply.
59
61
  */
60
62
 
61
63
  /**
@@ -136,6 +138,9 @@ class Google extends TileImage {
136
138
  if (options.overlay === true) {
137
139
  sessionTokenRequest.overlay = true;
138
140
  }
141
+ if (options.apiOptions) {
142
+ sessionTokenRequest.apiOptions = options.apiOptions;
143
+ }
139
144
 
140
145
  /**
141
146
  * @type {SessionTokenRequest}
@@ -627,16 +627,14 @@ declare class VectorSource<FeatureType extends import("../Feature.js").FeatureLi
627
627
  /**
628
628
  * Remove feature without firing a `change` event.
629
629
  * @param {FeatureType} feature Feature.
630
- * @return {FeatureType|undefined} The removed feature
631
- * (or undefined if the feature was not found).
630
+ * @return {boolean} True if the feature was removed, false if it was not found.
632
631
  * @protected
633
632
  */
634
- protected removeFeatureInternal(feature: FeatureType): FeatureType | undefined;
633
+ protected removeFeatureInternal(feature: FeatureType): boolean;
635
634
  /**
636
635
  * Remove a feature from the id index. Called internally when the feature id
637
636
  * may have changed.
638
637
  * @param {FeatureType} feature The feature.
639
- * @return {boolean} Removed the feature from the index.
640
638
  * @private
641
639
  */
642
640
  private removeFromIdIndex_;
@@ -1 +1 @@
1
- {"version":3,"file":"Vector.d.ts","sourceRoot":"","sources":["Vector.js"],"names":[],"mappings":"AAuBA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,kBAJW,MAAM,6EAoBhB;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S,CAK5E;IAED;;;OAGG;IACH,6BAuCC;IAED;;;;;OAKG;IACH,oBAJW,WAAW,GACV,OAAO,CASlB;IAED;;OAEG;IACH,WAFY,OAAO,CAYlB;IAED;;;;OAIG;IACH,qBAJW,OAAO,cAAc,EAAE,MAAM,cAC7B,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,QAiDjD;IAQD;;;;OAIG;IACH,2BAHW,OAAO,cAAc,EAAE,MAAM,QAevC;IAED;;;;;;OAMG;IACH,yBAHW,MAAM,WAAW,CAAC,QAW5B;IAED;;;;;;OAMG;IACH,uBAHW,WAAW,QAWrB;IAED;;;;;OAKG;IACH,yCAJW,WAAW,GACV,OAAO,CAyClB;IAED;;;;;OAKG;IACH,2BAOC;IAED;;;;;OAKG;IACH,kBAHW,OAAO,qBAAqB,EAAE,aAAa,CAAC,WAAW,CAAC,QAKlE;IAED;;;;OAIG;IACH,YAHW,MAAM,GAAC,OAAO,qBAAqB,EAAE,kBAAkB,QAOjE;CACF;0BArpCyB,sBAAsB;uBANzB,kBAAkB;mBAOtB,aAAa"}
package/source/Vector.js CHANGED
@@ -1074,15 +1074,11 @@ class VectorSource extends Source {
1074
1074
  * @api
1075
1075
  */
1076
1076
  removeFeatures(features) {
1077
- const removedFeatures = [];
1077
+ let removed = false;
1078
1078
  for (let i = 0, ii = features.length; i < ii; ++i) {
1079
- const feature = features[i];
1080
- const removedFeature = this.removeFeatureInternal(feature);
1081
- if (removedFeature) {
1082
- removedFeatures.push(removedFeature);
1083
- }
1079
+ removed = this.removeFeatureInternal(features[i]) || removed;
1084
1080
  }
1085
- if (removedFeatures.length > 0) {
1081
+ if (removed) {
1086
1082
  this.changed();
1087
1083
  }
1088
1084
  }
@@ -1098,8 +1094,8 @@ class VectorSource extends Source {
1098
1094
  if (!feature) {
1099
1095
  return;
1100
1096
  }
1101
- const result = this.removeFeatureInternal(feature);
1102
- if (result) {
1097
+ const removed = this.removeFeatureInternal(feature);
1098
+ if (removed) {
1103
1099
  this.changed();
1104
1100
  }
1105
1101
  }
@@ -1107,14 +1103,13 @@ class VectorSource extends Source {
1107
1103
  /**
1108
1104
  * Remove feature without firing a `change` event.
1109
1105
  * @param {FeatureType} feature Feature.
1110
- * @return {FeatureType|undefined} The removed feature
1111
- * (or undefined if the feature was not found).
1106
+ * @return {boolean} True if the feature was removed, false if it was not found.
1112
1107
  * @protected
1113
1108
  */
1114
1109
  removeFeatureInternal(feature) {
1115
1110
  const featureKey = getUid(feature);
1116
1111
  if (!(featureKey in this.uidIndex_)) {
1117
- return;
1112
+ return false;
1118
1113
  }
1119
1114
 
1120
1115
  if (featureKey in this.nullGeometryFeatures_) {
@@ -1148,33 +1143,22 @@ class VectorSource extends Source {
1148
1143
  new VectorSourceEvent(VectorEventType.REMOVEFEATURE, feature),
1149
1144
  );
1150
1145
  }
1151
- return feature;
1146
+ return true;
1152
1147
  }
1153
1148
 
1154
1149
  /**
1155
1150
  * Remove a feature from the id index. Called internally when the feature id
1156
1151
  * may have changed.
1157
1152
  * @param {FeatureType} feature The feature.
1158
- * @return {boolean} Removed the feature from the index.
1159
1153
  * @private
1160
1154
  */
1161
1155
  removeFromIdIndex_(feature) {
1162
- let removed = false;
1163
1156
  for (const id in this.idIndex_) {
1164
- const indexedFeature = this.idIndex_[id];
1165
- if (
1166
- feature instanceof RenderFeature &&
1167
- Array.isArray(indexedFeature) &&
1168
- indexedFeature.includes(feature)
1169
- ) {
1170
- indexedFeature.splice(indexedFeature.indexOf(feature), 1);
1171
- } else if (this.idIndex_[id] === feature) {
1157
+ if (this.idIndex_[id] === feature) {
1172
1158
  delete this.idIndex_[id];
1173
- removed = true;
1174
1159
  break;
1175
1160
  }
1176
1161
  }
1177
- return removed;
1178
1162
  }
1179
1163
 
1180
1164
  /**
package/util.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,4BAFY,KAAK,CAIhB;AASD;;;;;;;;GAQG;AACH,kCAHY,MAAM,CAKjB;AAED;;;GAGG;AACH,sBAFU,MAAM,CAEe"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,4BAFY,KAAK,CAIhB;AASD;;;;;;;;GAQG;AACH,kCAHY,MAAM,CAKjB;AAED;;;GAGG;AACH,sBAFU,MAAM,CAEiC"}
package/util.js CHANGED
@@ -33,4 +33,4 @@ export function getUid(obj) {
33
33
  * OpenLayers version.
34
34
  * @type {string}
35
35
  */
36
- export const VERSION = '9.2.4';
36
+ export const VERSION = '9.2.5-dev.1716917419876';