maplibre-gl 2.1.6 → 2.1.7
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/build/generate-query-test-fixtures.ts +7 -5
- package/build/generate-style-spec.ts +1 -1
- package/dist/maplibre-gl-csp-worker.js +2 -0
- package/dist/maplibre-gl-csp-worker.js.map +1 -0
- package/dist/maplibre-gl-csp.js +2 -0
- package/dist/maplibre-gl-csp.js.map +1 -0
- package/dist/maplibre-gl-dev.js +20 -3
- package/dist/maplibre-gl-unminified.js +39041 -0
- package/dist/maplibre-gl-unminified.js.map +1 -0
- package/dist/maplibre-gl.css +1 -1
- package/dist/maplibre-gl.d.ts +5 -14
- package/dist/maplibre-gl.js +2 -2
- package/dist/maplibre-gl.js.map +1 -1
- package/package.json +1 -2
- package/src/css/maplibre-gl.css +22 -48
- package/src/data/bucket/fill_bucket.test.ts +1 -1
- package/src/data/bucket/line_bucket.test.ts +1 -1
- package/src/data/feature_index.ts +1 -1
- package/src/render/glyph_manager.ts +17 -1
- package/src/render/uniform_binding.ts +1 -1
- package/src/source/geojson_source.ts +1 -1
- package/src/source/geojson_worker_source.test.ts +1 -1
- package/src/source/image_source.ts +1 -1
- package/src/source/query_features.ts +1 -1
- package/src/source/raster_dem_tile_source.ts +1 -1
- package/src/source/raster_tile_source.ts +1 -1
- package/src/source/source.ts +1 -1
- package/src/source/source_cache.test.ts +12 -0
- package/src/source/source_cache.ts +5 -1
- package/src/source/tile.ts +1 -1
- package/src/source/vector_tile_source.ts +1 -1
- package/src/source/video_source.ts +1 -1
- package/src/source/worker.test.ts +1 -1
- package/src/source/worker.ts +1 -1
- package/src/source/worker_source.ts +1 -1
- package/src/source/worker_tile.ts +1 -1
- package/src/style/create_style_layer.ts +1 -1
- package/src/style/evaluation_parameters.ts +1 -1
- package/src/style/light.test.ts +1 -1
- package/src/style/light.ts +1 -1
- package/src/style/properties.ts +1 -1
- package/src/style/style.test.ts +1 -1
- package/src/style/style.ts +1 -1
- package/src/style/style_layer/background_style_layer.ts +1 -1
- package/src/style/style_layer/circle_style_layer.ts +1 -1
- package/src/style/style_layer/custom_style_layer.ts +1 -1
- package/src/style/style_layer/fill_extrusion_style_layer.ts +1 -1
- package/src/style/style_layer/fill_style_layer.ts +1 -1
- package/src/style/style_layer/heatmap_style_layer.ts +1 -1
- package/src/style/style_layer/hillshade_style_layer.ts +1 -1
- package/src/style/style_layer/line_style_layer.ts +1 -1
- package/src/style/style_layer/raster_style_layer.ts +1 -1
- package/src/style/style_layer/symbol_style_layer.ts +1 -1
- package/src/style/style_layer.test.ts +1 -1
- package/src/style/style_layer.ts +1 -1
- package/src/style/style_layer_index.ts +1 -1
- package/src/style-spec/expression/index.ts +1 -1
- package/src/style-spec/feature_filter/convert.ts +1 -1
- package/src/style-spec/feature_filter/feature_filter.test.ts +1 -1
- package/src/style-spec/migrate/expressions.ts +1 -1
- package/src/style-spec/{types.ts → types.g.ts} +0 -0
- package/src/style-spec/visit.ts +1 -1
- package/src/ui/control/logo_control.test.ts +1 -1
- package/src/ui/events.ts +1 -1
- package/src/ui/map.test.ts +1 -1
- package/src/ui/map.ts +11 -6
|
@@ -4,7 +4,7 @@ import properties, {RasterPaintPropsPossiblyEvaluated} from './raster_style_laye
|
|
|
4
4
|
import {Transitionable, Transitioning, PossiblyEvaluated} from '../properties';
|
|
5
5
|
|
|
6
6
|
import type {RasterPaintProps} from './raster_style_layer_properties.g';
|
|
7
|
-
import type {LayerSpecification} from '../../style-spec/types';
|
|
7
|
+
import type {LayerSpecification} from '../../style-spec/types.g';
|
|
8
8
|
|
|
9
9
|
class RasterStyleLayer extends StyleLayer {
|
|
10
10
|
_transitionablePaint: Transitionable<RasterPaintProps>;
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import type {BucketParameters} from '../../data/bucket';
|
|
25
25
|
import type {SymbolLayoutProps, SymbolPaintProps} from './symbol_style_layer_properties.g';
|
|
26
26
|
import type EvaluationParameters from '../evaluation_parameters';
|
|
27
|
-
import type {LayerSpecification} from '../../style-spec/types';
|
|
27
|
+
import type {LayerSpecification} from '../../style-spec/types.g';
|
|
28
28
|
import type {Feature, SourceExpression, CompositeExpression} from '../../style-spec/expression';
|
|
29
29
|
import type {Expression} from '../../style-spec/expression/expression';
|
|
30
30
|
import type {CanonicalTileID} from '../../source/tile_id';
|
|
@@ -2,7 +2,7 @@ import createStyleLayer from './create_style_layer';
|
|
|
2
2
|
import FillStyleLayer from './style_layer/fill_style_layer';
|
|
3
3
|
import {extend} from '../util/util';
|
|
4
4
|
import Color from '../style-spec/util/color';
|
|
5
|
-
import {LayerSpecification} from '../style-spec/types';
|
|
5
|
+
import {LayerSpecification} from '../style-spec/types.g';
|
|
6
6
|
import EvaluationParameters from './evaluation_parameters';
|
|
7
7
|
import {TransitionParameters} from './properties';
|
|
8
8
|
import BackgroundStyleLayer from './style_layer/background_style_layer';
|
package/src/style/style_layer.ts
CHANGED
|
@@ -23,7 +23,7 @@ import type Transform from '../geo/transform';
|
|
|
23
23
|
import type {
|
|
24
24
|
LayerSpecification,
|
|
25
25
|
FilterSpecification
|
|
26
|
-
} from '../style-spec/types';
|
|
26
|
+
} from '../style-spec/types.g';
|
|
27
27
|
import type {CustomLayerInterface} from './style_layer/custom_style_layer';
|
|
28
28
|
import type Map from '../ui/map';
|
|
29
29
|
import type {StyleSetterOptions} from './style';
|
|
@@ -5,7 +5,7 @@ import featureFilter from '../style-spec/feature_filter';
|
|
|
5
5
|
import groupByLayout from '../style-spec/group_by_layout';
|
|
6
6
|
|
|
7
7
|
import type {TypedStyleLayer} from './style_layer/typed_style_layer';
|
|
8
|
-
import type {LayerSpecification} from '../style-spec/types';
|
|
8
|
+
import type {LayerSpecification} from '../style-spec/types.g';
|
|
9
9
|
|
|
10
10
|
export type LayerConfigs = {[_: string]: LayerSpecification};
|
|
11
11
|
export type Family<Layer extends TypedStyleLayer> = Array<Layer>;
|
|
@@ -21,7 +21,7 @@ import type {Expression} from './expression';
|
|
|
21
21
|
import type {StylePropertySpecification} from '../style-spec';
|
|
22
22
|
import type {Result} from '../util/result';
|
|
23
23
|
import type {InterpolationType} from './definitions/interpolate';
|
|
24
|
-
import type {PropertyValueSpecification} from '../types';
|
|
24
|
+
import type {PropertyValueSpecification} from '../types.g';
|
|
25
25
|
import type {FormattedSection} from './types/formatted';
|
|
26
26
|
import type Point from '@mapbox/point-geometry';
|
|
27
27
|
import type {CanonicalTileID} from '../../source/tile_id';
|
|
@@ -5,7 +5,7 @@ import Point from '@mapbox/point-geometry';
|
|
|
5
5
|
import MercatorCoordinate from '../../geo/mercator_coordinate';
|
|
6
6
|
import EXTENT from '../../data/extent';
|
|
7
7
|
import {CanonicalTileID} from '../../source/tile_id';
|
|
8
|
-
import {FilterSpecification} from '../types';
|
|
8
|
+
import {FilterSpecification} from '../types.g';
|
|
9
9
|
import {Feature} from '../expression';
|
|
10
10
|
|
|
11
11
|
describe('filter', () => {
|
|
@@ -3,7 +3,7 @@ import {isExpression} from '../expression';
|
|
|
3
3
|
import convertFunction, {convertTokenString} from '../function/convert';
|
|
4
4
|
import convertFilter from '../feature_filter/convert';
|
|
5
5
|
|
|
6
|
-
import type {FilterSpecification, LayerSpecification, StyleSpecification} from '../types';
|
|
6
|
+
import type {FilterSpecification, LayerSpecification, StyleSpecification} from '../types.g';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Migrate the given style object in place to use expressions. Specifically,
|
|
File without changes
|
package/src/style-spec/visit.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
LayerSpecification,
|
|
7
7
|
PropertyValueSpecification,
|
|
8
8
|
DataDrivenPropertyValueSpecification
|
|
9
|
-
} from './types';
|
|
9
|
+
} from './types.g';
|
|
10
10
|
|
|
11
11
|
function getPropertyReference(propertyName): StylePropertySpecification {
|
|
12
12
|
for (let i = 0; i < Reference.layout.length; i++) {
|
|
@@ -98,9 +98,9 @@ describe('LogoControl', () => {
|
|
|
98
98
|
map.on('sourcedata', (e) => {
|
|
99
99
|
if (e.isSourceLoaded && e.sourceId === 'source2' && e.sourceDataType === 'metadata') {
|
|
100
100
|
expect(map.getContainer().querySelectorAll('.maplibregl-ctrl-logo')).toHaveLength(1);
|
|
101
|
+
done();
|
|
101
102
|
}
|
|
102
103
|
});
|
|
103
|
-
done();
|
|
104
104
|
});
|
|
105
105
|
|
|
106
106
|
});
|
package/src/ui/events.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {extend} from '../util/util';
|
|
|
6
6
|
|
|
7
7
|
import type Map from './map';
|
|
8
8
|
import type LngLat from '../geo/lng_lat';
|
|
9
|
-
import {SourceSpecification} from '../style-spec/types';
|
|
9
|
+
import {SourceSpecification} from '../style-spec/types.g';
|
|
10
10
|
|
|
11
11
|
export type MapLayerMouseEvent = MapMouseEvent & { features?: GeoJSON.Feature[] };
|
|
12
12
|
|
package/src/ui/map.test.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {OverscaledTileID} from '../source/tile_id';
|
|
|
6
6
|
import {Event, ErrorEvent} from '../util/evented';
|
|
7
7
|
import simulate from '../../test/unit/lib/simulate_interaction';
|
|
8
8
|
import {fixedLngLat, fixedNum} from '../../test/unit/lib/fixed';
|
|
9
|
-
import {LayerSpecification, SourceSpecification, StyleSpecification} from '../style-spec/types';
|
|
9
|
+
import {LayerSpecification, SourceSpecification, StyleSpecification} from '../style-spec/types.g';
|
|
10
10
|
import {RequestTransformFunction} from '../util/request_manager';
|
|
11
11
|
import {extend} from '../util/util';
|
|
12
12
|
import {LngLatBoundsLike} from '../geo/lng_lat_bounds';
|
package/src/ui/map.ts
CHANGED
|
@@ -52,7 +52,7 @@ import type {
|
|
|
52
52
|
StyleSpecification,
|
|
53
53
|
LightSpecification,
|
|
54
54
|
SourceSpecification
|
|
55
|
-
} from '../style-spec/types';
|
|
55
|
+
} from '../style-spec/types.g';
|
|
56
56
|
import {Callback} from '../types/callback';
|
|
57
57
|
import type {ControlPosition, IControl} from './control/control';
|
|
58
58
|
|
|
@@ -917,7 +917,12 @@ class Map extends Camera {
|
|
|
917
917
|
return this._rotating || this.handlers.isRotating();
|
|
918
918
|
}
|
|
919
919
|
|
|
920
|
-
_createDelegatedListener(type: MapEvent, layerId:
|
|
920
|
+
_createDelegatedListener(type: MapEvent, layerId: string, listener: Listener):
|
|
921
|
+
{
|
|
922
|
+
layer: string;
|
|
923
|
+
listener: Listener;
|
|
924
|
+
delegates: {[type in keyof MapEventType]?: (e: any) => void};
|
|
925
|
+
} {
|
|
921
926
|
if (type === 'mouseenter' || type === 'mouseover') {
|
|
922
927
|
let mousein = false;
|
|
923
928
|
const mousemove = (e) => {
|
|
@@ -1078,14 +1083,14 @@ class Map extends Camera {
|
|
|
1078
1083
|
return super.on(type, layerIdOrListener as Listener);
|
|
1079
1084
|
}
|
|
1080
1085
|
|
|
1081
|
-
const delegatedListener = this._createDelegatedListener(type, layerIdOrListener, listener);
|
|
1086
|
+
const delegatedListener = this._createDelegatedListener(type, layerIdOrListener as string, listener);
|
|
1082
1087
|
|
|
1083
1088
|
this._delegatedListeners = this._delegatedListeners || {};
|
|
1084
1089
|
this._delegatedListeners[type] = this._delegatedListeners[type] || [];
|
|
1085
1090
|
this._delegatedListeners[type].push(delegatedListener);
|
|
1086
1091
|
|
|
1087
1092
|
for (const event in delegatedListener.delegates) {
|
|
1088
|
-
this.on(event as
|
|
1093
|
+
this.on(event as MapEvent, delegatedListener.delegates[event]);
|
|
1089
1094
|
}
|
|
1090
1095
|
|
|
1091
1096
|
return this;
|
|
@@ -1133,10 +1138,10 @@ class Map extends Camera {
|
|
|
1133
1138
|
return super.once(type, layerIdOrListener as Listener);
|
|
1134
1139
|
}
|
|
1135
1140
|
|
|
1136
|
-
const delegatedListener = this._createDelegatedListener(type, layerIdOrListener, listener);
|
|
1141
|
+
const delegatedListener = this._createDelegatedListener(type, layerIdOrListener as string, listener);
|
|
1137
1142
|
|
|
1138
1143
|
for (const event in delegatedListener.delegates) {
|
|
1139
|
-
this.once(event as
|
|
1144
|
+
this.once(event as MapEvent, delegatedListener.delegates[event]);
|
|
1140
1145
|
}
|
|
1141
1146
|
|
|
1142
1147
|
return this;
|