[Maps] update MapLibre to 2.1.latest (#127501)

* [Maps] update MapLibre to 2.0

* fix ts erros in sort_layers test

* more ts fixes

* tslint fixes

* replace deprecated properties

* revert previous change

* get map to fire load event

* revert changes to setting and clearing featureState

* incorporate type fixes to maplibre

* replace GeoJSONFeature with MapGeoJSONFeature

* bump to prerelease 3, eslint

* vega type fixes

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* update to 2.1.9 release and fix remaining ts errors

* upgrade to ems-client 8.3.0

* update license check

* cleanup

* remove cast to unknown

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Nathan Reese 2022-04-21 07:02:57 -06:00 committed by GitHub
parent b5322c77b1
commit 275ce8f055
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 266 additions and 227 deletions

View file

@ -107,7 +107,7 @@
"@elastic/charts": "46.0.1",
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.2.0-canary.2",
"@elastic/ems-client": "8.2.0",
"@elastic/ems-client": "8.3.0",
"@elastic/eui": "54.0.0",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
@ -307,7 +307,7 @@
"lru-cache": "^4.1.5",
"lz-string": "^1.4.4",
"mapbox-gl-draw-rectangle-mode": "1.0.4",
"maplibre-gl": "1.15.2",
"maplibre-gl": "2.1.9",
"markdown-it": "^12.3.2",
"md5": "^2.1.0",
"mdast-util-to-hast": "10.0.1",

View file

@ -8,51 +8,56 @@
import type {
Map,
LayerSpecification,
Source,
GeoJSONSource,
VectorSource,
Layer,
AnyLayer,
FeatureIdentifier,
Style,
MapboxOptions,
VectorTileSource,
StyleSpecification,
MapEvent,
MapOptions,
MapMouseEvent,
MapSourceDataEvent,
LngLat,
LngLatBounds,
Point2D,
PointLike,
MapboxGeoJSONFeature,
Point,
MapGeoJSONFeature,
CustomLayerInterface,
FilterSpecification,
FeatureIdentifier,
} from 'maplibre-gl';
// @ts-expect-error
import mapboxglDist from 'maplibre-gl/dist/maplibre-gl-csp';
import maplibreglDist from 'maplibre-gl/dist/maplibre-gl-csp';
// @ts-expect-error
import mbRtlPlugin from '!!file-loader!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min.js';
// @ts-expect-error
import mbWorkerUrl from '!!file-loader!maplibre-gl/dist/maplibre-gl-csp-worker';
import 'maplibre-gl/dist/maplibre-gl.css';
const mapboxgl: any = mapboxglDist;
mapboxgl.workerUrl = mbWorkerUrl;
mapboxgl.setRTLTextPlugin(mbRtlPlugin);
const maplibregl: any = maplibreglDist;
maplibregl.workerUrl = mbWorkerUrl;
maplibregl.setRTLTextPlugin(mbRtlPlugin);
export { mapboxgl };
export { maplibregl };
export type {
Map,
LayerSpecification,
StyleSpecification,
Source,
GeoJSONSource,
VectorSource,
Layer,
AnyLayer,
FeatureIdentifier,
Style,
MapboxOptions,
VectorTileSource,
MapEvent,
MapOptions,
MapMouseEvent,
MapSourceDataEvent,
LngLat,
LngLatBounds,
Point2D,
PointLike,
MapboxGeoJSONFeature,
Point,
MapGeoJSONFeature,
CustomLayerInterface,
FilterSpecification,
FeatureIdentifier,
};

View file

@ -76,7 +76,7 @@ export const DEV_ONLY_LICENSE_ALLOWED = ['MPL-2.0'];
export const LICENSE_OVERRIDES = {
'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
'@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
'@elastic/ems-client@8.2.0': ['Elastic License 2.0'],
'@elastic/ems-client@8.3.0': ['Elastic License 2.0'],
'@elastic/eui@54.0.0': ['SSPL-1.0 OR Elastic License 2.0'],
'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODCBy license https://github.com/mattcg/language-subtag-registry
};

View file

@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
import type { Style } from '@kbn/mapbox-gl';
import type { StyleSpecification } from '@kbn/mapbox-gl';
export const vegaLayerId = 'vega';
export const defaultMapConfig = {
@ -15,7 +15,7 @@ export const defaultMapConfig = {
tileSize: 256,
};
export const defaultMabBoxStyle: Style = {
export const defaultMabBoxStyle: StyleSpecification = {
/**
* according to the MapBox documentation that value should be '8'
* @see (https://docs.mapbox.com/mapbox-gl-js/style-spec/root/#version)

View file

@ -29,14 +29,14 @@ import {
} from '../../services';
import { initVegaLayer, initTmsRasterLayer } from './layers';
import { mapboxgl } from '@kbn/mapbox-gl';
import { maplibregl } from '@kbn/mapbox-gl';
jest.mock('@kbn/mapbox-gl', () => {
const zoomTo = jest.fn();
const setCenter = jest.fn();
const fitBounds = jest.fn();
return {
mapboxgl: {
maplibregl: {
mocks: {
zoomTo,
setCenter,
@ -171,7 +171,7 @@ describe('vega_map_view/view', () => {
await vegaMapView.init();
const { longitude, latitude, scrollWheelZoom } = vegaMapView._parser.mapConfig;
expect(mapboxgl.Map).toHaveBeenCalledWith({
expect(maplibregl.Map).toHaveBeenCalledWith({
style: {
version: 8,
sources: {},
@ -195,7 +195,7 @@ describe('vega_map_view/view', () => {
await vegaMapView.init();
const { longitude, latitude, scrollWheelZoom } = vegaMapView._parser.mapConfig;
expect(mapboxgl.Map).toHaveBeenCalledWith({
expect(maplibregl.Map).toHaveBeenCalledWith({
style: {
version: 8,
sources: {},
@ -217,7 +217,7 @@ describe('vega_map_view/view', () => {
const vegaMapView = await createVegaMapView();
await vegaMapView.init();
expect(mapboxgl.NavigationControl).toHaveBeenCalled();
expect(maplibregl.NavigationControl).toHaveBeenCalled();
});
describe('setMapView', () => {
@ -225,25 +225,25 @@ describe('vega_map_view/view', () => {
beforeEach(async () => {
vegaMapView = await createVegaMapView();
await vegaMapView.init();
mapboxgl.mocks.setCenter.mockReset();
mapboxgl.mocks.zoomTo.mockReset();
mapboxgl.mocks.fitBounds.mockReset();
maplibregl.mocks.setCenter.mockReset();
maplibregl.mocks.zoomTo.mockReset();
maplibregl.mocks.fitBounds.mockReset();
});
test('should set just lat lng', async () => {
vegaMapView.setMapViewHandler(1, 2);
expect(mapboxgl.mocks.setCenter).toHaveBeenCalledWith({ lat: 1, lng: 2 });
expect(maplibregl.mocks.setCenter).toHaveBeenCalledWith({ lat: 1, lng: 2 });
});
test('should set just lng lat via array', async () => {
vegaMapView.setMapViewHandler([1, 2]);
expect(mapboxgl.mocks.setCenter).toHaveBeenCalledWith({ lat: 2, lng: 1 });
expect(maplibregl.mocks.setCenter).toHaveBeenCalledWith({ lat: 2, lng: 1 });
});
test('should set lat lng and zoom', async () => {
vegaMapView.setMapViewHandler(1, 2, 6);
expect(mapboxgl.mocks.setCenter).toHaveBeenCalledWith({ lat: 1, lng: 2 });
expect(mapboxgl.mocks.zoomTo).toHaveBeenCalledWith(6);
expect(maplibregl.mocks.setCenter).toHaveBeenCalledWith({ lat: 1, lng: 2 });
expect(maplibregl.mocks.zoomTo).toHaveBeenCalledWith(6);
});
test('should set bounds', async () => {
@ -251,7 +251,7 @@ describe('vega_map_view/view', () => {
[1, 2],
[6, 7],
]);
expect(mapboxgl.mocks.fitBounds).toHaveBeenCalledWith([
expect(maplibregl.mocks.fitBounds).toHaveBeenCalledWith([
{ lat: 2, lng: 1 },
{ lat: 7, lng: 6 },
]);

View file

@ -7,11 +7,11 @@
*/
import { i18n } from '@kbn/i18n';
import type { Map, Style, MapboxOptions } from '@kbn/mapbox-gl';
import type { Map, StyleSpecification, MapOptions } from '@kbn/mapbox-gl';
import { View, parse, expressionFunction } from 'vega';
import { mapboxgl } from '@kbn/mapbox-gl';
import { maplibregl } from '@kbn/mapbox-gl';
import { initTmsRasterLayer, initVegaLayer } from './layers';
import { VegaBaseView } from '../vega_base_view';
@ -76,7 +76,7 @@ export class VegaMapView extends VegaBaseView {
return Boolean(this._parser.mapConfig.zoomControl);
}
private getMapParams(defaults: { maxZoom: number; minZoom: number }): Partial<MapboxOptions> {
private getMapParams(defaults: { maxZoom: number; minZoom: number }): Partial<MapOptions> {
const { longitude, latitude, scrollWheelZoom } = this._parser.mapConfig;
const { zoom, maxZoom, minZoom } = validateZoomSettings(
this._parser.mapConfig,
@ -106,8 +106,8 @@ export class VegaMapView extends VegaBaseView {
}
private async initMapContainer(vegaView: View) {
let style: Style = defaultMabBoxStyle;
let customAttribution: MapboxOptions['customAttribution'] = [];
let style: StyleSpecification = defaultMabBoxStyle;
let customAttribution: MapOptions['customAttribution'] = [];
const zoomSettings = {
minZoom: defaultMapConfig.minZoom,
maxZoom: defaultMapConfig.maxZoom,
@ -129,7 +129,7 @@ export class VegaMapView extends VegaBaseView {
zoomSettings.maxZoom = defaultMapConfig.maxZoom;
zoomSettings.minZoom = defaultMapConfig.minZoom;
customAttribution = this._serviceSettings.getAttributionsFromTMSServce(tmsService);
style = (await tmsService.getVectorStyleSheet()) as Style;
style = (await tmsService.getVectorStyleSheet()) as StyleSpecification;
} else {
const config = this._serviceSettings.getTileMapConfig();
customAttribution = config.options.attribution;
@ -140,7 +140,7 @@ export class VegaMapView extends VegaBaseView {
// For the correct geration of the PDF/PNG report, we must wait until the map is fully rendered.
return new Promise((resolve) => {
const mapBoxInstance = new mapboxgl.Map({
const mapBoxInstance = new maplibregl.Map({
style,
customAttribution,
container: this._$container.get(0),
@ -171,7 +171,10 @@ export class VegaMapView extends VegaBaseView {
private initControls(mapBoxInstance: Map) {
if (this.shouldShowZoomControl) {
mapBoxInstance.addControl(new mapboxgl.NavigationControl({ showCompass: false }), 'top-left');
mapBoxInstance.addControl(
new maplibregl.NavigationControl({ showCompass: false }),
'top-left'
);
}
// disable map rotation using right click + drag

View file

@ -3,12 +3,12 @@
.mapContainer {
flex-grow: 1;
.mapboxgl-ctrl-top-left .mapboxgl-ctrl {
.maplibregl-ctrl-top-left .maplibregl-ctrl {
margin-left: $euiSizeM;
margin-top: $euiSizeM;
}
.mapboxgl-ctrl-group:not(:empty) {
.maplibregl-ctrl-group:not(:empty) {
@include euiBottomShadowLarge;
@include mapToolbarButtonGroupBorderRadius;
background-color: $euiColorEmptyShade;
@ -27,7 +27,7 @@
}
}
.mapboxgl-ctrl button:not(:disabled) {
.maplibregl-ctrl button:not(:disabled) {
transition: background $euiAnimSpeedNormal ease-in-out;
&:hover {
@ -35,14 +35,14 @@
}
}
.mapboxgl-ctrl-group button:focus:focus-visible {
.maplibregl-ctrl-group button:focus:focus-visible {
box-shadow: none;
}
}
// Custom SVG as background for zoom controls based off of EUI glyphs plusInCircleFilled and minusInCircleFilled
// Also fixes dark mode
.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon {
.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {
// sass-lint:disable-block no-important
background-repeat: no-repeat !important;
// sass-lint:disable-block quotes
@ -50,7 +50,7 @@
background-position: center !important;
}
.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon {
.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
// sass-lint:disable-block no-important
background-repeat: no-repeat !important;
// sass-lint:disable-block quotes

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import type { Map as MbMap, Layer as MbLayer, Style as MbStyle } from '@kbn/mapbox-gl';
import type { Map as MbMap, LayerSpecification, StyleSpecification } from '@kbn/mapbox-gl';
import _ from 'lodash';
// @ts-expect-error
import { RGBAImage } from './image_utils';
@ -38,7 +38,7 @@ export interface EmsSpriteSheet {
interface SourceRequestData {
spriteSheetImageData?: ImageData;
vectorStyleSheet?: MbStyle;
vectorStyleSheet?: StyleSpecification;
spriteMeta?: {
png: string;
json: EmsSpriteSheet;
@ -141,7 +141,7 @@ export class EmsVectorTileLayer extends AbstractLayer {
return `${this._generateMbSourceIdPrefix()}${name}`;
}
_getVectorStyle() {
_getVectorStyle(): StyleSpecification | null | undefined {
const sourceDataRequest = this.getSourceDataRequest();
if (!sourceDataRequest) {
return null;
@ -317,8 +317,8 @@ export class EmsVectorTileLayer extends AbstractLayer {
const newLayerObject = {
...layer,
source: this._generateMbSourceId(
typeof (layer as MbLayer).source === 'string'
? ((layer as MbLayer).source as string)
'source' in layer && typeof layer.source === 'string'
? (layer.source as string)
: undefined
),
id: mbLayerId,
@ -375,7 +375,7 @@ export class EmsVectorTileLayer extends AbstractLayer {
return [];
}
_setOpacityForType(mbMap: MbMap, mbLayer: MbLayer, mbLayerId: string) {
_setOpacityForType(mbMap: MbMap, mbLayer: LayerSpecification, mbLayerId: string) {
this._getOpacityProps(mbLayer.type).forEach((opacityProp) => {
const mbPaint = mbLayer.paint as { [key: string]: unknown } | undefined;
if (mbPaint && typeof mbPaint[opacityProp] === 'number') {
@ -387,7 +387,7 @@ export class EmsVectorTileLayer extends AbstractLayer {
});
}
_setLayerZoomRange(mbMap: MbMap, mbLayer: MbLayer, mbLayerId: string) {
_setLayerZoomRange(mbMap: MbMap, mbLayer: LayerSpecification, mbLayerId: string) {
let minZoom = this.getMinZoom();
if (typeof mbLayer.minzoom === 'number') {
minZoom = Math.max(minZoom, mbLayer.minzoom);

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import type { Map as MbMap, VectorSource as MbVectorSource } from '@kbn/mapbox-gl';
import type { Map as MbMap, VectorTileSource } from '@kbn/mapbox-gl';
import { AbstractLayer } from '../layer';
import { HeatmapStyle } from '../../styles/heatmap/heatmap_style';
import { LAYER_TYPE } from '../../../../common/constants';
@ -97,7 +97,7 @@ export class HeatmapLayer extends AbstractLayer {
}
_requiresPrevSourceCleanup(mbMap: MbMap): boolean {
const mbSource = mbMap.getSource(this.getMbSourceId()) as MbVectorSource;
const mbSource = mbMap.getSource(this.getMbSourceId()) as VectorTileSource;
if (!mbSource) {
return false;
}

View file

@ -10,7 +10,7 @@ import React from 'react';
import { i18n } from '@kbn/i18n';
import { EuiIcon } from '@elastic/eui';
import { Feature, FeatureCollection } from 'geojson';
import type { Map as MbMap, GeoJSONSource as MbGeoJSONSource } from '@kbn/mapbox-gl';
import type { FilterSpecification, Map as MbMap, GeoJSONSource } from '@kbn/mapbox-gl';
import {
EMPTY_FEATURE_COLLECTION,
FEATURE_VISIBLE_PROPERTY_NAME,
@ -160,7 +160,7 @@ export class GeoJsonVectorLayer extends AbstractVectorLayer {
this._setMbLinePolygonProperties(mbMap, undefined, timesliceMaskConfig);
}
_getJoinFilterExpression(): unknown | undefined {
_getJoinFilterExpression(): FilterSpecification | undefined {
return this.hasJoins()
? // Remove unjoined source features by filtering out features without GeoJSON feature.property[FEATURE_VISIBLE_PROPERTY_NAME] is true
['==', ['get', FEATURE_VISIBLE_PROPERTY_NAME], true]
@ -168,7 +168,7 @@ export class GeoJsonVectorLayer extends AbstractVectorLayer {
}
_syncFeatureCollectionWithMb(mbMap: MbMap) {
const mbGeoJSONSource = mbMap.getSource(this.getId()) as MbGeoJSONSource;
const mbGeoJSONSource = mbMap.getSource(this.getId()) as GeoJSONSource;
const featureCollection = this._getSourceFeatureCollection();
const featureCollectionOnMap = AbstractLayer.getBoundDataForSource(mbMap, this.getId());

View file

@ -8,10 +8,10 @@
import _ from 'lodash';
import type {
FeatureIdentifier,
FilterSpecification,
Map as MbMap,
AnyLayer as MbLayer,
GeoJSONSource as MbGeoJSONSource,
VectorSource as MbVectorSource,
LayerSpecification,
VectorTileSource,
} from '@kbn/mapbox-gl';
import { Feature } from 'geojson';
import { i18n } from '@kbn/i18n';
@ -302,7 +302,7 @@ export class MvtVectorLayer extends AbstractVectorLayer {
return this.makeMbLayerId('toomanyfeatures');
}
_getJoinFilterExpression(): unknown | undefined {
_getJoinFilterExpression(): FilterSpecification | undefined {
const { join, joinPropertiesMap } = this._getJoinResults();
if (!join) {
return undefined;
@ -321,13 +321,13 @@ export class MvtVectorLayer extends AbstractVectorLayer {
return joinKeys.length
? // Unable to check FEATURE_VISIBLE_PROPERTY_NAME flag since filter expressions do not support feature-state
// Instead, remove unjoined source features by filtering out features without matching join keys
[
([
'match',
['get', join.getLeftField().getName()],
joinKeys,
true, // match value
false, // fallback - value with no match
]
] as FilterSpecification)
: hideAllFilter;
}
@ -408,7 +408,7 @@ export class MvtVectorLayer extends AbstractVectorLayer {
const tooManyFeaturesLayerId = this._getMbTooManyFeaturesLayerId();
if (!mbMap.getLayer(tooManyFeaturesLayerId)) {
const mbTooManyFeaturesLayer: MbLayer = {
const mbTooManyFeaturesLayer: LayerSpecification = {
id: tooManyFeaturesLayerId,
type: 'line',
source: this.getId(),
@ -448,7 +448,7 @@ export class MvtVectorLayer extends AbstractVectorLayer {
// Must remove/add vector source to update source attributes.
// _requiresPrevSourceCleanup returns true when vector source needs to be removed so it can be re-added with updated attributes
_requiresPrevSourceCleanup(mbMap: MbMap): boolean {
const mbSource = mbMap.getSource(this.getMbSourceId()) as MbVectorSource | MbGeoJSONSource;
const mbSource = mbMap.getSource(this.getMbSourceId());
if (!mbSource) {
return false;
}
@ -456,7 +456,7 @@ export class MvtVectorLayer extends AbstractVectorLayer {
// Expected source is not compatible, so remove.
return true;
}
const mbTileSource = mbSource as MbVectorSource;
const mbTileSource = mbSource as VectorTileSource;
const sourceDataRequest = this.getSourceDataRequest();
if (!sourceDataRequest) {
@ -484,9 +484,7 @@ export class MvtVectorLayer extends AbstractVectorLayer {
// but the programmable JS-object uses camelcase `sourceLayer`
if (
mbLayer &&
// @ts-expect-error
mbLayer.sourceLayer !== sourceData.tileSourceLayer &&
// @ts-expect-error
mbLayer.sourceLayer !== ES_MVT_META_LAYER_NAME
) {
// If the source-pointer of one of the layers is stale, they will all be stale.

View file

@ -7,7 +7,7 @@
import React from 'react';
import uuid from 'uuid/v4';
import type { Map as MbMap, AnyLayer as MbLayer } from '@kbn/mapbox-gl';
import type { FilterSpecification, Map as MbMap, LayerSpecification } from '@kbn/mapbox-gl';
import type { Query } from '@kbn/data-plugin/common';
import { Feature, GeoJsonProperties, Geometry, Position } from 'geojson';
import _ from 'lodash';
@ -673,7 +673,7 @@ export class AbstractVectorLayer extends AbstractLayer implements IVectorLayer {
}
}
_getJoinFilterExpression(): unknown | undefined {
_getJoinFilterExpression(): FilterSpecification | undefined {
return undefined;
}
@ -698,7 +698,7 @@ export class AbstractVectorLayer extends AbstractLayer implements IVectorLayer {
if (this.getCurrentStyle().arePointsSymbolizedAsCircles()) {
markerLayerId = pointLayerId;
if (!pointLayer) {
const mbLayer: MbLayer = {
const mbLayer: LayerSpecification = {
id: pointLayerId,
type: 'circle',
source: sourceId,
@ -716,7 +716,7 @@ export class AbstractVectorLayer extends AbstractLayer implements IVectorLayer {
} else {
markerLayerId = symbolLayerId;
if (!symbolLayer) {
const mbLayer: MbLayer = {
const mbLayer: LayerSpecification = {
id: symbolLayerId,
type: 'symbol',
source: sourceId,
@ -768,7 +768,7 @@ export class AbstractVectorLayer extends AbstractLayer implements IVectorLayer {
const lineLayerId = this._getMbLineLayerId();
if (!mbMap.getLayer(fillLayerId)) {
const mbLayer: MbLayer = {
const mbLayer: LayerSpecification = {
id: fillLayerId,
type: 'fill',
source: sourceId,
@ -780,7 +780,7 @@ export class AbstractVectorLayer extends AbstractLayer implements IVectorLayer {
mbMap.addLayer(mbLayer, labelLayerId);
}
if (!mbMap.getLayer(lineLayerId)) {
const mbLayer: MbLayer = {
const mbLayer: LayerSpecification = {
id: lineLayerId,
type: 'line',
source: sourceId,
@ -824,7 +824,7 @@ export class AbstractVectorLayer extends AbstractLayer implements IVectorLayer {
const labelLayerId = this._getMbLabelLayerId();
const labelLayer = mbMap.getLayer(labelLayerId);
if (!labelLayer) {
const mbLayer: MbLayer = {
const mbLayer: LayerSpecification = {
id: labelLayerId,
type: 'symbol',
source: this.getId(),

View file

@ -16,7 +16,7 @@ import {
EuiTitle,
EuiToolTip,
} from '@elastic/eui';
import { mapboxgl, Map as MapboxMap } from '@kbn/mapbox-gl';
import { maplibregl, Map as MapboxMap } from '@kbn/mapbox-gl';
import { i18n } from '@kbn/i18n';
import { ResizeChecker } from '@kbn/kibana-utils-plugin/public';
import {
@ -94,7 +94,6 @@ export class IconPreview extends Component<Props, State> {
}
const imageData = await createSdfIcon({ svg, cutoff, radius });
if (map.hasImage(IconPreview.iconId)) {
// @ts-expect-error
map.updateImage(IconPreview.iconId, imageData);
} else {
map.addImage(IconPreview.iconId, imageData, {
@ -128,7 +127,7 @@ export class IconPreview extends Component<Props, State> {
}
_createMapInstance(): MapboxMap {
const map = new mapboxgl.Map({
const map = new maplibregl.Map({
container: this._containerRef!,
interactive: false,
center: [0, 0],

View file

@ -5,6 +5,7 @@
* 2.0.
*/
import type { FilterSpecification } from '@kbn/mapbox-gl';
import { GEO_JSON_TYPE, KBN_IS_CENTROID_FEATURE } from '../../../common/constants';
import { Timeslice } from '../../../common/descriptor_types';
@ -14,14 +15,18 @@ export interface TimesliceMaskConfig {
timeslice: Timeslice;
}
export const EXCLUDE_CENTROID_FEATURES = ['!=', ['get', KBN_IS_CENTROID_FEATURE], true];
export const EXCLUDE_CENTROID_FEATURES = [
'!=',
['get', KBN_IS_CENTROID_FEATURE],
true,
] as FilterSpecification;
function getFilterExpression(
filters: unknown[],
joinFilter?: unknown,
filters: FilterSpecification[],
joinFilter?: FilterSpecification,
timesliceMaskConfig?: TimesliceMaskConfig
) {
const allFilters: unknown[] = [...filters];
): FilterSpecification {
const allFilters: FilterSpecification[] = [...filters];
if (joinFilter) {
allFilters.push(joinFilter);
@ -45,9 +50,9 @@ function getFilterExpression(
}
export function getFillFilterExpression(
joinFilter?: unknown,
joinFilter?: FilterSpecification,
timesliceMaskConfig?: TimesliceMaskConfig
): unknown[] {
): FilterSpecification {
return getFilterExpression(
[
// explicit EXCLUDE_CENTROID_FEATURES filter not needed. Centroids are points and are filtered out by geometry narrowing
@ -63,9 +68,9 @@ export function getFillFilterExpression(
}
export function getLineFilterExpression(
joinFilter?: unknown,
joinFilter?: FilterSpecification,
timesliceMaskConfig?: TimesliceMaskConfig
): unknown[] {
): FilterSpecification {
return getFilterExpression(
[
// explicit EXCLUDE_CENTROID_FEATURES filter not needed. Centroids are points and are filtered out by geometry narrowing
@ -89,9 +94,9 @@ const IS_POINT_FEATURE = [
];
export function getPointFilterExpression(
joinFilter?: unknown,
joinFilter?: FilterSpecification,
timesliceMaskConfig?: TimesliceMaskConfig
): unknown[] {
): FilterSpecification {
return getFilterExpression(
[EXCLUDE_CENTROID_FEATURES, IS_POINT_FEATURE],
joinFilter,
@ -101,10 +106,10 @@ export function getPointFilterExpression(
export function getLabelFilterExpression(
isSourceGeoJson: boolean,
joinFilter?: unknown,
joinFilter?: FilterSpecification,
timesliceMaskConfig?: TimesliceMaskConfig
): unknown[] {
const filters: unknown[] = [];
): FilterSpecification {
const filters: FilterSpecification[] = [];
if (isSourceGeoJson) {
// Centroid feature added to GeoJSON feature collection for LINE_STRING, MULTI_LINE_STRING, POLYGON, MULTI_POLYGON, and GEOMETRY_COLLECTION geometries

View file

@ -6,14 +6,13 @@
*/
import React, { Component } from 'react';
import { Map as MbMap, Point as MbPoint } from '@kbn/mapbox-gl';
// @ts-expect-error
import MapboxDraw from '@mapbox/mapbox-gl-draw';
import { Feature, Geometry, Position } from 'geojson';
import { i18n } from '@kbn/i18n';
// @ts-expect-error
import * as jsts from 'jsts';
import { MapMouseEvent } from '@kbn/mapbox-gl';
import type { Map as MbMap, MapMouseEvent, PointLike } from '@kbn/mapbox-gl';
import { getToasts } from '../../../../kibana_services';
import { DrawControl } from '../draw_control';
import { DRAW_MODE, DRAW_SHAPE } from '../../../../../common/constants';
@ -84,7 +83,7 @@ export class DrawFeatureControl extends Component<Props, {}> {
};
_onClick = async (event: MapMouseEvent, drawControl?: MapboxDraw) => {
const mbLngLatPoint: MbPoint = event.point;
const mbLngLatPoint: PointLike = event.point;
// Currently feature deletion is the only onClick handling
if (!this.props.editLayer || this.props.drawShape !== DRAW_SHAPE.DELETE) {
return;
@ -103,7 +102,7 @@ export class DrawFeatureControl extends Component<Props, {}> {
x: mbLngLatPoint.x + PADDING,
y: mbLngLatPoint.y + PADDING,
},
] as [MbPoint, MbPoint];
] as [PointLike, PointLike];
const selectedFeatures = this.props.mbMap.queryRenderedFeatures(mbBbox, {
layers: mbEditLayerIds,
filter: ['all', EXCLUDE_CENTROID_FEATURES],

View file

@ -10,9 +10,8 @@ import React, { Component } from 'react';
import { Adapters } from '@kbn/inspector-plugin/public';
import { Filter } from '@kbn/es-query';
import { Action, ActionExecutionContext } from '@kbn/ui-actions-plugin/public';
import { mapboxgl } from '@kbn/mapbox-gl';
import type { Map as MapboxMap, MapboxOptions, MapMouseEvent } from '@kbn/mapbox-gl';
import { maplibregl } from '@kbn/mapbox-gl';
import type { Map as MapboxMap, MapOptions, MapMouseEvent } from '@kbn/mapbox-gl';
import { ResizeChecker } from '@kbn/kibana-utils-plugin/public';
import { DrawFilterControl } from './draw_control/draw_filter_control';
import { ScaleControl } from './scale_control';
@ -92,7 +91,7 @@ export class MbMap extends Component<Props, State> {
private _prevDisableInteractive?: boolean;
private _prevLayerList?: ILayer[];
private _prevTimeslice?: Timeslice;
private _navigationControl = new mapboxgl.NavigationControl({ showCompass: false });
private _navigationControl = new maplibregl.NavigationControl({ showCompass: false });
private _tileStatusTracker?: TileStatusTracker;
state: State = {
@ -176,13 +175,13 @@ export class MbMap extends Component<Props, State> {
async _createMbMapInstance(initialView: MapCenterAndZoom | null): Promise<MapboxMap> {
return new Promise((resolve) => {
const mbStyle = {
version: 8,
version: 8 as 8,
sources: {},
layers: [],
glyphs: getGlyphUrl(),
};
const options: MapboxOptions = {
const options: MapOptions = {
attributionControl: false,
container: this._containerRef!,
style: mbStyle,
@ -200,7 +199,7 @@ export class MbMap extends Component<Props, State> {
} else {
options.bounds = [-170, -60, 170, 75];
}
const mbMap = new mapboxgl.Map(options);
const mbMap = new maplibregl.Map(options);
mbMap.dragRotate.disable();
mbMap.touchZoomRotate.disableRotation();
@ -329,12 +328,12 @@ export class MbMap extends Component<Props, State> {
if (goto.bounds) {
// clamping ot -89/89 latitudes since Mapboxgl does not seem to handle bounds that contain the poles (logs errors to the console when using -90/90)
const lnLatBounds = new mapboxgl.LngLatBounds(
new mapboxgl.LngLat(
const lnLatBounds = new maplibregl.LngLatBounds(
new maplibregl.LngLat(
clampToLonBounds(goto.bounds.minLon),
clampToLatBounds(goto.bounds.minLat)
),
new mapboxgl.LngLat(
new maplibregl.LngLat(
clampToLonBounds(goto.bounds.maxLon),
clampToLatBounds(goto.bounds.maxLat)
)
@ -418,7 +417,6 @@ export class MbMap extends Component<Props, State> {
for (const { symbolId, svg, cutoff, radius } of this.props.customIcons) {
createSdfIcon({ svg, renderSize: CUSTOM_ICON_SIZE, cutoff, radius }).then(
(imageData: ImageData) => {
// @ts-expect-error MapboxMap type is missing updateImage method
if (mbMap.hasImage(symbolId)) mbMap.updateImage(symbolId, imageData);
else
mbMap.addImage(symbolId, imageData, {

View file

@ -8,7 +8,7 @@
/* eslint-disable max-classes-per-file */
import _ from 'lodash';
import type { Map as MbMap, AnyLayer as MbLayer, Style as MbStyle } from '@kbn/mapbox-gl';
import type { Map as MbMap, LayerSpecification, StyleSpecification } from '@kbn/mapbox-gl';
import { getIsTextLayer, syncLayerOrder } from './sort_layers';
import { SPATIAL_FILTERS_LAYER_ID } from '../../../common/constants';
import { ILayer } from '../../classes/layers/layer';
@ -16,9 +16,9 @@ import { ILayer } from '../../classes/layers/layer';
let moveCounter = 0;
class MockMbMap {
private _style: MbStyle;
private _style: StyleSpecification;
constructor(style: MbStyle) {
constructor(style: StyleSpecification) {
this._style = _.cloneDeep(style);
}
@ -88,24 +88,24 @@ test('getIsTextLayer', () => {
id: `mylayer_text`,
type: 'symbol',
paint: { 'text-color': 'red' },
} as MbLayer;
} as LayerSpecification;
expect(getIsTextLayer(paintLabelMbLayer)).toBe(true);
const layoutLabelMbLayer = {
id: `mylayer_text`,
type: 'symbol',
layout: { 'text-size': 'red' },
} as MbLayer;
} as unknown as LayerSpecification;
expect(getIsTextLayer(layoutLabelMbLayer)).toBe(true);
const iconMbLayer = {
id: `mylayer_text`,
type: 'symbol',
paint: { 'icon-color': 'house' },
} as MbLayer;
} as LayerSpecification;
expect(getIsTextLayer(iconMbLayer)).toBe(false);
const circleMbLayer = { id: `mylayer_text`, type: 'circle' } as MbLayer;
const circleMbLayer = { id: `mylayer_text`, type: 'circle' } as LayerSpecification;
expect(getIsTextLayer(circleMbLayer)).toBe(false);
});
@ -128,22 +128,23 @@ describe('sortLayer', () => {
// Initial order that styles are added to mapbox is non-deterministic and depends on the order of data fetches.
test('Should sort initial layer load order to expected order', () => {
const initialMbStyle = {
version: 0,
version: 8 as 8,
layers: [
{ id: `${BRAVO_LAYER_ID}_text`, type: 'symbol' } as MbLayer,
{ id: `${BRAVO_LAYER_ID}_circle`, type: 'circle' } as MbLayer,
{ id: `${SPATIAL_FILTERS_LAYER_ID}_fill`, type: 'fill' } as MbLayer,
{ id: `${SPATIAL_FILTERS_LAYER_ID}_circle`, type: 'circle' } as MbLayer,
{ id: `gl-draw-polygon-fill-active.cold`, type: 'fill' } as MbLayer,
{ id: `${BRAVO_LAYER_ID}_text`, type: 'symbol' } as LayerSpecification,
{ id: `${BRAVO_LAYER_ID}_circle`, type: 'circle' } as LayerSpecification,
{ id: `${SPATIAL_FILTERS_LAYER_ID}_fill`, type: 'fill' } as LayerSpecification,
{ id: `${SPATIAL_FILTERS_LAYER_ID}_circle`, type: 'circle' } as LayerSpecification,
{ id: `gl-draw-polygon-fill-active.cold`, type: 'fill' } as LayerSpecification,
{
id: `${CHARLIE_LAYER_ID}_text`,
type: 'symbol',
paint: { 'text-color': 'red' },
} as MbLayer,
{ id: `${CHARLIE_LAYER_ID}_fill`, type: 'fill' } as MbLayer,
{ id: `${ALPHA_LAYER_ID}_text`, type: 'symbol' } as MbLayer,
{ id: `${ALPHA_LAYER_ID}_circle`, type: 'circle' } as MbLayer,
} as LayerSpecification,
{ id: `${CHARLIE_LAYER_ID}_fill`, type: 'fill' } as LayerSpecification,
{ id: `${ALPHA_LAYER_ID}_text`, type: 'symbol' } as LayerSpecification,
{ id: `${ALPHA_LAYER_ID}_circle`, type: 'circle' } as LayerSpecification,
],
sources: {},
};
const mbMap = new MockMbMap(initialMbStyle);
syncLayerOrder(mbMap as unknown as MbMap, spatialFilterLayer, mapLayers);
@ -167,21 +168,22 @@ describe('sortLayer', () => {
// Test case testing when layer is moved in Table of Contents
test('Should sort single layer single move to expected order', () => {
const initialMbStyle = {
version: 0,
version: 8 as 8,
layers: [
{ id: `${CHARLIE_LAYER_ID}_fill`, type: 'fill' } as MbLayer,
{ id: `${ALPHA_LAYER_ID}_text`, type: 'symbol' } as MbLayer,
{ id: `${ALPHA_LAYER_ID}_circle`, type: 'circle' } as MbLayer,
{ id: `${BRAVO_LAYER_ID}_text`, type: 'symbol' } as MbLayer,
{ id: `${BRAVO_LAYER_ID}_circle`, type: 'circle' } as MbLayer,
{ id: `${CHARLIE_LAYER_ID}_fill`, type: 'fill' } as LayerSpecification,
{ id: `${ALPHA_LAYER_ID}_text`, type: 'symbol' } as LayerSpecification,
{ id: `${ALPHA_LAYER_ID}_circle`, type: 'circle' } as LayerSpecification,
{ id: `${BRAVO_LAYER_ID}_text`, type: 'symbol' } as LayerSpecification,
{ id: `${BRAVO_LAYER_ID}_circle`, type: 'circle' } as LayerSpecification,
{
id: `${CHARLIE_LAYER_ID}_text`,
type: 'symbol',
paint: { 'text-color': 'red' },
} as MbLayer,
{ id: `${SPATIAL_FILTERS_LAYER_ID}_fill`, type: 'fill' } as MbLayer,
{ id: `${SPATIAL_FILTERS_LAYER_ID}_circle`, type: 'circle' } as MbLayer,
} as LayerSpecification,
{ id: `${SPATIAL_FILTERS_LAYER_ID}_fill`, type: 'fill' } as LayerSpecification,
{ id: `${SPATIAL_FILTERS_LAYER_ID}_circle`, type: 'circle' } as LayerSpecification,
],
sources: {},
};
const mbMap = new MockMbMap(initialMbStyle);
syncLayerOrder(mbMap as unknown as MbMap, spatialFilterLayer, mapLayers);
@ -205,11 +207,12 @@ describe('sortLayer', () => {
test('Should sort with missing mblayers to expected order', () => {
// Notice there are no bravo mbLayers in initial style.
const initialMbStyle = {
version: 0,
version: 8 as 8,
layers: [
{ id: `${CHARLIE_LAYER_ID}_fill`, type: 'fill' } as MbLayer,
{ id: `${ALPHA_LAYER_ID}_circle`, type: 'circle' } as MbLayer,
{ id: `${CHARLIE_LAYER_ID}_fill`, type: 'fill' } as LayerSpecification,
{ id: `${ALPHA_LAYER_ID}_circle`, type: 'circle' } as LayerSpecification,
],
sources: {},
};
const mbMap = new MockMbMap(initialMbStyle);
syncLayerOrder(mbMap as unknown as MbMap, spatialFilterLayer, mapLayers);
@ -222,21 +225,22 @@ describe('sortLayer', () => {
test('Should not call move layers when layers are in expected order', () => {
const initialMbStyle = {
version: 0,
version: 8 as 8,
layers: [
{ id: `${CHARLIE_LAYER_ID}_fill`, type: 'fill' } as MbLayer,
{ id: `${BRAVO_LAYER_ID}_text`, type: 'symbol' } as MbLayer,
{ id: `${BRAVO_LAYER_ID}_circle`, type: 'circle' } as MbLayer,
{ id: `${ALPHA_LAYER_ID}_text`, type: 'symbol' } as MbLayer,
{ id: `${ALPHA_LAYER_ID}_circle`, type: 'circle' } as MbLayer,
{ id: `${CHARLIE_LAYER_ID}_fill`, type: 'fill' } as LayerSpecification,
{ id: `${BRAVO_LAYER_ID}_text`, type: 'symbol' } as LayerSpecification,
{ id: `${BRAVO_LAYER_ID}_circle`, type: 'circle' } as LayerSpecification,
{ id: `${ALPHA_LAYER_ID}_text`, type: 'symbol' } as LayerSpecification,
{ id: `${ALPHA_LAYER_ID}_circle`, type: 'circle' } as LayerSpecification,
{
id: `${CHARLIE_LAYER_ID}_text`,
type: 'symbol',
paint: { 'text-color': 'red' },
} as MbLayer,
{ id: `${SPATIAL_FILTERS_LAYER_ID}_fill`, type: 'fill' } as MbLayer,
{ id: `${SPATIAL_FILTERS_LAYER_ID}_circle`, type: 'circle' } as MbLayer,
} as LayerSpecification,
{ id: `${SPATIAL_FILTERS_LAYER_ID}_fill`, type: 'fill' } as LayerSpecification,
{ id: `${SPATIAL_FILTERS_LAYER_ID}_circle`, type: 'circle' } as LayerSpecification,
],
sources: {},
};
const mbMap = new MockMbMap(initialMbStyle);
syncLayerOrder(mbMap as unknown as MbMap, spatialFilterLayer, mapLayers);

View file

@ -5,14 +5,14 @@
* 2.0.
*/
import type { Map as MbMap, Layer as MbLayer } from '@kbn/mapbox-gl';
import type { Map as MbMap, LayerSpecification } from '@kbn/mapbox-gl';
import { ILayer } from '../../classes/layers/layer';
// "Layer" is overloaded and can mean the following
// 1) Map layer (ILayer): A single map layer consists of one to many mapbox layers.
// 2) Mapbox layer (MbLayer): Individual unit of rendering such as text, circles, polygons, or lines.
// 2) Mapbox layer (LayerSpecification): Individual unit of rendering such as text, circles, polygons, or lines.
export function getIsTextLayer(mbLayer: MbLayer) {
export function getIsTextLayer(mbLayer: LayerSpecification) {
if (mbLayer.type !== 'symbol') {
return false;
}
@ -35,7 +35,7 @@ export function isGlDrawLayer(mbLayerId: string) {
function doesMbLayerBelongToMapLayerAndClass(
mapLayer: ILayer,
mbLayer: MbLayer,
mbLayer: LayerSpecification,
layerClass: LAYER_CLASS
) {
if (!mapLayer.ownsMbLayerId(mbLayer.id)) {
@ -58,7 +58,7 @@ enum LAYER_CLASS {
function moveMapLayer(
mbMap: MbMap,
mbLayers: MbLayer[],
mbLayers: LayerSpecification[],
mapLayer: ILayer,
layerClass: LAYER_CLASS,
beneathMbLayerId?: string
@ -72,7 +72,11 @@ function moveMapLayer(
});
}
function getBottomMbLayerId(mbLayers: MbLayer[], mapLayer: ILayer, layerClass: LAYER_CLASS) {
function getBottomMbLayerId(
mbLayers: LayerSpecification[],
mapLayer: ILayer,
layerClass: LAYER_CLASS
) {
const bottomMbLayer = mbLayers.find((mbLayer) => {
return doesMbLayerBelongToMapLayerAndClass(mapLayer, mbLayer, layerClass);
});

View file

@ -15,12 +15,12 @@ import sinon from 'sinon';
import React from 'react';
import { mount, shallow } from 'enzyme';
import { Feature } from 'geojson';
import type { Map as MbMap, MapMouseEvent, MapboxGeoJSONFeature } from '@kbn/mapbox-gl';
import type { Map as MbMap, MapMouseEvent, MapGeoJSONFeature } from '@kbn/mapbox-gl';
import { TooltipControl } from './tooltip_control';
import { IVectorLayer } from '../../../classes/layers/vector_layer';
// mutable map state
let featuresAtLocation: MapboxGeoJSONFeature[] = [];
let featuresAtLocation: MapGeoJSONFeature[] = [];
const layerId = 'tfi3f';
const mbLayerId = 'tfi3f_circle';
@ -254,7 +254,7 @@ describe('TooltipControl', () => {
properties: {
__kbn__feature_id__: 1,
},
} as unknown as MapboxGeoJSONFeature;
} as unknown as MapGeoJSONFeature;
featuresAtLocation = [feature, feature];
mount(
<TooltipControl

View file

@ -11,9 +11,10 @@ import { i18n } from '@kbn/i18n';
import {
LngLat,
Map as MbMap,
MapboxGeoJSONFeature,
MapGeoJSONFeature,
MapMouseEvent,
Point as MbPoint,
Point2D,
PointLike,
} from '@kbn/mapbox-gl';
import uuid from 'uuid/v4';
import { Geometry } from 'geojson';
@ -34,7 +35,7 @@ import { RenderToolTipContent } from '../../../classes/tooltips/tooltip_property
function justifyAnchorLocation(
mbLngLat: LngLat,
targetFeature: MapboxGeoJSONFeature
targetFeature: MapGeoJSONFeature
): [number, number] {
let popupAnchorLocation: [number, number] = [mbLngLat.lng, mbLngLat.lat]; // default popup location to mouse location
if (targetFeature.geometry.type === 'Point') {
@ -197,7 +198,7 @@ export class TooltipControl extends Component<Props, {}> {
}
_getTooltipFeatures(
mbFeatures: MapboxGeoJSONFeature[],
mbFeatures: MapGeoJSONFeature[],
isLocked: boolean,
tooltipId: string
): TooltipFeature[] {
@ -340,7 +341,7 @@ export class TooltipControl extends Component<Props, {}> {
});
}
_getMbFeaturesUnderPointer(mbLngLatPoint: MbPoint) {
_getMbFeaturesUnderPointer(mbLngLatPoint: Point2D) {
if (!this.props.mbMap) {
return [];
}
@ -356,7 +357,7 @@ export class TooltipControl extends Component<Props, {}> {
x: mbLngLatPoint.x + PADDING,
y: mbLngLatPoint.y + PADDING,
},
] as [MbPoint, MbPoint];
] as [PointLike, PointLike];
return this.props.mbMap.queryRenderedFeatures(mbBbox, {
layers: mbLayerIds,
});

View file

@ -66,6 +66,7 @@ export function getTileMetaFeatures(mbMap: MbMap, mbSourceId: string): TileMetaF
// Tile meta will never have duplicated features since by there nature, tile meta is a feature contained within a single tile
const mbFeatures = mbMap.querySourceFeatures(mbSourceId, {
sourceLayer: ES_MVT_META_LAYER_NAME,
filter: [],
});
return mbFeatures

140
yarn.lock
View file

@ -1504,10 +1504,10 @@
"@elastic/transport" "^8.0.2"
tslib "^2.3.0"
"@elastic/ems-client@8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@elastic/ems-client/-/ems-client-8.2.0.tgz#35ca17f07a576c464b15a17ef9b228a51043e329"
integrity sha512-NtU/KjTMGntnrCY6+2jdkugn6pqMJj2EV4/Mff/MGlBLrWSlxYkYa6Q6KFhmT3V68RJUxOsId47mUdoQbRi/yg==
"@elastic/ems-client@8.3.0":
version "8.3.0"
resolved "https://registry.yarnpkg.com/@elastic/ems-client/-/ems-client-8.3.0.tgz#9d40c02e33c407d433b8e509d83c5edec24c4902"
integrity sha512-DlJDyUQzNrxGbS0AWxGiBNfq1hPQUP3Ib/Zyotgv7+VGGklb0mBwppde7WLVvuj0E+CYc6E63TJsoD8KNUO0MQ==
dependencies:
"@types/geojson" "^7946.0.7"
"@types/lru-cache" "^5.1.0"
@ -3437,10 +3437,13 @@
concat-stream "~2.0.0"
minimist "^1.2.5"
"@mapbox/geojson-types@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@mapbox/geojson-types/-/geojson-types-1.0.2.tgz#9aecf642cb00eab1080a57c4f949a65b4a5846d6"
integrity sha512-e9EBqHHv3EORHrSfbR9DqecPNn+AmuAoQxV6aL8Xu30bJMJR1o8PZLZzpk1Wq7/NfCbuhmakHTPYRhoqLsXRnw==
"@mapbox/geojson-rewind@^0.5.1":
version "0.5.1"
resolved "https://registry.yarnpkg.com/@mapbox/geojson-rewind/-/geojson-rewind-0.5.1.tgz#adbe16dc683eb40e90934c51a5e28c7bbf44f4e1"
integrity sha512-eL7fMmfTBKjrb+VFHXCGv9Ot0zc3C0U+CwXo1IrP+EPwDczLoXv34Tgq3y+2mPSFNVUXgU42ILWJTC7145KPTA==
dependencies:
get-stream "^6.0.1"
minimist "^1.2.5"
"@mapbox/hast-util-table-cell-style@^0.1.3":
version "0.1.3"
@ -3472,25 +3475,25 @@
resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-rtl-text/-/mapbox-gl-rtl-text-0.2.3.tgz#a26ecfb3f0061456d93ee8570dd9587d226ea8bd"
integrity sha512-RaCYfnxULUUUxNwcUimV9C/o2295ktTyLEUzD/+VWkqXqvaVfFcZ5slytGzb2Sd/Jj4MlbxD0DCZbfa6CzcmMw==
"@mapbox/mapbox-gl-supported@^1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.5.0.tgz#f60b6a55a5d8e5ee908347d2ce4250b15103dc8e"
integrity sha512-/PT1P6DNf7vjEEiPkVIRJkvibbqWtqnyGaBz3nfRdcxclNSnSdaLU5tfAgcD7I8Yt5i+L19s406YLl1koLnLbg==
"@mapbox/mapbox-gl-supported@^2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-2.0.1.tgz#c15367178d8bfe4765e6b47b542fe821ce259c7b"
integrity sha512-HP6XvfNIzfoMVfyGjBckjiAOQK9WfX0ywdLubuPMPv+Vqf5fj0uCbgBQYpiqcWZT6cbyyRnTSXDheT1ugvF6UQ==
"@mapbox/point-geometry@0.1.0", "@mapbox/point-geometry@^0.1.0", "@mapbox/point-geometry@~0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz#8a83f9335c7860effa2eeeca254332aa0aeed8f2"
integrity sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI=
"@mapbox/tiny-sdf@^1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@mapbox/tiny-sdf/-/tiny-sdf-1.1.1.tgz#16a20c470741bfe9191deb336f46e194da4a91ff"
integrity sha512-Ihn1nZcGIswJ5XGbgFAvVumOgWpvIjBX9jiRlIl46uQG9vJOF51ViBYHF95rEZupuyQbEmhLaDPLQlU7fUTsBg==
"@mapbox/tiny-sdf@^2.0.4":
version "2.0.5"
resolved "https://registry.yarnpkg.com/@mapbox/tiny-sdf/-/tiny-sdf-2.0.5.tgz#cdba698d3d65087643130f9af43a2b622ce0b372"
integrity sha512-OhXt2lS//WpLdkqrzo/KwB7SRD8AiNTFFzuo9n14IBupzIMa67yGItcK7I2W9D8Ghpa4T04Sw9FWsKCJG50Bxw==
"@mapbox/unitbezier@^0.0.0":
version "0.0.0"
resolved "https://registry.yarnpkg.com/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz#15651bd553a67b8581fb398810c98ad86a34524e"
integrity sha1-FWUb1VOme4WB+zmIEMmK2Go0Uk4=
"@mapbox/unitbezier@^0.0.1":
version "0.0.1"
resolved "https://registry.yarnpkg.com/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz#d32deb66c7177e9e9dfc3bbd697083e2e657ff01"
integrity sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw==
"@mapbox/vector-tile@1.3.1", "@mapbox/vector-tile@^1.3.1":
version "1.3.1"
@ -5707,6 +5710,11 @@
resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.7.tgz#c8fa532b60a0042219cdf173ca21a975ef0666ad"
integrity sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ==
"@types/geojson@^7946.0.8":
version "7946.0.8"
resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.8.tgz#30744afdb385e2945e22f3b033f897f76b1f12ca"
integrity sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==
"@types/getos@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/getos/-/getos-3.0.0.tgz#582c758e99e9d634f31f471faf7ce59cf1c39a71"
@ -6394,12 +6402,12 @@
resolved "https://registry.yarnpkg.com/@types/lz-string/-/lz-string-1.3.34.tgz#69bfadde419314b4a374bf2c8e58659c035ed0a5"
integrity sha512-j6G1e8DULJx3ONf6NdR5JiR2ZY3K3PaaqiEuKYkLQO0Czfi1AzrtjfnfCROyWGeDd5IVMKCwsgSmMip9OWijow==
"@types/mapbox__point-geometry@*":
"@types/mapbox__point-geometry@*", "@types/mapbox__point-geometry@^0.1.2":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.2.tgz#488a9b76e8457d6792ea2504cdd4ecdd9860a27e"
integrity sha512-D0lgCq+3VWV85ey1MZVkE8ZveyuvW5VAfuahVTQRpXFQTxw03SuIf1/K4UQ87MMIXVKzpFjXFiFMZzLj2kU+iA==
"@types/mapbox__vector-tile@1.3.0":
"@types/mapbox__vector-tile@1.3.0", "@types/mapbox__vector-tile@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@types/mapbox__vector-tile/-/mapbox__vector-tile-1.3.0.tgz#8fa1379dbaead1e1b639b8d96cfd174404c379d6"
integrity sha512-kDwVreQO5V4c8yAxzZVQLE5tyWF+IPToAanloQaSnwfXmIcJ7cyOrv8z4Ft4y7PsLYmhWXmON8MBV8RX0Rgr8g==
@ -6638,7 +6646,7 @@
resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-5.0.3.tgz#e7b5aebbac150f8b5fdd4a46e7f0bd8e65e19109"
integrity sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==
"@types/pbf@*", "@types/pbf@3.0.2":
"@types/pbf@*", "@types/pbf@3.0.2", "@types/pbf@^3.0.2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@types/pbf/-/pbf-3.0.2.tgz#8d291ad68b4b8c533e96c174a2e3e6399a59ed61"
integrity sha512-EDrLIPaPXOZqDjrkzxxbX7UlJSeQVgah3i0aA4pOSzmK9zq3BIh7/MZIQxED7slJByvKM4Gc6Hypyu2lJzh3SQ==
@ -12951,10 +12959,10 @@ each-props@^1.3.0:
is-plain-object "^2.0.1"
object.defaults "^1.1.0"
earcut@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.2.tgz#41b0bc35f63e0fe80da7cddff28511e7e2e80d11"
integrity sha512-eZoZPPJcUHnfRZ0PjLvx2qBordSiO8ofC3vt+qACLM95u+4DovnbYNpQtJh0DNsWj8RnxrQytD4WA8gj5cRIaQ==
earcut@^2.2.3:
version "2.2.3"
resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.3.tgz#d44ced2ff5a18859568e327dd9c7d46b16f55cf4"
integrity sha512-iRDI1QeCQIhMCZk48DRDMVgQSSBDmbzzNhnxIo+pwx3swkfjMh6vh0nWLq1NdvGHLKH6wIrAM3vQWeTj6qeoug==
ecc-jsbn@~0.1.1:
version "0.1.2"
@ -15193,6 +15201,11 @@ get-stream@^5.0.0, get-stream@^5.1.0:
dependencies:
pump "^3.0.0"
get-stream@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
get-symbol-description@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6"
@ -15262,7 +15275,12 @@ github-slugger@^1.0.0:
dependencies:
emoji-regex ">=6.0.0 <=6.1.1"
gl-matrix@^3.2.1, gl-matrix@~3.3.0:
gl-matrix@^3.4.3:
version "3.4.3"
resolved "https://registry.yarnpkg.com/gl-matrix/-/gl-matrix-3.4.3.tgz#fc1191e8320009fd4d20e9339595c6041ddc22c9"
integrity sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==
gl-matrix@~3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/gl-matrix/-/gl-matrix-3.3.0.tgz#232eef60b1c8b30a28cbbe75b2caf6c48fd6358b"
integrity sha512-COb7LDz+SXaHtl/h4LeaFcNdJdAQSDeVqjiIihSXNrkWObZLhDI4hIkZC11Aeqp7bcE72clzB0BnDXr2SmslRA==
@ -15652,11 +15670,6 @@ graphql@^16.3.0:
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05"
integrity sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A==
grid-index@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/grid-index/-/grid-index-1.1.0.tgz#97f8221edec1026c8377b86446a7c71e79522ea7"
integrity sha512-HZRwumpOGUrHyxO5bqKZL0B0GlUpwtCAzZ42sgxUPniu33R1LSFH5yrIcBCHjkctCAh3mtWKcKd9J4vDDdeVHA==
growl@1.10.5:
version "1.10.5"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
@ -19713,34 +19726,34 @@ mapcap@^1.0.0:
resolved "https://registry.yarnpkg.com/mapcap/-/mapcap-1.0.0.tgz#e8e29d04a160eaf8c92ec4bcbd2c5d07ed037e5a"
integrity sha512-KcNlZSlFPx+r1jYZmxEbTVymG+dIctf10WmWkuhrhrblM+KMoF77HelwihL5cxYlORye79KoR4IlOOk99lUJ0g==
maplibre-gl@1.15.2:
version "1.15.2"
resolved "https://registry.yarnpkg.com/maplibre-gl/-/maplibre-gl-1.15.2.tgz#7fb47868b62455af916c090903f2154394450f9c"
integrity sha512-uPeV530apb4JfX3cRFfE+awFnbcJTOnCv2QvY4mw4huiInbybElWYkNzTs324YLSADq0f4bidRoYcR81ho3aLA==
maplibre-gl@2.1.9:
version "2.1.9"
resolved "https://registry.yarnpkg.com/maplibre-gl/-/maplibre-gl-2.1.9.tgz#042f3ef4224fa890ecf7a410145243f1fc943dcd"
integrity sha512-pnWJmILeZpgA5QSI7K7xFK3yrkyYTd9srw3fCi2Ca52Phm78hsznPwUErEQcZLfxXKn/1h9t8IPdj0TH0NBNbg==
dependencies:
"@mapbox/geojson-rewind" "^0.5.0"
"@mapbox/geojson-types" "^1.0.2"
"@mapbox/geojson-rewind" "^0.5.1"
"@mapbox/jsonlint-lines-primitives" "^2.0.2"
"@mapbox/mapbox-gl-supported" "^1.5.0"
"@mapbox/mapbox-gl-supported" "^2.0.1"
"@mapbox/point-geometry" "^0.1.0"
"@mapbox/tiny-sdf" "^1.1.1"
"@mapbox/unitbezier" "^0.0.0"
"@mapbox/tiny-sdf" "^2.0.4"
"@mapbox/unitbezier" "^0.0.1"
"@mapbox/vector-tile" "^1.3.1"
"@mapbox/whoots-js" "^3.1.0"
"@types/geojson" "^7946.0.8"
"@types/mapbox__point-geometry" "^0.1.2"
"@types/mapbox__vector-tile" "^1.3.0"
"@types/pbf" "^3.0.2"
csscolorparser "~1.0.3"
earcut "^2.2.2"
earcut "^2.2.3"
geojson-vt "^3.2.1"
gl-matrix "^3.2.1"
grid-index "^1.1.0"
minimist "^1.2.5"
gl-matrix "^3.4.3"
murmurhash-js "^1.0.0"
pbf "^3.2.1"
potpack "^1.0.1"
potpack "^1.0.2"
quickselect "^2.0.0"
rw "^1.3.3"
supercluster "^7.1.0"
supercluster "^7.1.4"
tinyqueue "^2.0.3"
vt-pbf "^3.1.1"
vt-pbf "^3.1.3"
marge@^1.0.1:
version "1.0.1"
@ -22969,10 +22982,10 @@ postcss@^7.0.1, postcss@^7.0.27, postcss@^7.0.35, postcss@^7.0.36:
picocolors "^0.2.1"
source-map "^0.6.1"
potpack@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/potpack/-/potpack-1.0.1.tgz#d1b1afd89e4c8f7762865ec30bd112ab767e2ebf"
integrity sha512-15vItUAbViaYrmaB/Pbw7z6qX2xENbFSTA7Ii4tgbPtasxm5v6ryKhKtL91tpWovDJzTiZqdwzhcFBCwiMVdVw==
potpack@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/potpack/-/potpack-1.0.2.tgz#23b99e64eb74f5741ffe7656b5b5c4ddce8dfc14"
integrity sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ==
preact-render-to-string@^5.1.19:
version "5.1.19"
@ -25465,7 +25478,7 @@ run-queue@^1.0.0, run-queue@^1.0.3:
dependencies:
aproba "^1.1.1"
rw@1, rw@^1.3.2, rw@^1.3.3:
rw@1, rw@^1.3.2:
version "1.3.3"
resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4"
integrity sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=
@ -27310,10 +27323,10 @@ superagent@^3.8.2:
qs "^6.5.1"
readable-stream "^2.3.5"
supercluster@^7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/supercluster/-/supercluster-7.1.0.tgz#f0a457426ec0ab95d69c5f03b51e049774b94479"
integrity sha512-LDasImUAFMhTqhK+cUXfy9C2KTUqJ3gucLjmNLNFmKWOnDUBxLFLH9oKuXOTCLveecmxh8fbk8kgh6Q0gsfe2w==
supercluster@^7.1.4:
version "7.1.4"
resolved "https://registry.yarnpkg.com/supercluster/-/supercluster-7.1.4.tgz#6762aabfd985d3390b49f13b815567d5116a828a"
integrity sha512-GhKkRM1jMR6WUwGPw05fs66pOFWhf59lXq+Q3J3SxPvhNcmgOtLRV6aVQPMRsmXdpaeFJGivt+t7QXUPL3ff4g==
dependencies:
kdbush "^3.0.0"
@ -29716,6 +29729,15 @@ vt-pbf@^3.1.1:
"@mapbox/vector-tile" "^1.3.1"
pbf "^3.0.5"
vt-pbf@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/vt-pbf/-/vt-pbf-3.1.3.tgz#68fd150756465e2edae1cc5c048e063916dcfaac"
integrity sha512-2LzDFzt0mZKZ9IpVF2r69G9bXaP2Q2sArJCmcCgvfTdCCZzSyz4aCLoQyUilu37Ll56tCblIZrXFIjNUpGIlmA==
dependencies:
"@mapbox/point-geometry" "0.1.0"
"@mapbox/vector-tile" "^1.3.1"
pbf "^3.2.1"
w3c-hr-time@^1.0.1, w3c-hr-time@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd"