File tree Expand file tree Collapse file tree
src/engines/Cesium/Feature Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {
1717 GroundPrimitive ,
1818} from "cesium" ;
1919import md5 from "js-md5" ;
20- import { pick } from "lodash-es" ;
20+ import { cloneDeep , pick } from "lodash-es" ;
2121import {
2222 ComponentProps ,
2323 ComponentType ,
@@ -236,13 +236,20 @@ export const extractSimpleLayer = (
236236 if ( l ?. type !== "simple" ) {
237237 return ;
238238 }
239- return l ;
239+ // Proxy object lead to issues when creating mvt imagery provider, so convert to plain object
240+ // Not sure for other types, but to keep consistency, convert all simple layers here
241+ // It should be okey since simple layer data is supposed to be simple enough and computed data should not be included
242+ return toPlainObject ( l ) ;
240243} ;
241244
242245export const extractSimpleLayerData = ( layer : ComputedLayer | undefined ) : Data | undefined => {
243246 return extractSimpleLayer ( layer ) ?. data ;
244247} ;
245248
249+ export const toPlainObject = < T , > ( obj : T ) : T => {
250+ return cloneDeep ( obj ) ;
251+ } ;
252+
246253export const toColor = ( c ?: string ) => {
247254 if ( ! c || typeof c !== "string" ) return undefined ;
248255
You can’t perform that action at this time.
0 commit comments