Skip to content

Commit 8fcd32a

Browse files
committed
Add missing tilesetId options, fix empty credit bug
1 parent f74db25 commit 8fcd32a

File tree

6 files changed

+92
-16
lines changed

6 files changed

+92
-16
lines changed

CHANGES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Change Log {#changes}
22

3+
### ? - ?
4+
5+
##### Additions :tada:
6+
7+
- Added `CesiumAzureMapsRasterOverlay`.
8+
9+
##### Fixes :wrench:
10+
11+
- Fixed a bug where `CesiumCreditSystem` would not filter out empty credits, resulting in duplicate on-screen delimiters.
12+
313
### v2.20.0 - 2025-10-01
414

515
##### Additions :tada:

Source/CesiumRuntime/Private/CesiumAzureMapsRasterOverlay.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,28 @@ std::string getTilesetId(EAzureMapsTilesetId tilesetId) {
1515
return AzureMapsTilesetId::baseLabelsRoad;
1616
case EAzureMapsTilesetId::BaseLabelsDarkGrey:
1717
return AzureMapsTilesetId::baseLabelsDarkGrey;
18+
case EAzureMapsTilesetId::BaseHybridRoad:
19+
return AzureMapsTilesetId::baseHybridRoad;
20+
case EAzureMapsTilesetId::BaseHybridDarkGrey:
21+
return AzureMapsTilesetId::baseHybridDarkGrey;
1822
case EAzureMapsTilesetId::Imagery:
1923
return AzureMapsTilesetId::imagery;
2024
case EAzureMapsTilesetId::Terra:
2125
return AzureMapsTilesetId::terra;
26+
case EAzureMapsTilesetId::WeatherRadar:
27+
return AzureMapsTilesetId::weatherRadar;
28+
case EAzureMapsTilesetId::WeatherInfrared:
29+
return AzureMapsTilesetId::weatherInfrared;
30+
case EAzureMapsTilesetId::TrafficAbsolute:
31+
return AzureMapsTilesetId::trafficAbsolute;
32+
case EAzureMapsTilesetId::TrafficRelativeMain:
33+
return AzureMapsTilesetId::trafficRelativeMain;
34+
case EAzureMapsTilesetId::TrafficRelativeDark:
35+
return AzureMapsTilesetId::trafficRelativeDark;
36+
case EAzureMapsTilesetId::TrafficDelay:
37+
return AzureMapsTilesetId::trafficDelay;
38+
case EAzureMapsTilesetId::TrafficReduced:
39+
return AzureMapsTilesetId::trafficReduced;
2240
case EAzureMapsTilesetId::BaseRoad:
2341
default:
2442
return AzureMapsTilesetId::baseRoad;

Source/CesiumRuntime/Private/CesiumCreditSystem.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,19 @@ void ACesiumCreditSystem::Tick(float DeltaTime) {
340340
for (int i = 0; i < creditsToShowThisFrame.size(); i++) {
341341
const CesiumUtility::Credit& credit = creditsToShowThisFrame[i];
342342

343-
FString CreditRtf;
343+
FString creditRtf;
344344
const std::string& html = _pCreditSystem->getHtml(credit);
345345

346346
auto htmlFind = _htmlToRtf.find(html);
347347
if (htmlFind != _htmlToRtf.end()) {
348-
CreditRtf = htmlFind->second;
348+
creditRtf = htmlFind->second;
349349
} else {
350-
CreditRtf = ConvertHtmlToRtf(html);
351-
_htmlToRtf.insert({html, CreditRtf});
350+
creditRtf = ConvertHtmlToRtf(html);
351+
_htmlToRtf.insert({html, creditRtf});
352+
}
353+
354+
if (creditRtf.IsEmpty()) {
355+
continue;
352356
}
353357

354358
if (_pCreditSystem->shouldBeShownOnScreen(credit)) {
@@ -358,13 +362,13 @@ void ACesiumCreditSystem::Tick(float DeltaTime) {
358362
OnScreenCredits += TEXT(" \u2022 ");
359363
}
360364

361-
OnScreenCredits += CreditRtf;
365+
OnScreenCredits += creditRtf;
362366
} else {
363367
if (i != 0) {
364368
Credits += "\n";
365369
}
366370

367-
Credits += CreditRtf;
371+
Credits += creditRtf;
368372
}
369373
}
370374

Source/CesiumRuntime/Public/CesiumAzureMapsRasterOverlay.h

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,72 @@ enum class EAzureMapsTilesetId : uint8 {
1414
/**
1515
* All roadmap layers with Azure Maps' main style.
1616
*/
17-
BaseRoad UMETA(DisplayName = "Roadmap"),
17+
BaseRoad UMETA(DisplayName = "Base"),
1818
/**
19-
* @brief All roadmap layers with Azure Maps' dark grey style.
19+
* All roadmap layers with Azure Maps' dark grey style.
2020
*/
21-
BaseDarkGrey UMETA(DisplayName = "Roadmap (Dark Grey)"),
21+
BaseDarkGrey UMETA(DisplayName = "Base (Dark Grey)"),
2222
/**
23-
* @brief Label data in Azure Maps' main style.
23+
* Label data in Azure Maps' main style.
2424
*/
2525
BaseLabelsRoad UMETA(DisplayName = "Labels"),
2626
/**
27-
* @brief Label data in Azure Maps' dark grey style.
27+
* Label data in Azure Maps' dark grey style.
2828
*/
2929
BaseLabelsDarkGrey UMETA(DisplayName = "Labels (Dark Grey)"),
3030
/**
31-
* @brief A combination of satellite or aerial imagery. Only available in S1
32-
* and G2 pricing SKU.
31+
* Road, boundary, and label data in Azure Maps' main style.
32+
*/
33+
BaseHybridRoad UMETA(DisplayName = "Hybrid"),
34+
/**
35+
* Road, boundary, and label data in Azure Maps' dark grey style.
36+
*/
37+
BaseHybridDarkGrey UMETA(DisplayName = "Hybrid (Dark Grey)"),
38+
/**
39+
* A combination of satellite or aerial imagery. Only available for accounts
40+
* under S1 and G2 pricing SKU.
3341
*/
3442
Imagery,
3543
/**
3644
* Shaded relief and terra layers.
3745
*/
38-
Terra
46+
Terra,
47+
/**
48+
* Weather radar tiles. Latest weather radar images including areas of rain,
49+
* snow, ice and mixed conditions.
50+
*/
51+
WeatherRadar UMETA(DisplayName = "Weather (Radar)"),
52+
/**
53+
* Weather infrared tiles. Latest infrared satellite images showing clouds by
54+
* their temperature.
55+
*/
56+
WeatherInfrared UMETA(DisplayName = "Weather (Infrared)"),
57+
/**
58+
* Absolute traffic tiles in Azure Maps' main style.
59+
*/
60+
TrafficAbsolute UMETA(DisplayName = "Traffic (Absolute)"),
61+
/**
62+
* Relative traffic tiles in Azure Maps' main style. This filters out traffic
63+
* data from smaller streets that are otherwise included in TrafficAbsolute.
64+
*/
65+
TrafficRelativeMain UMETA(DisplayName = "Traffic (Relative)"),
66+
/**
67+
* Relative traffic tiles in Azure Maps' dark style. This filters out traffic
68+
* data from smaller streets that are otherwise included in TrafficAbsolute.
69+
*/
70+
TrafficRelativeDark UMETA(DisplayName = "Traffic (Relative, Dark)"),
71+
/**
72+
* Delay traffic tiles in Azure Maps' dark style. This only shows the points
73+
* of delay along traffic routes that are otherwise included in
74+
* TrafficAbsolute.
75+
*/
76+
TrafficDelay UMETA(DisplayName = "Traffic (Delay)"),
77+
/**
78+
* Reduced traffic tiles in Azure Maps' dark style. This only shows the
79+
* traffic routes without the delay points that are otherwise included in
80+
* TrafficAbsolute.
81+
*/
82+
TrafficReduced UMETA(DisplayName = "Traffic (Reduced)"),
3983
};
4084

4185
/**

Source/CesiumRuntime/Public/CesiumRasterOverlay.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class CESIUMRUNTIME_API UCesiumRasterOverlay : public UActorComponent {
111111
* overlay will be removed from the Cesium3DTileset if already present but not
112112
* re-added.
113113
*/
114-
UFUNCTION(BlueprintCallable, Category = "Cesium")
114+
UFUNCTION(CallInEditor, BlueprintCallable, Category = "Cesium")
115115
void Refresh();
116116

117117
UFUNCTION(BlueprintCallable, Category = "Cesium")

0 commit comments

Comments
 (0)