Skip to content

Commit

Permalink
fix(web): unexpect select undefined when select mvt layer (#560)
Browse files Browse the repository at this point in the history
Co-authored-by: keiya sasaki <[email protected]>
  • Loading branch information
airslice and keiya01 authored Jul 7, 2023
1 parent 65ba8c0 commit 7ec40f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion web/src/beta/lib/core/engines/Cesium/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,10 @@ export default ({
if (prevSelectedEntity.current === entity) return;
prevSelectedEntity.current = entity;

// TODO: Support layers.selectFeature API for MVT
if (!entity && selectedLayerId?.featureId) {
// Find ImageryLayerFeature
const ImageryLayerDataTypes: DataType[] = ["mvt"];
const ImageryLayerDataTypes: DataType[] = [];
const layers = layersRef?.current?.findAll(
layer =>
layer.type === "simple" &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default (alias?: string) => {
const layers = useMemo(() => {
return [
convertLegacyLayer({
id: "",
id: "rootlayer",
children: data?.layers?.map(l => processLayer(l)).filter((l): l is Layer => !!l),
}),
].filter((l): l is Layer => !!l);
Expand Down
2 changes: 1 addition & 1 deletion web/src/classic/core/engines/Cesium/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export default ({

if (!entity && selectedLayerId?.featureId) {
// Find ImageryLayerFeature
const ImageryLayerDataTypes: DataType[] = ["mvt"];
const ImageryLayerDataTypes: DataType[] = [];
const layers = layersRef?.current?.findAll(
layer =>
layer.type === "simple" &&
Expand Down

0 comments on commit 7ec40f5

Please sign in to comment.