mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Geomap: Upgrade to openlayers 7.x (#57317)
This commit is contained in:
parent
3ddb28bad9
commit
e3c2859e83
@ -344,8 +344,8 @@
|
||||
"mousetrap": "1.6.5",
|
||||
"mousetrap-global-bind": "1.1.0",
|
||||
"moveable": "0.35.4",
|
||||
"ol": "6.15.1",
|
||||
"ol-ext": "3.2.28",
|
||||
"ol": "7.1.0",
|
||||
"ol-ext": "4.0.2",
|
||||
"papaparse": "5.3.2",
|
||||
"pluralize": "^8.0.0",
|
||||
"prismjs": "1.29.0",
|
||||
|
@ -45,7 +45,7 @@
|
||||
"marked": "4.1.0",
|
||||
"moment": "2.29.4",
|
||||
"moment-timezone": "0.5.35",
|
||||
"ol": "6.15.1",
|
||||
"ol": "7.1.0",
|
||||
"papaparse": "5.3.2",
|
||||
"regenerator-runtime": "0.13.9",
|
||||
"rxjs": "7.5.6",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PluggableMap } from 'ol';
|
||||
import { Map as OpenLayersMap } from 'ol';
|
||||
import BaseLayer from 'ol/layer/Base';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
@ -119,7 +119,7 @@ export interface MapLayerRegistryItem<TConfig = MapLayerOptions> extends Registr
|
||||
* @param options
|
||||
*/
|
||||
create: (
|
||||
map: PluggableMap,
|
||||
map: OpenLayersMap,
|
||||
options: MapLayerOptions<TConfig>,
|
||||
eventBus: EventBus,
|
||||
theme: GrafanaTheme2
|
||||
|
@ -76,7 +76,7 @@
|
||||
"memoize-one": "6.0.0",
|
||||
"moment": "2.29.4",
|
||||
"monaco-editor": "0.34.0",
|
||||
"ol": "6.15.1",
|
||||
"ol": "7.1.0",
|
||||
"prismjs": "1.29.0",
|
||||
"rc-cascader": "3.7.0",
|
||||
"rc-drawer": "4.4.3",
|
||||
|
@ -1,5 +1,3 @@
|
||||
import Units from 'ol/proj/Units';
|
||||
|
||||
import { FieldMatcherID, fieldMatchers, FieldType, MutableDataFrame } from '@grafana/data';
|
||||
import { BarAlignment, GraphDrawStyle, GraphTransform, LineInterpolation, StackingMode } from '@grafana/schema';
|
||||
|
||||
@ -1218,12 +1216,12 @@ describe('auto stacking groups', () => {
|
||||
{
|
||||
name: 'a',
|
||||
values: [1, 2, 3],
|
||||
config: { custom: { stacking: { mode: StackingMode.Normal } }, unit: Units.FEET },
|
||||
config: { custom: { stacking: { mode: StackingMode.Normal } }, unit: 'ft' },
|
||||
},
|
||||
{
|
||||
name: 'b',
|
||||
values: [1, 2, 3],
|
||||
config: { custom: { stacking: { mode: StackingMode.Normal } }, unit: Units.DEGREES },
|
||||
config: { custom: { stacking: { mode: StackingMode.Normal } }, unit: 'degrees' },
|
||||
},
|
||||
],
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Map from 'ol/Map';
|
||||
import { Map as OpenLayersMap } from 'ol';
|
||||
|
||||
import {
|
||||
MapLayerRegistryItem,
|
||||
@ -27,7 +27,7 @@ export const defaultBaseLayer: MapLayerRegistryItem = {
|
||||
name: 'Default base layer',
|
||||
isBaseMap: true,
|
||||
|
||||
create: (map: Map, options: MapLayerOptions, eventBus: EventBus, theme: GrafanaTheme2) => {
|
||||
create: (map: OpenLayersMap, options: MapLayerOptions, eventBus: EventBus, theme: GrafanaTheme2) => {
|
||||
const serverLayerType = config?.geomapDefaultBaseLayerConfig?.type;
|
||||
if (serverLayerType) {
|
||||
const layer = geomapLayerRegistry.getIfExists(serverLayerType);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Map as OpenLayersMap } from 'ol';
|
||||
import { FeatureLike } from 'ol/Feature';
|
||||
import { Units } from 'ol/control/ScaleLine';
|
||||
import BaseLayer from 'ol/layer/Base';
|
||||
import Units from 'ol/proj/Units';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
import { MapLayerHandler, MapLayerOptions } from '@grafana/data';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PluggableMap } from 'ol';
|
||||
import { Map as OpenLayersMap } from 'ol';
|
||||
import { FeatureLike } from 'ol/Feature';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
@ -92,7 +92,7 @@ export async function updateLayer(panel: GeomapPanel, uid: string, newOptions: M
|
||||
|
||||
export async function initLayer(
|
||||
panel: GeomapPanel,
|
||||
map: PluggableMap,
|
||||
map: OpenLayersMap,
|
||||
options: MapLayerOptions,
|
||||
isBasemap?: boolean
|
||||
): Promise<MapLayerState> {
|
||||
|
42
yarn.lock
42
yarn.lock
@ -5258,7 +5258,7 @@ __metadata:
|
||||
marked: 4.1.0
|
||||
moment: 2.29.4
|
||||
moment-timezone: 0.5.35
|
||||
ol: 6.15.1
|
||||
ol: 7.1.0
|
||||
papaparse: 5.3.2
|
||||
react: 17.0.2
|
||||
react-dom: 17.0.2
|
||||
@ -5667,7 +5667,7 @@ __metadata:
|
||||
mock-raf: 1.0.1
|
||||
moment: 2.29.4
|
||||
monaco-editor: 0.34.0
|
||||
ol: 6.15.1
|
||||
ol: 7.1.0
|
||||
prismjs: 1.29.0
|
||||
process: ^0.11.10
|
||||
rc-cascader: 3.7.0
|
||||
@ -19658,6 +19658,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"earcut@npm:^2.2.3":
|
||||
version: 2.2.4
|
||||
resolution: "earcut@npm:2.2.4"
|
||||
checksum: aea0466cb2f24e0c3c57148d8d28ac9846f53c4f43ee66780826474303ac851b305ef988152d0bdeb31e8f7ca939dc0df737e7505cfb1c1bdf2ff9d7f9ea2faa
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eastasianwidth@npm:^0.2.0":
|
||||
version: 0.2.0
|
||||
resolution: "eastasianwidth@npm:0.2.0"
|
||||
@ -23410,8 +23417,8 @@ __metadata:
|
||||
mutationobserver-shim: 0.3.7
|
||||
ngtemplate-loader: 2.1.0
|
||||
node-notifier: 10.0.1
|
||||
ol: 6.15.1
|
||||
ol-ext: 3.2.28
|
||||
ol: 7.1.0
|
||||
ol-ext: 4.0.2
|
||||
papaparse: 5.3.2
|
||||
pluralize: ^8.0.0
|
||||
postcss: 8.4.14
|
||||
@ -30811,34 +30818,35 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ol-ext@npm:3.2.28":
|
||||
version: 3.2.28
|
||||
resolution: "ol-ext@npm:3.2.28"
|
||||
"ol-ext@npm:4.0.2":
|
||||
version: 4.0.2
|
||||
resolution: "ol-ext@npm:4.0.2"
|
||||
peerDependencies:
|
||||
ol: ">= 5.3.0"
|
||||
checksum: 8738031b7499a6af343bf15bc8eb01025d0136078c7ccf5cf482f5fc8d8921b811b19c3b3f1fdc0ad4cf6269dc3c355cd1066e87cb30195122aa4f1546883595
|
||||
checksum: f7c53fd04dac442c704943585b0a4259bbe92a9c5ad6a514eea191193fc33891a1adf5709db383953aef3600d76eaf77bbd326e5d66f2ca7f782ec33a9db45da
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ol-mapbox-style@npm:^8.0.5":
|
||||
version: 8.2.0
|
||||
resolution: "ol-mapbox-style@npm:8.2.0"
|
||||
"ol-mapbox-style@npm:9.1.0":
|
||||
version: 9.1.0
|
||||
resolution: "ol-mapbox-style@npm:9.1.0"
|
||||
dependencies:
|
||||
"@mapbox/mapbox-gl-style-spec": ^13.23.1
|
||||
mapbox-to-css-font: ^2.4.1
|
||||
checksum: a1bb0a8789e86cba4f1577c22b22add94bc8504a38df2625f1ee40b6bdacb515bfd574ecb738e72af54e2ca9a58764ca25386f931bb76f8b978280a5623b97b6
|
||||
checksum: 587a41456b76e1bd592b7594c288661ee8c651e9f1cd038a53ff5c01654b68081911088a6feba6ee3ac133f34072d629f171dbf35cd2f13dab3908d519268978
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ol@npm:6.15.1":
|
||||
version: 6.15.1
|
||||
resolution: "ol@npm:6.15.1"
|
||||
"ol@npm:7.1.0":
|
||||
version: 7.1.0
|
||||
resolution: "ol@npm:7.1.0"
|
||||
dependencies:
|
||||
earcut: ^2.2.3
|
||||
geotiff: 2.0.4
|
||||
ol-mapbox-style: ^8.0.5
|
||||
ol-mapbox-style: 9.1.0
|
||||
pbf: 3.2.1
|
||||
rbush: ^3.0.1
|
||||
checksum: 61199a0cfd11830919861f92cc7dcd50f94077972cd5777691834186991cfc0f59da69a5c35281047c64a8e0b857a228cc37e663b5579c93b5fb08d2eb0f4b4d
|
||||
checksum: 0935be63be953d29e142ea38191e0161c58ec75375bd60640f7e54c4c831dd5d0401c55f4144ede159e90c0bb3c3e6bc7a71c1f82e640208df6dfc9325da5abd
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user