mirror of
https://github.com/maputnik/editor.git
synced 2026-06-22 07:07:26 +00:00
Update MapLibre dependencies, add terrain editing (#859)
This PR aims at updating MapLibre dependencies. The main goal of this update is to allow adding terrain specification to the editor. This requires version 4 of maplibre so currently it will use the pre-release.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import jsonlint from 'jsonlint';
|
||||
import CodeMirror, { MarkerRange } from 'codemirror';
|
||||
import jsonToAst from 'json-to-ast';
|
||||
import {expression, validate} from '@maplibre/maplibre-gl-style-spec';
|
||||
import {expression, validateStyleMin} from '@maplibre/maplibre-gl-style-spec';
|
||||
|
||||
type MarkerRangeWithMessage = MarkerRange & {message: string};
|
||||
|
||||
@@ -102,7 +102,7 @@ CodeMirror.registerHelper("lint", "mgl", (text: string, opts: any, doc: any) =>
|
||||
let out: ReturnType<typeof expression.createExpression> | null = null;
|
||||
if (context === "layer") {
|
||||
// Just an empty style so we can validate a layer.
|
||||
const errors = validate({
|
||||
const errors = validateStyleMin({
|
||||
"version": 8,
|
||||
"name": "Empty Style",
|
||||
"metadata": {},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {latest} from '@maplibre/maplibre-gl-style-spec'
|
||||
import latest from '@maplibre/maplibre-gl-style-spec/dist/latest.json'
|
||||
|
||||
export const combiningFilterOps = ['all', 'any', 'none'];
|
||||
export const setFilterOps = ['in', '!in'];
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import MapLibreGl from "maplibre-gl"
|
||||
|
||||
MapLibreGl.setRTLTextPlugin('https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js', () => {});
|
||||
MapLibreGl.setRTLTextPlugin('https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js', false);
|
||||
|
||||
Reference in New Issue
Block a user