Compare commits

..

No commits in common. "d986b18ba747b9b24db99b6bd2b7fb41c24f3d07" and "18b171a03afb552eb273a3fe7b0a705a2a44e9ea" have entirely different histories.

2 changed files with 73 additions and 70 deletions

View File

@ -33,10 +33,9 @@ export default class LayerMgr3D extends LayerMgr {
for (const layer of this.layers) { for (const layer of this.layers) {
layer.destroy(); layer.destroy();
} }
this.viewer.dataSources.removeAll();
this.viewer.entities.removeAll(); this.viewer.entities.removeAll();
this.viewer.imageryLayers.removeAll() this.viewer.imageryLayers.removeAll()
this.viewer.destroy();
} }
frameUpdate() { frameUpdate() {

View File

@ -160,77 +160,81 @@ function AdcdMarker({ data, dispatch, setting, zoom, distSq, layerVisible }) {
return ( return (
<> <>
{ {
(data.level === 5 || data.level === 4) && ( (zoom > 8 || distSq < dist2 || highlight) && (data.level === 5 || data.level === 4) &&
<> // isShow
<div true
id={`marker_tuxiang_${data.id}`} ) && (
style={{ <>
display:(zoom > 8 || distSq < dist2 || highlight)?'block':'none', <div
position: 'absolute', id={`marker_tuxiang_${data.id}`}
bottom: 0, style={{
left: 0, position: 'absolute',
transformOrigin: 'bottom center', bottom: 0,
transform: `translateX(-50%)${markerZoom > 1 ? ' scale(' + markerZoom + ')' : ''}`, left: 0,
lineHeight: 1, transformOrigin: 'bottom center',
zIndex: data.level === 4?6:4,//zindexmarker.tuxiang + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0) transform: `translateX(-50%)${markerZoom > 1 ? ' scale(' + markerZoom + ')' : ''}`,
}} lineHeight: 1,
// onClick={showPop} zIndex: data.level === 4?6:4,//zindexmarker.tuxiang + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0)
></div> }}
<div // onClick={showPop}
className="markerLabel" ></div>
style={{ <div
// backgroundColor: '#0008', className="markerLabel"
display:(zoom > 8 || distSq < dist2 || highlight)?'block':'none', style={{
padding: 4, // backgroundColor: '#0008',
borderRadius: 4, padding: 4,
fontSize: 10, borderRadius: 4,
lineHeight: 1, fontSize: 10,
top: 0, lineHeight: 1,
left: 0, top: 0,
transform: 'translateX(-50%)', left: 0,
zIndex: 3,//zindexmarker.tuxiangLabel + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0), transform: 'translateX(-50%)',
color: data.level === 4? 'red':'#0008' zIndex: 3,//zindexmarker.tuxiangLabel + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0),
}}> color: data.level === 4? 'red':'#0008'
{data?.NAME} }}>
</div> {data?.NAME}
</> </div>
</>
)
} }
{ {
data.level === 6 && ( (zoom > 12 || distSq < dist2 || highlight) && data.level === 6 &&
<> // isShow
<div true
id={`marker_tuxiang_${data.id}`} ) && (
style={{ <>
display:(zoom > 12 || distSq < dist2 || highlight)?'block':'none', <div
position: 'absolute', id={`marker_tuxiang_${data.id}`}
bottom: 0, style={{
left: 0, position: 'absolute',
transformOrigin: 'bottom center', bottom: 0,
transform: `translateX(-50%)${markerZoom > 1 ? ' scale(' + markerZoom + ')' : ''}`, left: 0,
lineHeight: 1, transformOrigin: 'bottom center',
zIndex: 2,//zindexmarker.tuxiang + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0) transform: `translateX(-50%)${markerZoom > 1 ? ' scale(' + markerZoom + ')' : ''}`,
}} lineHeight: 1,
// onClick={showPop} zIndex: 2,//zindexmarker.tuxiang + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0)
></div> }}
<div // onClick={showPop}
className="markerLabel" ></div>
style={{ <div
display:(zoom > 12 || distSq < dist2 || highlight)?'block':'none', className="markerLabel"
// backgroundColor: '#0008', style={{
padding: 4, // backgroundColor: '#0008',
borderRadius: 4, padding: 4,
fontSize: 10, borderRadius: 4,
lineHeight: 1, fontSize: 10,
top: 0, lineHeight: 1,
left: 0, top: 0,
transform: 'translateX(-50%)', left: 0,
zIndex: 1,//zindexmarker.tuxiangLabel + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0), transform: 'translateX(-50%)',
color: !layerVisible.SatelliteImage?'#0008':'#fff' zIndex: 1,//zindexmarker.tuxiangLabel + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0),
}}> color: !layerVisible.SatelliteImage?'#0008':'#fff'
{data?.NAME} }}>
</div> {data?.NAME}
</> </div>
</>
)
} }
</> </>
) )