Skip to content

Commit

Permalink
PB-865 : remove forced clampToGround for KML polyline in 3D
Browse files Browse the repository at this point in the history
KML are well able to set that themselves if they require it, and some use cases need this to be false (flight tracks)
  • Loading branch information
pakb committed Aug 30, 2024
1 parent fa65a11 commit f0f7fab
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/modules/map/components/cesium/CesiumKMLLayer.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import { ArcType, Color, HeightReference, KmlDataSource, LabelStyle, VerticalOrigin } from 'cesium'
import { Color, HeightReference, KmlDataSource, LabelStyle, VerticalOrigin } from 'cesium'
import { computed, inject, onBeforeUnmount, onMounted, toRefs, watch } from 'vue'
import KMLLayer from '@/api/layers/KMLLayer.class.js'
Expand Down Expand Up @@ -42,7 +42,6 @@ function addKmlLayer() {
kmlDataSource.entities.values.forEach((entity) => {
let geometry
let alphaToApply = 0.2
let clampToGround = false
if (entity.ellipse) {
geometry = entity.ellipse
}
Expand All @@ -52,7 +51,6 @@ function addKmlLayer() {
if (entity.polyline) {
geometry = entity.polyline
alphaToApply = 0.5
clampToGround = true
}
if (entity.billboard) {
entity.billboard.heightReference = HeightReference.CLAMP_TO_GROUND
Expand All @@ -68,10 +66,6 @@ function addKmlLayer() {
label.style = LabelStyle.FILL_AND_OUTLINE
}
if (geometry) {
if (clampToGround) {
geometry.arcType = ArcType.GEODESIC
geometry.clampToGround = true
}
if (geometry.material?.color) {
geometry.material.color = geometry.material.color
.getValue()
Expand Down

0 comments on commit f0f7fab

Please sign in to comment.