Name | Type | Description |
---|---|---|
options |
DitapViewer.ConstructorOptions |
optional
초기화 옵션을 설명하는 객체. Object describing initialization options. |
Example:
// 위젯 비/활성화
const viewer = new Ditap.DitapViewer("ditapContainer", {
// 편집, 분석, 측정 도구 활성화
// 1. 활성화 - 전체 활성화(true) 또는 부분 활성화(활성화 시킬 기능만 true)
// 2. 비활성화 - false 또는 전달 안함
editingTools: {
select: {
// 선택 기능 옵션 설정
// 1. hover Coolor - 3D Tile, Model 객체에 마우스를 이동할 경우 변경되는 색상
// 2. selectedColor - 3D Tile, Model 객체를 선택할 경우 변경되는 색상
hoverColor: Color.fromCssColorString("#BDBDBD"),
selectedColor: Color.fromCssColorString("#9DCFFF"),
property: {
// 속성 기능 옵션 설정
// 1. type - "popup" or "panel" 속성 타입 지정
// 2. container - id(string) or Element 속성 컨테이너 지정
// 3. propertyCallback - 선택된 객체를 인자로 받고 비동기로 속성값을 요청하는 promise
type: "panel",
container: "ditapPanel",
// type: "popup",
// container: "ditapContainer",
},
remove: true,
move: true,
rotate: true,
scale: true,
clipping: true,
},
createTools: {
point: true,
linestring: true,
polygon: true,
},
remove: true,
move: true,
rotate: true,
scale: true,
upload: true,
},
analysisTools: {
visibility: true,
split: true,
solar: true,
sunshine: true,
limitaion: true,
},
measurementTools: {
altitude: true,
angle: true,
straight: true,
ground: true,
plane: true,
vertical: true,
horizontal: true,
area: true,
volume: true,
},
// 처음화면
// 1. 활성화 - 기본 위치로 이동(true) 또는 초기 위치 지정(Cartesian3)
// 2. 비활성화 - false 또는 전달 안함
homeButton: true,
compass: true, // 나침반(true/false)
dimensionMode: true, // 2D/3D 전환(true/false)
capture: true, // 캡처(true/false)
print: true, // 인쇄(true/false)
navigationHelpButton: true, // 도움말 버튼(true/false)
fullscreenButton: true, // 전체 화면(true/false)
baseLayerPicker: true, // 배경 지도(true/false)
});
Extends
Members
- Inherited From:
readonly animation : Animation
- Inherited From:
readonly baseLayerPicker : BaseLayerPicker
- Inherited From:
CreditDisplay
and potentially other things.
- Inherited From:
readonly camera : Camera
- Inherited From:
- Inherited From:
readonly capture : DitapCaptureButton
Gets the DitapCapture.
readonly cesiumWidget : CesiumWidget
- Inherited From:
readonly clock : Clock
- Inherited From:
clockTrackedDataSource : DataSource
- Inherited From:
readonly clockViewModel : ClockViewModel
- Inherited From:
readonly compass : DitapCompass
Gets the DitapCompass.
- Inherited From:
creditDisplay : CreditDisplay
- Inherited From:
readonly dataSourceDisplay : DataSourceDisplay
DataSource
visualization.
- Inherited From:
readonly dataSources : DataSourceCollection
DataSource
instances to be visualized.
- Inherited From:
readonly dimensionMode : DitapDimensionModeButton
Gets the DitapDimensionMode.
readonly ellipsoid : Ellipsoid
- Inherited From:
- Default Value:
Ellipsoid.default
readonly entities : EntityCollection
dataSourceDisplay.defaultDataSource.entities
.
- Inherited From:
readonly fullscreenButton : DitapFullscreenButton
Gets the DitapFullscreenButton.
readonly geocoder : DitapGeocoder
Gets the DitapGeocoder.
readonly homeButton : DitapHomeButton
Gets the DitapHomeButton.
readonly imageryLayers : ImageryLayerCollection
- Inherited From:
readonly infoBox : InfoBox
- Inherited From:
readonly navigationHelpButton : DitapNavigationHelpButton
Gets the DitapNavigationHelpButton.
readonly postProcessStages : PostProcessStageCollection
- Inherited From:
readonly projectionPicker : ProjectionPicker
- Inherited From:
- Inherited From:
- Default Value:
1.0
readonly scene : Scene
- Inherited From:
readonly sceneModePicker : SceneModePicker
- Inherited From:
readonly screenSpaceEventHandler : ScreenSpaceEventHandler
- Inherited From:
selectedEntity : Entity|undefined
- Inherited From:
readonly selectedEntityChanged : Event
- Inherited From:
readonly selectionIndicator : SelectionIndicator
- Inherited From:
readonly shadowMap : ShadowMap
- Inherited From:
- Inherited From:
useDefaultRenderLoop
is true. If undefined, the browser's requestAnimationFrame implementation
determines the frame rate. If defined, this value must be greater than 0. A value higher
than the underlying requestAnimationFrame implementation will have no effect.
- Inherited From:
terrainProvider : TerrainProvider
- Inherited From:
terrainShadows : ShadowMode
- Inherited From:
readonly timeline : Timeline
- Inherited From:
trackedEntity : Entity|undefined
- Inherited From:
readonly trackedEntityChanged : Event
- Inherited From:
Viewer#resolutionScale
will still take effect whether
this flag is true or false.
- Inherited From:
- Default Value:
true
resize
, render
methods
as part of a custom render loop. If an error occurs during rendering, Scene
's
renderError
event will be raised and this property
will be set to false. It must be set back to true to continue rendering
after the error.
- Inherited From:
readonly vrButton : VRButton
- Inherited From:
readonly weather : DitapWeather
Gets the DitapWeather.
Methods
Name | Type | Description |
---|---|---|
property |
object | object of property. |
Returns:
Name | Type | Description |
---|---|---|
options |
object | object of select options. |
Returns:
createDefaultImageryProviderViewModels() → Array.<ProviderViewModel>
Gets the Array of Imagery Provider to be added to the base layer.
Returns:
Array of providerViewModel
createDefaultTerrainProviderViewModels() → Array.<ProviderViewModel>
Gets the Array of Terrain Provider to be added to the base layer.
Returns:
Array of providerViewModel
Name | Type | Description |
---|---|---|
mixin |
Viewer.ViewerMixin | The Viewer mixin to add to this instance. |
options |
object | optional The options object to be passed to the mixin function. |
- Inherited From:
See:
The offset is heading/pitch/range in the local east-north-up reference frame centered at the center of the bounding sphere. The heading and the pitch angles are defined in the local east-north-up reference frame. The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch angles are above the plane. Negative pitch angles are below the plane. The range is the distance from the center. If the range is zero, a range will be computed such that the whole bounding sphere is visible.
In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the target will be the range. The heading will be determined from the offset. If the heading cannot be determined from the offset, the heading will be north.
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
target |
Entity | Array.<Entity> | EntityCollection | DataSource | ImageryLayer | Cesium3DTileset | TimeDynamicPointCloud | Promise.<(Entity|Array.<Entity>|EntityCollection|DataSource|ImageryLayer|Cesium3DTileset|TimeDynamicPointCloud|VoxelPrimitive)> | The entity, array of entities, entity collection, data source, Cesium3DTileset, point cloud, or imagery layer to view. You can also pass a promise that resolves to one of the previously mentioned types. | ||||||||||||||||
options |
object |
optional
Object with the following properties:
|
Returns:
- Inherited From:
- Inherited From:
Returns:
- Inherited From:
Destroy the running Interaction.
Name | Type | Description |
---|---|---|
callback |
function |
이벤트 제거 후 실행 할 콜백함수. Callback function to be executed after removing the event. |
Destroying all analysis entities created on the viewer.
Destroying all Geometric entities created on the viewer.
Destroying all measurement entities created on the viewer.
Remove the storage of the corresponding object.
Name | Type | Description |
---|---|---|
storage |
Array.<object> |
제거 할 스토리지. Storage to be removed. |
useDefaultRenderLoop
is set to false;
- Inherited From:
useDefaultRenderLoop
is set to false.
- Inherited From:
The offset is heading/pitch/range in the local east-north-up reference frame centered at the center of the bounding sphere. The heading and the pitch angles are defined in the local east-north-up reference frame. The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch angles are above the plane. Negative pitch angles are below the plane. The range is the distance from the center. If the range is zero, a range will be computed such that the whole bounding sphere is visible.
In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the target will be the range. The heading will be determined from the offset. If the heading cannot be determined from the offset, the heading will be north.
Name | Type | Description |
---|---|---|
target |
Entity | Array.<Entity> | EntityCollection | DataSource | ImageryLayer | Cesium3DTileset | TimeDynamicPointCloud | Promise.<(Entity|Array.<Entity>|EntityCollection|DataSource|ImageryLayer|Cesium3DTileset|TimeDynamicPointCloud|VoxelPrimitive)> | The entity, array of entities, entity collection, data source, Cesium3DTileset, point cloud, or imagery layer to view. You can also pass a promise that resolves to one of the previously mentioned types. |
offset |
HeadingPitchRange | optional The offset from the center of the entity in the local east-north-up reference frame. |
Returns:
- Inherited From:
Type Definitions
Initialization options for the Viewer constructor
Properties:
Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
editingTools |
object | 다음과 같은 속성을 가진 편집 객체. Object of editingTools with the following properties: Properties
|
|||||||||||||||||||||||||||||||||||
analysisTools |
object | 다음과 같은 속성을 가진 분석 객체. Object of analysisTools with the following properties: Properties
|
|||||||||||||||||||||||||||||||||||
measurementTools |
object | 다음과 같은 속성을 가진 측정 객체. Object of measurementTools with the following properties: Properties
|
|||||||||||||||||||||||||||||||||||
animation |
boolean |
<optional> |
true | false로 설정 시 애니메이션 위젯은 생성되지 않음. If set to false, the Animation widget will not be created. |
|||||||||||||||||||||||||||||||||
baseLayerPicker |
boolean |
<optional> |
true | false로 설정 시 지도 선택 위젯은 생성되지 않음. If set to false, the BaseLayerPicker widget will not be created. |
|||||||||||||||||||||||||||||||||
fullscreenButton |
boolean |
<optional> |
true | false로 설정 시 전체화면 위젯은 생성되지 않음. If set to false, the FullscreenButton widget will not be created. |
|||||||||||||||||||||||||||||||||
vrButton |
boolean |
<optional> |
false | false로 설정 시 VR 버튼 위젯은 생성되지 않음. If set to true, the VRButton widget will be created. |
|||||||||||||||||||||||||||||||||
geocoder |
boolean | Array.<GeocoderService> |
<optional> |
true | false로 설정 시 주소검색 위젯은 생성되지 않음. If set to false, the Geocoder widget will not be created. |
|||||||||||||||||||||||||||||||||
homeButton |
boolean |
<optional> |
true | false로 설정 시 처음화면 위젯은 생성되지 않음. If set to false, the HomeButton widget will not be created. |
|||||||||||||||||||||||||||||||||
weather |
boolean |
<optional> |
true | false로 설정 시 날씨 위젯은 생성되지 않음. If set to false, the Weather widget will not be created. |
|||||||||||||||||||||||||||||||||
compass |
bollean |
<optional> |
true | false로 설정 시 나침반 위젯은 생성되지 않음. If set to false, the Compass widget will not be created. |
|||||||||||||||||||||||||||||||||
dimensionMode |
boolean |
<optional> |
true | false로 설정 시 2D/3D 모드 전환 위젯은 생성되지 않음. If set to false, the 2D/3D mode switch widget will not be created. |
|||||||||||||||||||||||||||||||||
capture |
boolean |
<optional> |
true | false로 설정 시 캡처 위젯은 생성되지 않음. If set to false, the Capture widget will not be created. |
|||||||||||||||||||||||||||||||||
print |
boolean |
<optional> |
true | false로 설정 시 인쇄 위젯은 생성되지 않음. If set to false, the Printed widget will not be created. |
|||||||||||||||||||||||||||||||||
timeline |
boolean |
<optional> |
true | false로 설정 시 타임라인 위젯은 생성되지 않음. If set to false, the Timeline widget will not be created. |
|||||||||||||||||||||||||||||||||
navigationHelpButton |
boolean |
<optional> |
true | false로 설정 시 navigationHelpButton 위젯은 생성되지 않음. If set to false, the navigation help button will not be created. |
|||||||||||||||||||||||||||||||||
navigationInstructionsInitiallyVisible |
boolean |
<optional> |
true | 초기에 네비게이션 지침이 표시되어야 하는 경우 true, 사용자가 명시적으로 버튼을 클릭할 때까지 표시되지 않아야 하는 경우 false. True if the navigation instructions should initially be visible, or false if the should not be shown until the user explicitly clicks the button. |
|||||||||||||||||||||||||||||||||
scene3DOnly |
boolean |
<optional> |
false | true인 경우 3D에서만 렌더링 됨. When true , each geometry instance will only be rendered in 3D to save GPU memory. |
|||||||||||||||||||||||||||||||||
shouldAnimate |
boolean |
<optional> |
false | 시뮬레이션 시간을 진행시키려면 true, 그렇지 않은 경우 falsetrue if the clock should attempt to advance simulation time by default, false otherwise. This option takes precedence over setting
Viewer#clockViewModel . |
|||||||||||||||||||||||||||||||||
clockViewModel |
ClockViewModel |
<optional> |
new ClockViewModel(clock) | 현재 시간을 제어하기 위해 사용할 시계 뷰 모델. The clock view model to use to control current time. |
|||||||||||||||||||||||||||||||||
selectedImageryProviderViewModel |
ProviderViewModel |
<optional> |
현재의 기본 이미지 레이어에 대한 뷰 모델. baseLayerPicker가 true로 설정된 경우에만 유효. The view model for the current base imagery layer, if not supplied the first available base layer is used. This value is only valid if `baseLayerPicker` is set to true. |
||||||||||||||||||||||||||||||||||
imageryProviderViewModels |
Array.<ProviderViewModel> |
<optional> |
createDefaultImageryProviderViewModels() | BaseLayerPicker에서 선택 가능한 ProviderViewModels의 배열. baseLayerPicker가 true로 설정된 경우에만 유효. The array of ProviderViewModels to be selectable from the BaseLayerPicker. This value is only valid if `baseLayerPicker` is set to true. |
|||||||||||||||||||||||||||||||||
selectedTerrainProviderViewModel |
ProviderViewModel |
<optional> |
현재 베이스 지형 레이어의 뷰 모델. 제공되지 않은 경우 첫 번째 사용 가능한 베이스 레이어가 사용됨. baseLayerPicker가 true로 설정된 경우에만 유효. The view model for the current base terrain layer, if not supplied the first available base layer is used. This value is only valid if `baseLayerPicker` is set to true. |
||||||||||||||||||||||||||||||||||
imageryProvider |
ImageryProvider | false |
<optional> |
createWorldImagery() | 사용할 imageryProvider. baseLayerPicker가 false로 설정된 경우에만 유효. The imagery provider to use. This value is only valid if `baseLayerPicker` is set to false. Deprecated. |
|||||||||||||||||||||||||||||||||
baseLayer |
ImageryLayer | false |
<optional> |
ImageryLayer.fromWorldImagery() | 지구에 적용되는 가장 하단의 이미지 레이어. baseLayerPicker가 false로 설정된 경우에만 유효. The bottommost imagery layer applied to the globe. If set to false , no imagery provider will be added. This value is only valid if `baseLayerPicker` is set to false. |
|||||||||||||||||||||||||||||||||
terrainProvider |
TerrainProvider |
<optional> |
new EllipsoidTerrainProvider() | 사용할 terrain provider. The terrain provider to use |
|||||||||||||||||||||||||||||||||
options.terrain |
Terrain |
<optional> |
지형 공급자로 사용할 지형 객체. terrainProvider가 되지 않은 경우에만 지정가능. A terrain object which handles asynchronous terrain provider. Can only specify if options.terrainProvider is undefined. |
||||||||||||||||||||||||||||||||||
skyBox |
SkyBox | false |
<optional> |
별을 렌더링하기 위해 사용. false로 설정 시 태양, 달이 추가되지 않음. The skybox used to render the stars. When undefined , the default stars are used. If set to false , no skyBox, Sun, or Moon will be added. |
||||||||||||||||||||||||||||||||||
skyAtmosphere |
SkyAtmosphere | false |
<optional> |
대기(SkyAtmosphere). false로 설정 시 대기 효과 제거. Blue sky, and the glow around the Earth's limb. Set to false to turn it off. |
||||||||||||||||||||||||||||||||||
fullscreenElement |
Element | string |
<optional> |
document.body | 전체화면 모드 요소. 기본적으로 사용. The element or id to be placed into fullscreen mode when the full screen button is pressed. |
|||||||||||||||||||||||||||||||||
useDefaultRenderLoop |
boolean |
<optional> |
true | 렌더링 루프 제어 여부. True if this widget should control the render loop, false otherwise. |
|||||||||||||||||||||||||||||||||
targetFrameRate |
number |
<optional> |
기본 렌더링 루프 사용할 경우 대상 프레임 속도 지정. The target frame rate when using the default render loop. |
||||||||||||||||||||||||||||||||||
showRenderLoopErrors |
boolean |
<optional> |
true | 렌더링 루프 오류 발생 시 오류 표시 여부. If true, this widget will automatically display an HTML panel to the user containing the error, if a render loop error occurs. |
|||||||||||||||||||||||||||||||||
useBrowserRecommendedResolution |
boolean |
<optional> |
true | true인 경우 권장 해상도로 렌더링. If true, render at the browser's recommended resolution and ignore window.devicePixelRatio . |
|||||||||||||||||||||||||||||||||
automaticallyTrackDataSourceClocks |
boolean |
<optional> |
true | true인 경우 새로 추가된 데이터소스의 시계 설정 자동 추적, false 인 경우 시계를 독립적으로 구성 가능. If true, this widget will automatically track the clock settings of newly added DataSources, updating if the DataSource's clock changes. Set this to false if you want to configure the clock independently. |
|||||||||||||||||||||||||||||||||
contextOptions |
ContextOptions |
<optional> |
Scene에 전달되는 컨텍스트 및 WebGL 생성 속성을 지정. Context and WebGL creation properties passed to Scene . |
||||||||||||||||||||||||||||||||||
sceneMode |
SceneMode |
<optional> |
SceneMode.SCENE3D | 초기 장면 모드 설정. 기본값은 3D 장면 모드. The initial scene mode. |
|||||||||||||||||||||||||||||||||
mapProjection |
MapProjection |
<optional> |
new GeographicProjection() | 2D 및 Columbus View 모드에서 사용할 지도 투영(Map Projection)을 설정. The map projection to use in 2D and Columbus View modes. |
|||||||||||||||||||||||||||||||||
globe |
Globe | false |
<optional> |
new Globe(mapProjection.ellipsoid) | 장면에서 사용할 지구(Globe)를 설정. The globe to use in the scene. If set to false , no globe will be added. |
|||||||||||||||||||||||||||||||||
orderIndependentTranslucency |
boolean |
<optional> |
true | true인 경우 독립적인 투명도 사용. If true and the configuration supports it, use order independent translucency. |
|||||||||||||||||||||||||||||||||
creditContainer |
Element | string |
<optional> |
CreditDisplay를 포함할 DOM 요소나 ID. The DOM element or ID that will contain the CreditDisplay . 지정되지 않은 경우, 크레딧은 위젯 자체의 아래에 추가.If not specified, the credits are added to the bottom of the widget itself. |
||||||||||||||||||||||||||||||||||
creditViewport |
Element | string |
<optional> |
크레딧 팝업(credit pop-up)을 포함할 DOM 엘리먼트 또는 ID. The DOM element or ID that will contain the credit pop up created by the CreditDisplay . 지정되지 않은 경우, 크레딧은 위젯 자체의 위에 추가. If not specified, it will appear over the widget itself. |
||||||||||||||||||||||||||||||||||
dataSources |
DataSourceCollection |
<optional> |
new DataSourceCollection() | 위젯에서 시각화하는 데이터소스의 컬렉션 설정. The collection of data sources visualized by the widget. If this parameter is provided, the instance is assumed to be owned by the caller and will not be destroyed when the viewer is destroyed. |
|||||||||||||||||||||||||||||||||
shadows |
boolean |
<optional> |
false | 그림자 투사 여부. Determines if shadows are cast by light sources. |
|||||||||||||||||||||||||||||||||
terrainShadows |
ShadowMode |
<optional> |
ShadowMode.RECEIVE_ONLY | 그림자 투사 방법. Determines if the terrain casts or receives shadows from light sources. |
|||||||||||||||||||||||||||||||||
mapMode2D |
MapMode2D |
<optional> |
MapMode2D.INFINITE_SCROLL | 2D 지도 회전여부 또는 수평 무한 스크롤 가능 여부. Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction. |
|||||||||||||||||||||||||||||||||
blurActiveElementOnCanvasFocus |
boolean |
<optional> |
true | true인 경우 뷰어의 캔버스가 클릭될 때 활성 요소의 포커스 잃음, false인 경우 캔버스가 활성 요소로 설정되지 않고 위치나 엔티티 데이터를 가져오기 위해 클릭될 때 유용. If true, the active element will blur when the viewer's canvas is clicked. Setting this to false is useful for cases when the canvas is clicked only for retrieving position or an entity data without actually meaning to set the canvas to be the active element. |
|||||||||||||||||||||||||||||||||
requestRenderMode |
boolean |
<optional> |
false | true인 경우 scene 내에서 변경 사항에 따라 필요에 경우 프레임 렌더링 발생. If true, rendering a frame will only occur when needed as determined by changes within the scene. Enabling reduces the CPU/GPU usage of your application and uses less battery on mobile, but requires using Scene#requestRender 새 프레임을 명시적으로 렌더링하려면 render 함수 사용해야 함.to render a new frame explicitly in this mode. This will be necessary in many cases after making changes to the scene in other parts of the API. See Improving Performance with Explicit Rendering. |
|||||||||||||||||||||||||||||||||
maximumRenderTimeChange |
number |
<optional> |
0.0 | requestRenderMode가 true로 설정된 경우 렌더 요청 전에 허용되는 최대 시뮬레이션 시간 변경을 정의. If requestRenderMode is true, this value defines the maximum change in simulation time allowed before a render is requested. See Improving Performance with Explicit Rendering. |
|||||||||||||||||||||||||||||||||
depthPlaneEllipsoidOffset |
number |
<optional> |
0.0 | 깊이 평면을 조정하여 타원체의 제로 고도 아래 렌더링 artefacts 해결. Adjust the DepthPlane to address rendering artefacts below ellipsoid zero elevation. |
|||||||||||||||||||||||||||||||||
msaaSamples |
number |
<optional> |
1 | 다중 샘플 안티앨리어싱(MSAA)의 속도 제어. 일반적으로 다중 샘플링 비율은 픽셀당 2,4 및 8샘플이다. If provided, this value controls the rate of multisample antialiasing. Typical multisampling rates are 2, 4, and sometimes 8 samples per pixel. Higher sampling rates of MSAA may impact performance in exchange for improved visual quality. This value only applies to WebGL2 contexts that support multisample render targets. |