|
|
@ -29,6 +29,9 @@ import { mapInitAction } from '../../../modules/control/map/actions/controlMapAc |
|
|
|
import DronPlan from './dron/DronPlan'; |
|
|
|
import DronPlan from './dron/DronPlan'; |
|
|
|
import DronToast from './dron/DronToast'; |
|
|
|
import DronToast from './dron/DronToast'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// example 3d gltf 파일
|
|
|
|
|
|
|
|
import Gltf from '../../../assets/images/3dpea.gltf'; |
|
|
|
|
|
|
|
|
|
|
|
const uamPosition = { |
|
|
|
const uamPosition = { |
|
|
|
type: 'FeatureCollection', |
|
|
|
type: 'FeatureCollection', |
|
|
|
features: [ |
|
|
|
features: [ |
|
|
@ -513,12 +516,11 @@ export default function MapBoxMap() { |
|
|
|
map.getCanvas().getContext('webgl'), |
|
|
|
map.getCanvas().getContext('webgl'), |
|
|
|
{ |
|
|
|
{ |
|
|
|
enableSelectingObjects: true, |
|
|
|
enableSelectingObjects: true, |
|
|
|
enableTooltips: true |
|
|
|
enableTooltips: true, |
|
|
|
|
|
|
|
defaultLights: true |
|
|
|
} |
|
|
|
} |
|
|
|
)); |
|
|
|
)); |
|
|
|
map.on('click', e => { |
|
|
|
|
|
|
|
console.log(e); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
map.on('style.load', () => { |
|
|
|
map.on('style.load', () => { |
|
|
|
const layers = map.getStyle().layers; |
|
|
|
const layers = map.getStyle().layers; |
|
|
|
const labelLayerId = layers.find( |
|
|
|
const labelLayerId = layers.find( |
|
|
@ -626,6 +628,45 @@ export default function MapBoxMap() { |
|
|
|
labelLayerId |
|
|
|
labelLayerId |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************** 3D UAM Model Layer 추기 코드 start */ |
|
|
|
|
|
|
|
// map.addLayer({
|
|
|
|
|
|
|
|
// id: 'custom-threebox-model',
|
|
|
|
|
|
|
|
// type: 'custom',
|
|
|
|
|
|
|
|
// renderingMode: '3d',
|
|
|
|
|
|
|
|
// onAdd: function () {
|
|
|
|
|
|
|
|
// // 3d model option
|
|
|
|
|
|
|
|
// const options = {
|
|
|
|
|
|
|
|
// obj: Gltf, // 3D Model 파일
|
|
|
|
|
|
|
|
// type: 'gltf', // 3D Model 확장자 타입
|
|
|
|
|
|
|
|
// scale: { x: 200, y: 200, z: 200 }, // 3D Model 크기 값
|
|
|
|
|
|
|
|
// units: 'meters', // 높이 단위
|
|
|
|
|
|
|
|
// rotation: { x: 90, y: -90, z: 0 } // // 3D Model 방향 각도 초기 값
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// tb.loadObj(options, model => {
|
|
|
|
|
|
|
|
// let longitude = 127.81101412107547; // 3D Model 경도 값
|
|
|
|
|
|
|
|
// const latitude = 37.510357; // 3D Model 위도 값
|
|
|
|
|
|
|
|
// let hei = 100; // 3D Model 높이 값
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// model.setCoords([longitude, latitude, hei]); // 3D Model 위치 지정
|
|
|
|
|
|
|
|
// model.setRotation({ x: 0, y: 0, z: 241 }); // 3D Model 방향 각도 지정
|
|
|
|
|
|
|
|
// tb.add(model);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// // 0.5초마다 모델의 위치를 변경
|
|
|
|
|
|
|
|
// setInterval(() => {
|
|
|
|
|
|
|
|
// longitude += 0.001; // 경도를 약간 증가시킵니다.
|
|
|
|
|
|
|
|
// hei += 50; // 높이값 증가
|
|
|
|
|
|
|
|
// model.setCoords([longitude, latitude, hei]);
|
|
|
|
|
|
|
|
// }, 500);
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// render: function () {
|
|
|
|
|
|
|
|
// tb.update();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
/*************************************************************** 3D UAM Model Layer 추기 코드 end */ |
|
|
|
|
|
|
|
|
|
|
|
// 김포 3d 공역
|
|
|
|
// 김포 3d 공역
|
|
|
|
map.addLayer({ |
|
|
|
map.addLayer({ |
|
|
|
id: 'route', |
|
|
|
id: 'route', |
|
|
|