ol 10.5.1-dev.1748530933717 → 10.5.1-dev.1748531944555

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "10.5.1-dev.1748530933717",
3
+ "version": "10.5.1-dev.1748531944555",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
@@ -29,6 +29,10 @@ export type Options = {
29
29
  * Should include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
30
30
  */
31
31
  template?: string | undefined;
32
+ /**
33
+ * CSS color to fill text and stroke grid lines of each tile.
34
+ */
35
+ color?: string | undefined;
32
36
  };
33
37
  /**
34
38
  * @typedef {Object} Options
@@ -44,6 +48,7 @@ export type Options = {
44
48
  * If both `source` and individual options are specified the individual options will have precedence.
45
49
  * @property {string} [template='z:{z} x:{x} y:{y}'] Template for labeling the tiles.
46
50
  * Should include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
51
+ * @property {string} [color='grey'] CSS color to fill text and stroke grid lines of each tile.
47
52
  */
48
53
  /**
49
54
  * @classdesc
@@ -1 +1 @@
1
- {"version":3,"file":"TileDebug.d.ts","sourceRoot":"","sources":["TileDebug.js"],"names":[],"mappings":";;;;;iBAcc,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;AAFjD;;;;;;;;;;;;;;GAcG;AAEH;;;;;;GAMG;AACH;IACE;;OAEG;IACH,sBAFW,OAAO,EA0FjB;CACF;sBAtHqB,gBAAgB"}
1
+ {"version":3,"file":"TileDebug.d.ts","sourceRoot":"","sources":["TileDebug.js"],"names":[],"mappings":";;;;;iBAcc,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAFjD;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;GAMG;AACH;IACE;;OAEG;IACH,sBAFW,OAAO,EA2FjB;CACF;sBAxHqB,gBAAgB"}
@@ -24,6 +24,7 @@ import ImageTile from './ImageTile.js';
24
24
  * If both `source` and individual options are specified the individual options will have precedence.
25
25
  * @property {string} [template='z:{z} x:{x} y:{y}'] Template for labeling the tiles.
26
26
  * Should include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
27
+ * @property {string} [color='grey'] CSS color to fill text and stroke grid lines of each tile.
27
28
  */
28
29
 
29
30
  /**
@@ -44,6 +45,7 @@ class TileDebug extends ImageTile {
44
45
  options = options || {};
45
46
  const template = options.template || 'z:{z} x:{x} y:{y}';
46
47
  const source = options.source;
48
+ const color = options.color || 'grey';
47
49
 
48
50
  super({
49
51
  transition: 0,
@@ -97,10 +99,10 @@ class TileDebug extends ImageTile {
97
99
  const [width, height] = this.getTileSize(z);
98
100
  const context = createCanvasContext2D(width, height);
99
101
 
100
- context.strokeStyle = 'grey';
102
+ context.strokeStyle = color;
101
103
  context.strokeRect(0.5, 0.5, width + 0.5, height + 0.5);
102
104
 
103
- context.fillStyle = 'grey';
105
+ context.fillStyle = color;
104
106
  context.strokeStyle = 'white';
105
107
  context.textAlign = 'center';
106
108
  context.textBaseline = 'middle';
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 = '10.5.1-dev.1748530933717';
36
+ export const VERSION = '10.5.1-dev.1748531944555';