Skip to content

Commit

Permalink
fix: dont show shape on terrain when use model mode #10
Browse files Browse the repository at this point in the history
  • Loading branch information
hongfaqiu committed Dec 21, 2023
1 parent 65b4089 commit e14f175
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/drawer/src/shape/circle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CallbackProperty, Entity, JulianDate } from 'cesium';
import { CallbackProperty, ClassificationType, Entity, JulianDate } from 'cesium';

import BasicGraphices from '../base';

Expand Down Expand Up @@ -43,6 +43,7 @@ export default class Circle extends BasicGraphices implements LifeCycle {
);
return radius || radius + 1;
}, false),
classificationType: this.painter._model ? ClassificationType.CESIUM_3D_TILE : undefined
},
);

Expand Down
3 changes: 2 additions & 1 deletion packages/drawer/src/shape/line.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArcType, Entity } from 'cesium';
import { ArcType, ClassificationType, Entity } from 'cesium';
import BasicGraphices from '../base';

import type { LifeCycle } from '../base';
Expand Down Expand Up @@ -28,6 +28,7 @@ export default class Line extends BasicGraphices implements LifeCycle {
{
positions,
arcType: ArcType.RHUMB,
classificationType: this.painter._model ? ClassificationType.CESIUM_3D_TILE : undefined
},
);

Expand Down
4 changes: 3 additions & 1 deletion packages/drawer/src/shape/polygon.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArcType, CallbackProperty, defined, Entity, PolygonHierarchy } from 'cesium';
import { ArcType, CallbackProperty, ClassificationType, defined, Entity, PolygonHierarchy } from 'cesium';

import BasicGraphices from '../base';

Expand Down Expand Up @@ -43,6 +43,7 @@ export default class Polygon extends BasicGraphices implements LifeCycle {
const polygon = Object.assign({}, options, {
hierarchy: Array.isArray(hierarchy) ? new PolygonHierarchy(hierarchy) : hierarchy,
arcType: ArcType.RHUMB,
classificationType: this.painter._model ? ClassificationType.CESIUM_3D_TILE : undefined
});

const polyline: PolylineGraphics.ConstructorOptions = {
Expand All @@ -55,6 +56,7 @@ export default class Polygon extends BasicGraphices implements LifeCycle {
}, false),
clampToGround: true,
arcType: ArcType.RHUMB,
classificationType: this.painter._model ? ClassificationType.CESIUM_3D_TILE : undefined
};

return new Entity({ polygon, polyline });
Expand Down

0 comments on commit e14f175

Please sign in to comment.