mirror of
https://github.com/maputnik/editor.git
synced 2026-04-28 12:20:00 +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:
@@ -9,7 +9,7 @@ import {unset} from 'lodash'
|
||||
import {arrayMoveMutable} from 'array-move'
|
||||
import hash from "string-hash";
|
||||
import {Map, LayerSpecification, StyleSpecification, ValidationError, SourceSpecification} from 'maplibre-gl'
|
||||
import {latest, validate} from '@maplibre/maplibre-gl-style-spec'
|
||||
import {latest, validateStyleMin} from '@maplibre/maplibre-gl-style-spec'
|
||||
|
||||
import MapMaplibreGl from './MapMaplibreGl'
|
||||
import MapOpenLayers from './MapOpenLayers'
|
||||
@@ -379,8 +379,7 @@ export default class App extends React.Component<any, AppState> {
|
||||
this.getInitialStateFromUrl(newStyle);
|
||||
}
|
||||
|
||||
// This "any" can be removed in latest version of maplibre where maplibre re-exported types from style-spec
|
||||
const errors = validate(newStyle as any, latest) || [];
|
||||
const errors: ValidationError[] = validateStyleMin(newStyle) || [];
|
||||
|
||||
// The validate function doesn't give us errors for duplicate error with
|
||||
// empty string for layer.id, manually deal with that here.
|
||||
|
||||
Reference in New Issue
Block a user