ol 7.5.1 → 8.0.0-dev.1692053484481
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/DataTile.d.ts +2 -2
- package/DataTile.d.ts.map +1 -1
- package/DataTile.js +3 -2
- package/Image.d.ts +139 -40
- package/Image.d.ts.map +1 -1
- package/Image.js +194 -96
- package/ImageCanvas.d.ts +2 -2
- package/ImageCanvas.d.ts.map +1 -1
- package/ImageCanvas.js +2 -2
- package/Object.d.ts +7 -0
- package/Object.d.ts.map +1 -1
- package/Object.js +8 -0
- package/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/expr/cpu.d.ts +71 -0
- package/expr/cpu.d.ts.map +1 -0
- package/expr/cpu.js +312 -0
- package/expr/expression.d.ts +97 -0
- package/expr/expression.d.ts.map +1 -0
- package/expr/expression.js +373 -0
- package/has.d.ts +5 -0
- package/has.d.ts.map +1 -1
- package/has.js +6 -0
- package/index.d.ts +1 -2
- package/index.js +1 -1
- package/layer/Base.d.ts +12 -8
- package/layer/Base.d.ts.map +1 -1
- package/layer/Base.js +12 -8
- package/layer/BaseVector.d.ts.map +1 -1
- package/layer/BaseVector.js +67 -33
- package/layer/Heatmap.d.ts.map +1 -1
- package/layer/Heatmap.js +16 -55
- package/layer/Layer.d.ts +2 -2
- package/layer/Layer.d.ts.map +1 -1
- package/layer/Layer.js +1 -1
- package/layer/WebGLPoints.d.ts +7 -12
- package/layer/WebGLPoints.d.ts.map +1 -1
- package/layer/WebGLPoints.js +7 -12
- package/package.json +1 -1
- package/render/Feature.d.ts +8 -0
- package/render/Feature.d.ts.map +1 -1
- package/render/Feature.js +9 -0
- package/render/canvas/Immediate.d.ts.map +1 -1
- package/render/canvas/Immediate.js +5 -3
- package/render/canvas/TextBuilder.js +2 -2
- package/render/canvas/style.d.ts +69 -0
- package/render/canvas/style.d.ts.map +1 -0
- package/render/canvas/style.js +1192 -0
- package/render/canvas.js +1 -1
- package/render/webgl/VectorStyleRenderer.d.ts.map +1 -1
- package/render/webgl/VectorStyleRenderer.js +4 -0
- package/renderer/Layer.d.ts +2 -2
- package/renderer/Layer.d.ts.map +1 -1
- package/renderer/Layer.js +1 -1
- package/renderer/canvas/ImageLayer.d.ts +4 -4
- package/renderer/canvas/ImageLayer.d.ts.map +1 -1
- package/renderer/canvas/ImageLayer.js +17 -12
- package/renderer/canvas/Layer.d.ts +2 -2
- package/renderer/canvas/Layer.d.ts.map +1 -1
- package/renderer/canvas/Layer.js +1 -1
- package/renderer/canvas/VectorImageLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorImageLayer.js +3 -2
- package/renderer/webgl/VectorLayer.d.ts +1 -2
- package/renderer/webgl/VectorLayer.d.ts.map +1 -1
- package/reproj/Image.d.ts +5 -5
- package/reproj/Image.d.ts.map +1 -1
- package/reproj/Image.js +6 -6
- package/reproj.d.ts +2 -2
- package/reproj.d.ts.map +1 -1
- package/reproj.js +1 -1
- package/resolution.d.ts +13 -0
- package/resolution.d.ts.map +1 -0
- package/resolution.js +18 -0
- package/source/Image.d.ts +44 -7
- package/source/Image.d.ts.map +1 -1
- package/source/Image.js +97 -8
- package/source/ImageArcGISRest.d.ts +0 -23
- package/source/ImageArcGISRest.d.ts.map +1 -1
- package/source/ImageArcGISRest.js +18 -120
- package/source/ImageMapGuide.d.ts +0 -24
- package/source/ImageMapGuide.d.ts.map +1 -1
- package/source/ImageMapGuide.js +21 -113
- package/source/ImageStatic.d.ts +2 -27
- package/source/ImageStatic.d.ts.map +1 -1
- package/source/ImageStatic.js +20 -70
- package/source/ImageWMS.d.ts +2 -46
- package/source/ImageWMS.d.ts.map +1 -1
- package/source/ImageWMS.js +43 -201
- package/source/{Stamen.d.ts → StadiaMaps.d.ts} +17 -7
- package/source/StadiaMaps.d.ts.map +1 -0
- package/source/{Stamen.js → StadiaMaps.js} +85 -38
- package/source/TileArcGISRest.d.ts.map +1 -1
- package/source/TileArcGISRest.js +11 -22
- package/source/TileWMS.d.ts +0 -1
- package/source/TileWMS.d.ts.map +1 -1
- package/source/TileWMS.js +43 -106
- package/source/arcgisRest.d.ts +88 -0
- package/source/arcgisRest.d.ts.map +1 -0
- package/source/arcgisRest.js +131 -0
- package/source/common.d.ts +5 -0
- package/source/common.d.ts.map +1 -1
- package/source/common.js +6 -0
- package/source/mapguide.d.ts +52 -0
- package/source/mapguide.d.ts.map +1 -0
- package/source/mapguide.js +116 -0
- package/source/static.d.ts +45 -0
- package/source/static.d.ts.map +1 -0
- package/source/static.js +44 -0
- package/source/wms.d.ts +109 -1
- package/source/wms.d.ts.map +1 -1
- package/source/wms.js +170 -0
- package/source.d.ts +5 -1
- package/source.d.ts.map +1 -1
- package/source.js +5 -1
- package/style/flat.d.ts +332 -173
- package/style/flat.d.ts.map +1 -1
- package/style/flat.js +176 -248
- package/style/literal.d.ts +27 -72
- package/style/literal.d.ts.map +1 -1
- package/style/literal.js +14 -35
- package/util.d.ts.map +1 -1
- package/util.js +1 -1
- package/webgl/Helper.d.ts +7 -2
- package/webgl/Helper.d.ts.map +1 -1
- package/webgl/Helper.js +16 -27
- package/webgl/ShaderBuilder.d.ts +4 -14
- package/webgl/ShaderBuilder.d.ts.map +1 -1
- package/webgl/ShaderBuilder.js +72 -72
- package/webgl/styleparser.d.ts +3 -9
- package/webgl/styleparser.d.ts.map +1 -1
- package/webgl/styleparser.js +503 -88
- package/ImageBase.d.ts +0 -65
- package/ImageBase.d.ts.map +0 -1
- package/ImageBase.js +0 -98
- package/source/Stamen.d.ts.map +0 -1
package/layer/BaseVector.js
CHANGED
|
@@ -7,7 +7,10 @@ import Style, {
|
|
|
7
7
|
createDefaultStyle,
|
|
8
8
|
toFunction as toStyleFunction,
|
|
9
9
|
} from '../style/Style.js';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
flatStylesToStyleFunction,
|
|
12
|
+
rulesToStyleFunction,
|
|
13
|
+
} from '../render/canvas/style.js';
|
|
11
14
|
|
|
12
15
|
/**
|
|
13
16
|
* @template {import("../source/Vector.js").default|import("../source/VectorTile.js").default} VectorSourceType
|
|
@@ -266,45 +269,76 @@ class BaseVectorLayer extends Layer {
|
|
|
266
269
|
* @api
|
|
267
270
|
*/
|
|
268
271
|
setStyle(style) {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
this.style_ = toStyleLike(style);
|
|
273
|
+
this.styleFunction_ =
|
|
274
|
+
style === null ? undefined : toStyleFunction(this.style_);
|
|
275
|
+
this.changed();
|
|
276
|
+
}
|
|
277
|
+
}
|
|
273
278
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
279
|
+
/**
|
|
280
|
+
* Coerce the allowed style types into a shorter list of types. Flat styles, arrays of flat
|
|
281
|
+
* styles, and arrays of rules are converted into style functions.
|
|
282
|
+
*
|
|
283
|
+
* @param {import("../style/Style.js").StyleLike|import("../style/flat.js").FlatStyleLike|null} [style] Layer style.
|
|
284
|
+
* @return {import("../style/Style.js").StyleLike|null} The style.
|
|
285
|
+
*/
|
|
286
|
+
function toStyleLike(style) {
|
|
287
|
+
if (style === undefined) {
|
|
288
|
+
return createDefaultStyle;
|
|
289
|
+
}
|
|
290
|
+
if (!style) {
|
|
291
|
+
return null;
|
|
292
|
+
}
|
|
293
|
+
if (typeof style === 'function') {
|
|
294
|
+
return style;
|
|
295
|
+
}
|
|
296
|
+
if (style instanceof Style) {
|
|
297
|
+
return style;
|
|
298
|
+
}
|
|
299
|
+
if (!Array.isArray(style)) {
|
|
300
|
+
return flatStylesToStyleFunction([style]);
|
|
301
|
+
}
|
|
302
|
+
if (style.length === 0) {
|
|
303
|
+
return [];
|
|
304
|
+
}
|
|
284
305
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
*/
|
|
288
|
-
const styles = new Array(len);
|
|
306
|
+
const length = style.length;
|
|
307
|
+
const first = style[0];
|
|
289
308
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
309
|
+
if (first instanceof Style) {
|
|
310
|
+
/**
|
|
311
|
+
* @type {Array<Style>}
|
|
312
|
+
*/
|
|
313
|
+
const styles = new Array(length);
|
|
314
|
+
for (let i = 0; i < length; ++i) {
|
|
315
|
+
const candidate = style[i];
|
|
316
|
+
if (!(candidate instanceof Style)) {
|
|
317
|
+
throw new Error('Expected a list of style instances');
|
|
297
318
|
}
|
|
298
|
-
|
|
299
|
-
} else {
|
|
300
|
-
styleLike = toStyle(style);
|
|
319
|
+
styles[i] = candidate;
|
|
301
320
|
}
|
|
321
|
+
return styles;
|
|
322
|
+
}
|
|
302
323
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
324
|
+
if ('style' in first) {
|
|
325
|
+
/**
|
|
326
|
+
* @type Array<import("../style/flat.js").Rule>
|
|
327
|
+
*/
|
|
328
|
+
const rules = new Array(length);
|
|
329
|
+
for (let i = 0; i < length; ++i) {
|
|
330
|
+
const candidate = style[i];
|
|
331
|
+
if (!('style' in candidate)) {
|
|
332
|
+
throw new Error('Expected a list of rules with a style property');
|
|
333
|
+
}
|
|
334
|
+
rules[i] = candidate;
|
|
335
|
+
}
|
|
336
|
+
return rulesToStyleFunction(rules);
|
|
307
337
|
}
|
|
338
|
+
|
|
339
|
+
const flatStyles =
|
|
340
|
+
/** @type {Array<import("../style/flat.js").FlatStyle>} */ (style);
|
|
341
|
+
return flatStylesToStyleFunction(flatStyles);
|
|
308
342
|
}
|
|
309
343
|
|
|
310
344
|
export default BaseVectorLayer;
|
package/layer/Heatmap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heatmap.d.ts","sourceRoot":"","sources":["Heatmap.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Heatmap.d.ts","sourceRoot":"","sources":["Heatmap.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAgC8B,OAAO,eAAe,EAAE,OAAO,KAAE,MAAM;;;;;;;;;;;;AAuBrE;;;;;;;;;;GAUG;AACH;IACE;;OAEG;IACH,2CAqCC;IA1BC;;;OAGG;IACH,kBAAqB;IAYnB,uCAEC;IAUL;;;;;OAKG;IACH,WAJY,MAAM,CAMjB;IAED;;;;;OAKG;IACH,eAJY,MAAM,MAAM,CAAC,CAMxB;IAED;;;;;OAKG;IACH,aAJY,MAAM,CAMjB;IAED;;OAEG;IACH,+BAEC;IAED;;;;;OAKG;IACH,cAJW,MAAM,QAMhB;IAED;;;;;OAKG;IACH,oBAJW,MAAM,MAAM,CAAC,QAMvB;IAED;;;;;OAKG;IACH,kBAJW,MAAM,QAMhB;IAED,sBA2DC;IAED,wBAAoB;CACrB;qCA1OoC,kCAAkC;uBADhD,iBAAiB"}
|
package/layer/Heatmap.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import BaseVector from './BaseVector.js';
|
|
5
5
|
import WebGLPointsLayerRenderer from '../renderer/webgl/PointsLayer.js';
|
|
6
|
+
import {ShaderBuilder} from '../webgl/ShaderBuilder.js';
|
|
6
7
|
import {clamp} from '../math.js';
|
|
7
8
|
import {createCanvasContext2D} from '../dom.js';
|
|
8
9
|
|
|
@@ -174,6 +175,16 @@ class Heatmap extends BaseVector {
|
|
|
174
175
|
}
|
|
175
176
|
|
|
176
177
|
createRenderer() {
|
|
178
|
+
const builder = new ShaderBuilder()
|
|
179
|
+
.addAttribute('float a_weight')
|
|
180
|
+
.addVarying('v_weight', 'float', 'a_weight')
|
|
181
|
+
.addUniform('float u_size')
|
|
182
|
+
.addUniform('float u_blurSlope')
|
|
183
|
+
.setSymbolSizeExpression('vec2(u_size)')
|
|
184
|
+
.setSymbolColorExpression(
|
|
185
|
+
'vec4(smoothstep(0., 1., (1. - length(coordsPx * 2. / v_quadSizePx)) * u_blurSlope) * v_weight)'
|
|
186
|
+
);
|
|
187
|
+
|
|
177
188
|
return new WebGLPointsLayerRenderer(this, {
|
|
178
189
|
className: this.getClassName(),
|
|
179
190
|
attributes: [
|
|
@@ -185,55 +196,6 @@ class Heatmap extends BaseVector {
|
|
|
185
196
|
},
|
|
186
197
|
},
|
|
187
198
|
],
|
|
188
|
-
hitDetectionEnabled: true,
|
|
189
|
-
vertexShader: `
|
|
190
|
-
precision mediump float;
|
|
191
|
-
uniform mat4 u_projectionMatrix;
|
|
192
|
-
uniform mat4 u_offsetScaleMatrix;
|
|
193
|
-
uniform float u_size;
|
|
194
|
-
attribute vec2 a_position;
|
|
195
|
-
attribute float a_index;
|
|
196
|
-
attribute float a_weight;
|
|
197
|
-
attribute vec4 a_hitColor;
|
|
198
|
-
|
|
199
|
-
varying vec2 v_texCoord;
|
|
200
|
-
varying float v_weight;
|
|
201
|
-
varying vec4 v_hitColor;
|
|
202
|
-
|
|
203
|
-
void main(void) {
|
|
204
|
-
mat4 offsetMatrix = u_offsetScaleMatrix;
|
|
205
|
-
float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;
|
|
206
|
-
float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;
|
|
207
|
-
vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);
|
|
208
|
-
gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;
|
|
209
|
-
float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;
|
|
210
|
-
float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;
|
|
211
|
-
v_texCoord = vec2(u, v);
|
|
212
|
-
v_hitColor = a_hitColor;
|
|
213
|
-
v_weight = a_weight;
|
|
214
|
-
}`,
|
|
215
|
-
fragmentShader: `
|
|
216
|
-
precision mediump float;
|
|
217
|
-
uniform float u_blurSlope;
|
|
218
|
-
uniform mediump int u_hitDetection;
|
|
219
|
-
|
|
220
|
-
varying vec2 v_texCoord;
|
|
221
|
-
varying float v_weight;
|
|
222
|
-
varying vec4 v_hitColor;
|
|
223
|
-
|
|
224
|
-
void main(void) {
|
|
225
|
-
vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);
|
|
226
|
-
float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;
|
|
227
|
-
float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;
|
|
228
|
-
float alpha = smoothstep(0.0, 1.0, value) * v_weight;
|
|
229
|
-
gl_FragColor = vec4(alpha, alpha, alpha, alpha);
|
|
230
|
-
if (u_hitDetection > 0) {
|
|
231
|
-
if (alpha < 0.05) {
|
|
232
|
-
discard;
|
|
233
|
-
}
|
|
234
|
-
gl_FragColor = v_hitColor;
|
|
235
|
-
}
|
|
236
|
-
}`,
|
|
237
199
|
uniforms: {
|
|
238
200
|
u_size: () => {
|
|
239
201
|
return (this.get(Property.RADIUS) + this.get(Property.BLUR)) * 2;
|
|
@@ -244,6 +206,9 @@ class Heatmap extends BaseVector {
|
|
|
244
206
|
);
|
|
245
207
|
},
|
|
246
208
|
},
|
|
209
|
+
hitDetectionEnabled: true,
|
|
210
|
+
vertexShader: builder.getSymbolVertexShader(),
|
|
211
|
+
fragmentShader: builder.getSymbolFragmentShader(),
|
|
247
212
|
postProcesses: [
|
|
248
213
|
{
|
|
249
214
|
fragmentShader: `
|
|
@@ -262,12 +227,8 @@ class Heatmap extends BaseVector {
|
|
|
262
227
|
gl_FragColor.rgb *= gl_FragColor.a;
|
|
263
228
|
}`,
|
|
264
229
|
uniforms: {
|
|
265
|
-
u_gradientTexture: () =>
|
|
266
|
-
|
|
267
|
-
},
|
|
268
|
-
u_opacity: () => {
|
|
269
|
-
return this.getOpacity();
|
|
270
|
-
},
|
|
230
|
+
u_gradientTexture: () => this.gradient_,
|
|
231
|
+
u_opacity: () => this.getOpacity(),
|
|
271
232
|
},
|
|
272
233
|
},
|
|
273
234
|
],
|
package/layer/Layer.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ export type State = {
|
|
|
104
104
|
/**
|
|
105
105
|
* ZIndex.
|
|
106
106
|
*/
|
|
107
|
-
zIndex: number;
|
|
107
|
+
zIndex: number | undefined;
|
|
108
108
|
/**
|
|
109
109
|
* Maximum resolution.
|
|
110
110
|
*/
|
|
@@ -172,7 +172,7 @@ export type State = {
|
|
|
172
172
|
* @property {boolean} visible Visible.
|
|
173
173
|
* @property {boolean} managed Managed.
|
|
174
174
|
* @property {import("../extent.js").Extent} [extent] Extent.
|
|
175
|
-
* @property {number} zIndex ZIndex.
|
|
175
|
+
* @property {number | undefined} zIndex ZIndex.
|
|
176
176
|
* @property {number} maxResolution Maximum resolution.
|
|
177
177
|
* @property {number} minResolution Minimum resolution.
|
|
178
178
|
* @property {number} minZoom Minimum zoom.
|
package/layer/Layer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layer.d.ts","sourceRoot":"","sources":["Layer.js"],"names":[],"mappings":"AAqfA;;;;;;GAMG;AACH,mCAJW,KAAK,aACL,OAAO,YAAY,EAAE,KAAK,GACzB,OAAO,CAelB;;oCA5fqB,OAAO,WAAW,EAAE,UAAU,KAAE,WAAW;6BAIpD,aAAa,GAAC,eAAe;;;;uCAK7B,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,UAAU,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACjI,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,QAAQ,EAAE,yBAAyB,GAClF,cAAoB,EAAE,OAAO,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,GAC9D,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,qBAAqB,EAAE,qBAAq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,QAAQ,GAAC,IAAI,CAOlE;IAED;;;;;;;;OAQG;IACH,qFAHY,OAAO,CAmClB;IAED;;;;;;OAMG;IACH,2FAHY,MAAM,MAAM,CAAC,CAsBxB;IAoBD;;OAEG;IACH,iBAEC;IAED;;;OAGG;IACH,oBAFW,OAAO,WAAW,EAAE,OAAO,GAAC,IAAI,QAO1C;IAED;;;OAGG;IACH,kBAFY,OAAO,WAAW,EAAE,OAAO,GAAC,IAAI,CAI3C;IAED;;;;;;;;;;OAUG;IACH,YAHW,OAAO,WAAW,EAAE,OAAO,GAAC,IAAI,QAsC1C;IAED;;;;;OAKG;IACH,kBAJW,UAAU,GAAC,IAAI,QAMzB;IAED;;;OAGG;IACH,eAFY,YAAY,GAAC,IAAI,CAO5B;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;;;OAIG;IACH,4BAHY,YAAY,CAKvB;CAcF;sBAhfqB,WAAW;iBAIhB,YAAY"}
|
package/layer/Layer.js
CHANGED
|
@@ -64,7 +64,7 @@ import {listen, unlistenByKey} from '../events.js';
|
|
|
64
64
|
* @property {boolean} visible Visible.
|
|
65
65
|
* @property {boolean} managed Managed.
|
|
66
66
|
* @property {import("../extent.js").Extent} [extent] Extent.
|
|
67
|
-
* @property {number} zIndex ZIndex.
|
|
67
|
+
* @property {number | undefined} zIndex ZIndex.
|
|
68
68
|
* @property {number} maxResolution Maximum resolution.
|
|
69
69
|
* @property {number} minResolution Minimum resolution.
|
|
70
70
|
* @property {number} minZoom Minimum zoom.
|
package/layer/WebGLPoints.d.ts
CHANGED
|
@@ -98,23 +98,18 @@ export type Options<VectorSourceType extends import("../source/Vector.js").defau
|
|
|
98
98
|
* Here are a few samples of literal style objects:
|
|
99
99
|
* ```js
|
|
100
100
|
* const style = {
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* color: '#33AAFF',
|
|
105
|
-
* opacity: 0.9
|
|
106
|
-
* }
|
|
101
|
+
* 'circle-radius': 8,
|
|
102
|
+
* 'circle-fill-color': '#33AAFF',
|
|
103
|
+
* 'circle-opacity': 0.9
|
|
107
104
|
* }
|
|
108
105
|
* ```
|
|
109
106
|
*
|
|
110
107
|
* ```js
|
|
111
108
|
* const style = {
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* src: '../static/exclamation-mark.png'
|
|
117
|
-
* }
|
|
109
|
+
* 'icon-src': '../static/exclamation-mark.png',
|
|
110
|
+
* 'icon-offset': [0, 12],
|
|
111
|
+
* 'icon-width': 4,
|
|
112
|
+
* 'icon-height': 8
|
|
118
113
|
* }
|
|
119
114
|
* ```
|
|
120
115
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGLPoints.d.ts","sourceRoot":"","sources":["WebGLPoints.js"],"names":[],"mappings":";;;;;WAUc,OAAO,qBAAqB,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAHxD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH
|
|
1
|
+
{"version":3,"file":"WebGLPoints.d.ts","sourceRoot":"","sources":["WebGLPoints.js"],"names":[],"mappings":";;;;;WAUc,OAAO,qBAAqB,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAHxD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH;IACE;;OAEG;IACH,qBAFW,QAAQ,gBAAgB,CAAC,EAwBnC;IAjBC;;;OAGG;IACH,qBAAoD;IAEpD;;;OAGG;IACH,wBAAoD;IAEpD;;;OAGG;IACH,8BAA0D;IAG5D,sBAiBC;IAED;;;OAGG;IACH;YAFkB,MAAM,GAAE,MAAM;aAK/B;CACF;qCAvHoC,kCAAkC;kBADrD,YAAY"}
|
package/layer/WebGLPoints.js
CHANGED
|
@@ -40,23 +40,18 @@ import {parseLiteralStyle} from '../webgl/styleparser.js';
|
|
|
40
40
|
* Here are a few samples of literal style objects:
|
|
41
41
|
* ```js
|
|
42
42
|
* const style = {
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* color: '#33AAFF',
|
|
47
|
-
* opacity: 0.9
|
|
48
|
-
* }
|
|
43
|
+
* 'circle-radius': 8,
|
|
44
|
+
* 'circle-fill-color': '#33AAFF',
|
|
45
|
+
* 'circle-opacity': 0.9
|
|
49
46
|
* }
|
|
50
47
|
* ```
|
|
51
48
|
*
|
|
52
49
|
* ```js
|
|
53
50
|
* const style = {
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* src: '../static/exclamation-mark.png'
|
|
59
|
-
* }
|
|
51
|
+
* 'icon-src': '../static/exclamation-mark.png',
|
|
52
|
+
* 'icon-offset': [0, 12],
|
|
53
|
+
* 'icon-width': 4,
|
|
54
|
+
* 'icon-height': 8
|
|
60
55
|
* }
|
|
61
56
|
* ```
|
|
62
57
|
*
|
package/package.json
CHANGED
package/render/Feature.d.ts
CHANGED
|
@@ -147,6 +147,14 @@ declare class RenderFeature {
|
|
|
147
147
|
getProperties(): {
|
|
148
148
|
[x: string]: any;
|
|
149
149
|
};
|
|
150
|
+
/**
|
|
151
|
+
* Get an object of all property names and values. This has the same behavior as getProperties,
|
|
152
|
+
* but is here to conform with the {@link module:ol/Feature~Feature} interface.
|
|
153
|
+
* @return {Object<string, *>?} Object.
|
|
154
|
+
*/
|
|
155
|
+
getPropertiesInternal(): {
|
|
156
|
+
[x: string]: any;
|
|
157
|
+
} | null;
|
|
150
158
|
/**
|
|
151
159
|
* @return {number} Stride.
|
|
152
160
|
*/
|
package/render/Feature.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["Feature.js"],"names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;;;OAGG;IACH,wCAHW,MAAM,GACL,aAAa,CAIxB;IAED;;;;;;OAMG;IACH,sCAJW,MAAM,mEAEL,aAAa,CAIxB;IAED;;;;OAIG;IACH;YAHmB,MAAM;MAKxB;IAED;;;;OAIG;IACH;YAFmB,MAAM;aAIxB;IAED;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,oBAFY,OAAO,mBAAmB,EAAE,aAAa,GAAC,SAAS,CAI9D;IAED;;;;OAIG;IACH,WAHY,OAAO,qBAAqB,EAAE,IAAI,CAK7C;IAED;;;;OAIG;IACH,sBAFW,OAAO,YAAY,EAAE,cAAc,QA2B7C;IACD;;OAEG;IACH,WAFY,MAAM,MAAM,CAAC,GAAC,MAAM,MAAM,MAAM,CAAC,CAAC,CAI7C;IAGH,gBAPc,MAAM,MAAM,CAAC,GAAC,MAAM,MAAM,MAAM,CAAC,CAAC,CAOhB;IAEhC;;OAEG;IACH,0BAxHc,MAAM,MAAM,CAAC,CAwHe;CAPzC;sBArUM,YAAY;2BAAZ,YAAY;2BAAZ,YAAY;gCAAZ,YAAY;wBAAZ,YAAY;6BAAZ,YAAY;oBARC,eAAe"}
|
package/render/Feature.js
CHANGED
|
@@ -265,6 +265,15 @@ class RenderFeature {
|
|
|
265
265
|
return this.properties_;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
+
/**
|
|
269
|
+
* Get an object of all property names and values. This has the same behavior as getProperties,
|
|
270
|
+
* but is here to conform with the {@link module:ol/Feature~Feature} interface.
|
|
271
|
+
* @return {Object<string, *>?} Object.
|
|
272
|
+
*/
|
|
273
|
+
getPropertiesInternal() {
|
|
274
|
+
return this.properties_;
|
|
275
|
+
}
|
|
276
|
+
|
|
268
277
|
/**
|
|
269
278
|
* @return {number} Stride.
|
|
270
279
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Immediate.d.ts","sourceRoot":"","sources":["Immediate.js"],"names":[],"mappings":";AAgCA;;;;;;;;GAQG;A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;;;;;OAQG;IACH,sBAsBC;IAED;;;;;;;OAOG;IACH,mBAWC;IAED;;;;;;OAMG;IACH,qBAHW,OAAO,sBAAsB,EAAE,OAAO,QAiDhD;IAeD;;OAEG;IACH,wBAFW,OAAO,oBAAoB,EAAE,SAAS,QAIhD;IAED;;;;;;OAMG;IACH,uBAHW,OAAO,wBAAwB,EAAE,OAAO,GAAC,OAAO,eAAe,EAAE,OAAO,QAoDlF;IAqBD;;;;;OAKG;IACH,iCAFW,OAAO,kCAAkC,EAAE,OAAO,QAO5D;IAED;;;;;OAKG;IACH,oBAFW,OAAO,qBAAqB,EAAE,OAAO,GAAC,OAAO,eAAe,EAAE,OAAO,QAmB/E;IAED;;;;;OAKG;IACH,yBAFW,OAAO,0BAA0B,EAAE,OAAO,GAAC,OAAO,eAAe,EAAE,OAAO,QAmBpF;IAED;;;;;OAKG;IACH,yBAFW,OAAO,0BAA0B,EAAE,OAAO,GAAC,OAAO,eAAe,EAAE,OAAO,QAgCpF;IAED;;;;;OAKG;IACH,8BAFW,OAAO,+BAA+B,EAAE,OAAO,GAAC,OAAO,eAAe,EAAE,OAAO,QAuCzF;IAED;;;;;OAKG;IACH,sBAFW,OAAO,uBAAuB,EAAE,OAAO,GAAC,OAAO,eAAe,EAAE,OAAO,QAwCjF;IAED;;;;OAIG;IACH,2BAFW,OAAO,4BAA4B,EAAE,OAAO,QA0CtD;IAED;;;OAGG;IACH,6BAcC;IAED;;;OAGG;IACH,+BAmDC;IAED;;;OAGG;IACH,6BA6BC;IAiED;;;;;OAKG;IACH,0BAFW,OAAO,sBAAsB,EAAE,OAAO,QA0BhD;IAED;;;;;OAKG;IACH,wBAFW,OAAO,qBAAqB,EAAE,OAAO,QA6F/C;CACF;0BAlpCyB,qBAAqB"}
|
|
@@ -325,7 +325,8 @@ class CanvasImmediateRenderer extends VectorContext {
|
|
|
325
325
|
-centerX,
|
|
326
326
|
-centerY
|
|
327
327
|
);
|
|
328
|
-
context.
|
|
328
|
+
context.save();
|
|
329
|
+
context.transform.apply(context, localTransform);
|
|
329
330
|
context.translate(centerX, centerY);
|
|
330
331
|
context.scale(this.imageScale_[0], this.imageScale_[1]);
|
|
331
332
|
context.drawImage(
|
|
@@ -339,7 +340,7 @@ class CanvasImmediateRenderer extends VectorContext {
|
|
|
339
340
|
this.imageWidth_,
|
|
340
341
|
this.imageHeight_
|
|
341
342
|
);
|
|
342
|
-
context.
|
|
343
|
+
context.restore();
|
|
343
344
|
} else {
|
|
344
345
|
context.drawImage(
|
|
345
346
|
this.image_,
|
|
@@ -401,6 +402,7 @@ class CanvasImmediateRenderer extends VectorContext {
|
|
|
401
402
|
this.textScale_[0] != 1 ||
|
|
402
403
|
this.textScale_[1] != 1
|
|
403
404
|
) {
|
|
405
|
+
context.save();
|
|
404
406
|
context.translate(x - this.textOffsetX_, y - this.textOffsetY_);
|
|
405
407
|
context.rotate(rotation);
|
|
406
408
|
context.translate(this.textOffsetX_, this.textOffsetY_);
|
|
@@ -411,7 +413,7 @@ class CanvasImmediateRenderer extends VectorContext {
|
|
|
411
413
|
if (this.textFillState_) {
|
|
412
414
|
context.fillText(this.text_, 0, 0);
|
|
413
415
|
}
|
|
414
|
-
context.
|
|
416
|
+
context.restore();
|
|
415
417
|
} else {
|
|
416
418
|
if (this.textStrokeState_) {
|
|
417
419
|
context.strokeText(this.text_, x, y);
|
|
@@ -537,10 +537,10 @@ class CanvasTextBuilder extends CanvasBuilder {
|
|
|
537
537
|
textState.overflow,
|
|
538
538
|
fillKey ? defaultFillStyle : fillKey,
|
|
539
539
|
textState.maxAngle,
|
|
540
|
-
|
|
540
|
+
pixelRatio,
|
|
541
541
|
offsetY,
|
|
542
542
|
strokeKey,
|
|
543
|
-
strokeWidth,
|
|
543
|
+
strokeWidth * pixelRatio,
|
|
544
544
|
text,
|
|
545
545
|
textKey,
|
|
546
546
|
1 / pixelRatio,
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This function adapts a rule evaluator to the existing style function interface.
|
|
3
|
+
* After we have deprecated the style function, we can use the compiled rules directly
|
|
4
|
+
* and pass a more complete evaluation context (variables, zoom, time, etc.).
|
|
5
|
+
*
|
|
6
|
+
* @param {Array<import('../../style/flat.js').Rule>} rules The rules.
|
|
7
|
+
* @return {import('../../style/Style.js').StyleFunction} A style function.
|
|
8
|
+
*/
|
|
9
|
+
export function rulesToStyleFunction(rules: Array<import('../../style/flat.js').Rule>): import('../../style/Style.js').StyleFunction;
|
|
10
|
+
/**
|
|
11
|
+
* This function adapts a style evaluator to the existing style function interface.
|
|
12
|
+
* After we have deprecated the style function, we can use the compiled rules directly
|
|
13
|
+
* and pass a more complete evaluation context (variables, zoom, time, etc.).
|
|
14
|
+
*
|
|
15
|
+
* @param {Array<import('../../style/flat.js').FlatStyle>} flatStyles The flat styles.
|
|
16
|
+
* @return {import('../../style/Style.js').StyleFunction} A style function.
|
|
17
|
+
*/
|
|
18
|
+
export function flatStylesToStyleFunction(flatStyles: Array<import('../../style/flat.js').FlatStyle>): import('../../style/Style.js').StyleFunction;
|
|
19
|
+
/**
|
|
20
|
+
* @typedef {function(EvaluationContext):Array<Style>} RuleSetEvaluator
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* @typedef {Object} CompiledRule
|
|
24
|
+
* @property {ExpressionEvaluator} filter The compiled filter evaluator.
|
|
25
|
+
* @property {Array<StyleEvaluator>} styles The list of compiled style evaluators.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* @param {Array<import('../../style/flat.js').Rule>} rules The rules.
|
|
29
|
+
* @param {ParsingContext} context The parsing context.
|
|
30
|
+
* @return {RuleSetEvaluator} The evaluator function.
|
|
31
|
+
*/
|
|
32
|
+
export function buildRuleSet(rules: Array<import('../../style/flat.js').Rule>, context: ParsingContext): RuleSetEvaluator;
|
|
33
|
+
/**
|
|
34
|
+
* @typedef {function(EvaluationContext):Style} StyleEvaluator
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* @param {FlatStyle} flatStyle A flat style literal.
|
|
38
|
+
* @param {ParsingContext} context The parsing context.
|
|
39
|
+
* @return {StyleEvaluator} A function that evaluates to a style. The style returned by
|
|
40
|
+
* this function will be reused between invocations.
|
|
41
|
+
*/
|
|
42
|
+
export function buildStyle(flatStyle: FlatStyle, context: ParsingContext): StyleEvaluator;
|
|
43
|
+
export type FlatStyle = import("../../style/flat.js").FlatStyle;
|
|
44
|
+
export type EncodedExpression = import("../../expr/expression.js").EncodedExpression;
|
|
45
|
+
export type ParsingContext = import("../../expr/expression.js").ParsingContext;
|
|
46
|
+
export type CallExpression = import("../../expr/expression.js").CallExpression;
|
|
47
|
+
export type EvaluationContext = import("../../expr/cpu.js").EvaluationContext;
|
|
48
|
+
export type ExpressionEvaluator = import("../../expr/cpu.js").ExpressionEvaluator;
|
|
49
|
+
export type RuleSetEvaluator = (arg0: EvaluationContext) => Array<Style>;
|
|
50
|
+
export type CompiledRule = {
|
|
51
|
+
/**
|
|
52
|
+
* The compiled filter evaluator.
|
|
53
|
+
*/
|
|
54
|
+
filter: ExpressionEvaluator;
|
|
55
|
+
/**
|
|
56
|
+
* The list of compiled style evaluators.
|
|
57
|
+
*/
|
|
58
|
+
styles: Array<StyleEvaluator>;
|
|
59
|
+
};
|
|
60
|
+
export type StyleEvaluator = (arg0: EvaluationContext) => Style;
|
|
61
|
+
export type FillEvaluator = (arg0: EvaluationContext) => Fill;
|
|
62
|
+
export type StrokeEvaluator = (arg0: EvaluationContext) => Stroke;
|
|
63
|
+
export type TextEvaluator = (arg0: EvaluationContext) => Text;
|
|
64
|
+
export type ImageEvaluator = (arg0: EvaluationContext) => import("../../style/Image.js").default;
|
|
65
|
+
import Style from '../../style/Style.js';
|
|
66
|
+
import Fill from '../../style/Fill.js';
|
|
67
|
+
import Stroke from '../../style/Stroke.js';
|
|
68
|
+
import Text from '../../style/Text.js';
|
|
69
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["style.js"],"names":[],"mappings":"AA8DA;;;;;;;GAOG;AACH,4CAHW,MAAM,OAAO,qBAAqB,EAAE,IAAI,CAAC,GACxC,OAAO,sBAAsB,EAAE,aAAa,CAWvD;AAED;;;;;;;GAOG;AACH,sDAHW,MAAM,OAAO,qBAAqB,EAAE,SAAS,CAAC,GAC7C,OAAO,sBAAsB,EAAE,aAAa,CA4BvD;AAED;;GAEG;AAEH;;;;GAIG;AAEH;;;;GAIG;AACH,oCAJW,MAAM,OAAO,qBAAqB,EAAE,IAAI,CAAC,WACzC,cAAc,GACb,gBAAgB,CAyD3B;AAED;;GAEG;AAEH;;;;;GAKG;AACH,sCALW,SAAS,WACT,cAAc,GACb,cAAc,CA6BzB;wBAlMY,OAAO,qBAAqB,EAAE,SAAS;gCAIvC,OAAO,0BAA0B,EAAE,iBAAiB;6BAIpD,OAAO,0BAA0B,EAAE,cAAc;6BAIjD,OAAO,0BAA0B,EAAE,cAAc;gCAIjD,OAAO,mBAAmB,EAAE,iBAAiB;kCAI7C,OAAO,mBAAmB,EAAE,mBAAmB;sCAmEtC,iBAAiB,KAAE,MAAM,KAAK,CAAC;;;;;YAKvC,mBAAmB;;;;YACnB,MAAM,cAAc,CAAC;;oCAkEb,iBAAiB,KAAE,KAAK;mCAsCxB,iBAAiB,KAAE,IAAI;qCA+BvB,iBAAiB,KAAE,MAAM;mCAuGzB,iBAAiB,KAAE,IAAI;oCAyNvB,iBAAiB,KAAE,OAAO,sBAAsB,EAAE,OAAO;kBA1jB7D,sBAAsB;iBAJvB,qBAAqB;mBAGnB,uBAAuB;iBAEzB,qBAAqB"}
|