Cesium for Unreal 2.18.0
Loading...
Searching...
No Matches
CesiumGeoJsonDocumentRasterOverlay.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
6#include "CesiumIonServer.h"
8#include "CesiumVectorStyle.h"
9#include "Components/ActorComponent.h"
10#include "CoreMinimal.h"
11#include "Delegates/Delegate.h"
12#include "CesiumGeoJsonDocumentRasterOverlay.generated.h"
13
14/**
15 * Configures where the CesiumVectorDocumentRasterOverlay should load its vector
16 * data from.
17 */
18UENUM(BlueprintType)
20 /**
21 * The raster overlay will display the provided GeoJsonDocument.
22 */
24 /**
25 * The raster overlay will load a GeoJsonDocument from Cesium ion.
26 */
28 /**
29 * The raster overlay will load a GeoJsonDocument from a URL.
30 */
32};
33
35 FCesiumGeoJsonDocumentRasterOverlayOnDocumentLoadedCallback,
37 InDocument);
38
39UCLASS(
40 ClassGroup = Cesium,
41 BlueprintType,
43 meta = (BlueprintSpawnableComponent))
45 : public UCesiumRasterOverlay {
46 GENERATED_BODY()
47
48public:
49 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
52
53 /**
54 * The ID of the Cesium ion asset to use.
55 */
56 UPROPERTY(
57 EditAnywhere,
58 BlueprintReadWrite,
59 Category = "Cesium",
60 meta =
61 (EditCondition =
62 "Source == ECesiumGeoJsonDocumentRasterOverlaySource::FromCesiumIon"))
64
65 /**
66 * The Cesium ion Server from which this raster overlay is loaded.
67 */
68 UPROPERTY(
69 EditAnywhere,
70 BlueprintReadWrite,
71 Category = "Cesium",
72 AdvancedDisplay,
73 meta =
74 (EditCondition =
75 "Source == ECesiumGeoJsonDocumentRasterOverlaySource::FromCesiumIon"))
77
78 /**
79 * A FCesiumGeoJsonDocument to display.
80 */
81 UPROPERTY(
82 EditAnywhere,
83 BlueprintReadWrite,
84 Category = "Cesium",
85 meta =
86 (EditCondition =
87 "Source == ECesiumGeoJsonDocumentRasterOverlaySource::FromDocument"))
89
90 /**
91 * A URL to load a GeoJSON document from.
92 */
93 UPROPERTY(
94 EditAnywhere,
95 BlueprintReadWrite,
96 Category = "Cesium",
97 meta =
98 (EditCondition =
99 "Source == ECesiumGeoJsonDocumentRasterOverlaySource::FromUrl"))
100 FString Url;
101
102 /**
103 * Headers to use while making a request to `Url` to load a GeoJSON document.
104 */
105 UPROPERTY(
106 EditAnywhere,
107 BlueprintReadWrite,
108 Category = "Cesium",
109 meta =
110 (EditCondition =
111 "Source == ECesiumGeoJsonDocumentRasterOverlaySource::FromUrl"))
112 TMap<FString, FString> RequestHeaders;
113
114 /**
115 * The number of mip levels to generate for each tile of this raster overlay.
116 *
117 * Additional mip levels can improve the visual quality of tiles farther from
118 * the camera at the cost of additional rasterization time to create each mip
119 * level.
120 */
121 UPROPERTY(
122 EditAnywhere,
123 BlueprintReadWrite,
124 Category = "Cesium",
125 meta = (ClampMin = "0", ClampMax = "8"))
126 int32 MipLevels = 0;
127
128 /**
129 * The default style to use for this raster overlay.
130 *
131 * If no style is set on a GeoJSON object or any of its parents, this style
132 * will be used instead.
133 */
134 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
136
137 /**
138 * A callback that will be called when the document has been loaded.
139 */
140 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
141 FCesiumGeoJsonDocumentRasterOverlayOnDocumentLoadedCallback OnDocumentLoaded;
142
143protected:
144 virtual std::unique_ptr<CesiumRasterOverlays::RasterOverlay> CreateOverlay(
145 const CesiumRasterOverlays::RasterOverlayOptions& options = {}) override;
146};
DECLARE_DYNAMIC_DELEGATE_OneParam(FCesiumGeoJsonDocumentRasterOverlayOnDocumentLoadedCallback, FCesiumGeoJsonDocument, InDocument)
ECesiumGeoJsonDocumentRasterOverlaySource
Configures where the CesiumVectorDocumentRasterOverlay should load its vector data from.
@ FromCesiumIon
The raster overlay will load a GeoJsonDocument from Cesium ion.
@ FromDocument
The raster overlay will display the provided GeoJsonDocument.
@ FromUrl
The raster overlay will load a GeoJsonDocument from a URL.
Blueprintable
TMap< FString, FString > RequestHeaders
Headers to use while making a request to Url to load a GeoJSON document.
UCesiumIonServer * CesiumIonServer
The Cesium ion Server from which this raster overlay is loaded.
FCesiumGeoJsonDocument GeoJsonDocument
A FCesiumGeoJsonDocument to display.
int64 IonAssetID
The ID of the Cesium ion asset to use.
FCesiumGeoJsonDocumentRasterOverlayOnDocumentLoadedCallback OnDocumentLoaded
A callback that will be called when the document has been loaded.
int32 MipLevels
The number of mip levels to generate for each tile of this raster overlay.
FString Url
A URL to load a GeoJSON document from.
virtual std::unique_ptr< CesiumRasterOverlays::RasterOverlay > CreateOverlay(const CesiumRasterOverlays::RasterOverlayOptions &options={}) override
ECesiumGeoJsonDocumentRasterOverlaySource Source
FCesiumVectorStyle DefaultStyle
The default style to use for this raster overlay.
Defines a Cesium ion Server.
STL namespace.
A GeoJSON document containing a tree of FCesiumGeoJsonObject values.
Style information to use when drawing vector data.