Skip to content

Commit 889a4b4

Browse files
committed
Addressing PR feedback.
1 parent 892f12e commit 889a4b4

File tree

5 files changed

+109
-114
lines changed

5 files changed

+109
-114
lines changed

Editor/CesiumAzureMapsRasterOverlayEditor.cs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,22 @@ private void DrawAzureMapsProperties()
7373

7474
var viewContent = new GUIContent(
7575
"View",
76-
"The View parameter (also called the \"user region\" parameter) allows"
77-
+ " you to show the correct maps for a certain country/region for"
78-
+ " geopolitically disputed regions.");
76+
"The View parameter (also called the \"user region\" parameter) allows "
77+
+"you to show the correct maps for a certain country/region for "
78+
+"geopolitically disputed regions. "
79+
+"\n"
80+
+"Different countries/regions have different views of such regions, and the "
81+
+"View parameter allows your application to comply with the view required by "
82+
+"the country/region your application will be serving. By default, the View "
83+
+"parameter is set to \"Unified\" even if you haven't defined it in the "
84+
+"request. It is your responsibility to determine the location of your users, "
85+
+"and then set the View parameter correctly for that location. Alternatively, "
86+
+"you have the option to set 'View=Auto', which will return the map data "
87+
+"based on the IP address of the request. The View parameter in Azure Maps "
88+
+"must be used in compliance with applicable laws, including those regarding "
89+
+"mapping, of the country/region where maps, images and other data and third "
90+
+"party content that you are authorized to access via Azure Maps is made "
91+
+"available. Example: view=IN.");
7992
EditorGUILayout.PropertyField(this._view, viewContent);
8093
}
8194

Runtime/CesiumAzureMapsRasterOverlay.cs

Lines changed: 70 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
using Reinterop;
2-
using System.Collections;
3-
using System.Collections.Generic;
4-
using System.ComponentModel;
52
using UnityEngine;
63

74
namespace CesiumForUnity
@@ -11,88 +8,75 @@ namespace CesiumForUnity
118
/// </summary>
129
public enum AzureMapsTilesetId
1310
{
14-
/**
15-
* All roadmap layers with Azure Maps' main style.
16-
*/
17-
[Description("Base")]
18-
BaseRoad,
19-
/**
20-
* All roadmap layers with Azure Maps' dark grey style.
21-
*/
22-
[Description("Base (Dark Grey)")]
23-
BaseDarkGrey,
24-
/**
25-
* Label data in Azure Maps' main style.
26-
*/
27-
[Description("Labels")]
28-
BaseLabelsRoad,
29-
/**
30-
* Label data in Azure Maps' dark grey style.
31-
*/
32-
[Description("Labels (Dark Grey)")]
33-
BaseLabelsDarkGrey,
34-
/**
35-
* Road, boundary, and label data in Azure Maps' main style.
36-
*/
37-
[Description("Hybrid")]
38-
BaseHybridRoad,
39-
/**
40-
* Road, boundary, and label data in Azure Maps' dark grey style.
41-
*/
42-
[Description("Hybrid (Dark Grey)")]
43-
BaseHybridDarkGrey,
44-
/**
45-
* A combination of satellite or aerial imagery. Only available for accounts
46-
* under S1 and G2 pricing SKU.
47-
*/
48-
Imagery,
49-
/**
50-
* Shaded relief and terra layers.
51-
*/
52-
Terra,
53-
/**
54-
* Weather radar tiles. Latest weather radar images including areas of rain,
55-
* snow, ice and mixed conditions.
56-
*/
57-
[Description("Weather (Radar)")]
58-
WeatherRadar ,
59-
/**
60-
* Weather infrared tiles. Latest infrared satellite images showing clouds by
61-
* their temperature.
62-
*/
63-
[Description("Weather (Infrared)")]
64-
WeatherInfrared ,
65-
/**
66-
* Absolute traffic tiles in Azure Maps' main style.
67-
*/
68-
[Description("Traffic (Absolute)")]
69-
TrafficAbsolute ,
70-
/**
71-
* Relative traffic tiles in Azure Maps' main style. This filters out traffic
72-
* data from smaller streets that are otherwise included in TrafficAbsolute.
73-
*/
74-
[Description("Traffic (Relative)")]
75-
TrafficRelativeMain ,
76-
/**
77-
* Relative traffic tiles in Azure Maps' dark style. This filters out traffic
78-
* data from smaller streets that are otherwise included in TrafficAbsolute.
79-
*/
80-
[Description("Traffic (Relative, Dark)")]
81-
TrafficRelativeDark ,
82-
/**
83-
* Delay traffic tiles in Azure Maps' dark style. This only shows the points
84-
* of delay along traffic routes that are otherwise included in
85-
* TrafficAbsolute.
86-
*/
87-
[Description("Traffic (Delay)")]
88-
TrafficDelay ,
89-
/**
90-
* Reduced traffic tiles in Azure Maps' dark style. This shows the traffic
91-
* routes and major delay points, but filters out some data that is otherwise
92-
* included in TrafficAbsolute.
93-
*/
94-
[Description("Traffic (Reduced)")]
95-
TrafficReduced ,
11+
/// <summary>
12+
/// All roadmap layers with Azure Maps' main style.
13+
/// </summary>
14+
BaseRoad,
15+
/// <summary>
16+
/// All roadmap layers with Azure Maps' dark grey style.
17+
/// </summary>
18+
BaseDarkGrey,
19+
/// <summary>
20+
/// Label data in Azure Maps' main style.
21+
/// </summary>
22+
BaseLabelsRoad,
23+
/// <summary>
24+
/// Label data in Azure Maps' dark grey style.
25+
/// </summary>
26+
BaseLabelsDarkGrey,
27+
/// <summary>
28+
/// Road, boundary, and label data in Azure Maps' main style.
29+
/// </summary>
30+
BaseHybridRoad,
31+
/// <summary>
32+
/// Road, boundary, and label data in Azure Maps' dark grey style.
33+
/// </summary>
34+
BaseHybridDarkGrey,
35+
/// <summary>
36+
/// A combination of satellite or aerial imagery. Only available for accounts
37+
/// under S1 and G2 pricing SKU.
38+
/// </summary>
39+
Imagery,
40+
/// <summary>
41+
/// Shaded relief and terra layers.
42+
/// </summary>
43+
Terra,
44+
/// <summary>
45+
/// Weather radar tiles. Latest weather radar images including areas of rain,
46+
/// snow, ice and mixed conditions.
47+
/// </summary>
48+
WeatherRadar,
49+
/// <summary>
50+
/// Weather infrared tiles. Latest infrared satellite images showing clouds by
51+
/// their temperature.
52+
/// </summary>
53+
WeatherInfrared,
54+
/// <summary>
55+
/// Absolute traffic tiles in Azure Maps' main style.
56+
/// </summary>
57+
TrafficAbsolute,
58+
/// <summary>
59+
/// Relative traffic tiles in Azure Maps' main style. This filters out traffic
60+
/// data from smaller streets that are otherwise included in TrafficAbsolute.
61+
/// </summary>
62+
TrafficRelativeMain,
63+
/// <summary>
64+
/// Relative traffic tiles in Azure Maps' dark style. This filters out traffic
65+
/// data from smaller streets that are otherwise included in TrafficAbsolute.
66+
/// </summary>
67+
TrafficRelativeDark,
68+
/// <summary>
69+
/// Delay traffic tiles in Azure Maps' dark style. This only shows the points
70+
/// of delay along traffic routes that are otherwise included in
71+
/// TrafficAbsolute.
72+
/// </summary>
73+
TrafficDelay,
74+
/// <summary>
75+
/// Reduced traffic tiles in Azure Maps' dark style. This shows the traffic
76+
/// routes and major delay points, but filters out some data that is otherwise
77+
/// included in TrafficAbsolute.
78+
/// </summary>
79+
TrafficReduced,
9680
}
9781

9882
/// <summary>
@@ -158,7 +142,7 @@ public AzureMapsTilesetId tilesetId
158142

159143
/// <summary>
160144
/// The language in which search results should be returned. This should be one
161-
/// of the supported IETF language tags, case insensitive. When data in the
145+
/// of the supported IETF language tags, case-insensitive. When data in the
162146
/// specified language is not available for a specific field, default language
163147
/// is used.
164148
/// </summary>

Runtime/CesiumRasterOverlay.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public long subTileCacheBytes
170170
/// </remarks>
171171
public void AddToTileset()
172172
{
173-
if (!isActiveAndEnabled)
173+
if (!this.isActiveAndEnabled)
174174
return;
175175

176176
Cesium3DTileset tileset = this.gameObject.GetComponent<Cesium3DTileset>();

native~/Runtime/src/CesiumAzureMapsRasterOverlayImpl.cpp

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "CesiumAzureMapsRasterOverlayImpl.h"
22

3-
#include "../../Editor/generated-Editor/include/DotNet/UnityEngine/Debug.h"
43
#include "Cesium3DTilesetImpl.h"
54
#include "CesiumRasterOverlayUtility.h"
65

@@ -22,37 +21,37 @@ namespace CesiumForUnityNative {
2221

2322
namespace {
2423
std::string
25-
getTilesetId(::DotNet::CesiumForUnity::AzureMapsTilesetId tilesetId) {
24+
getTilesetId(const CesiumForUnity::AzureMapsTilesetId tilesetId) {
2625
switch (tilesetId) {
27-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::BaseDarkGrey:
26+
case CesiumForUnity::AzureMapsTilesetId::BaseDarkGrey:
2827
return AzureMapsTilesetId::baseDarkGrey;
29-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::BaseLabelsRoad:
28+
case CesiumForUnity::AzureMapsTilesetId::BaseLabelsRoad:
3029
return AzureMapsTilesetId::baseLabelsRoad;
31-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::BaseLabelsDarkGrey:
30+
case CesiumForUnity::AzureMapsTilesetId::BaseLabelsDarkGrey:
3231
return AzureMapsTilesetId::baseLabelsDarkGrey;
33-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::BaseHybridRoad:
32+
case CesiumForUnity::AzureMapsTilesetId::BaseHybridRoad:
3433
return AzureMapsTilesetId::baseHybridRoad;
35-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::BaseHybridDarkGrey:
34+
case CesiumForUnity::AzureMapsTilesetId::BaseHybridDarkGrey:
3635
return AzureMapsTilesetId::baseHybridDarkGrey;
37-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::Imagery:
36+
case CesiumForUnity::AzureMapsTilesetId::Imagery:
3837
return AzureMapsTilesetId::imagery;
39-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::Terra:
38+
case CesiumForUnity::AzureMapsTilesetId::Terra:
4039
return AzureMapsTilesetId::terra;
41-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::WeatherRadar:
40+
case CesiumForUnity::AzureMapsTilesetId::WeatherRadar:
4241
return AzureMapsTilesetId::weatherRadar;
43-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::WeatherInfrared:
42+
case CesiumForUnity::AzureMapsTilesetId::WeatherInfrared:
4443
return AzureMapsTilesetId::weatherInfrared;
45-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::TrafficAbsolute:
44+
case CesiumForUnity::AzureMapsTilesetId::TrafficAbsolute:
4645
return AzureMapsTilesetId::trafficAbsolute;
47-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::TrafficRelativeMain:
46+
case CesiumForUnity::AzureMapsTilesetId::TrafficRelativeMain:
4847
return AzureMapsTilesetId::trafficRelativeMain;
49-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::TrafficRelativeDark:
48+
case CesiumForUnity::AzureMapsTilesetId::TrafficRelativeDark:
5049
return AzureMapsTilesetId::trafficRelativeDark;
51-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::TrafficDelay:
50+
case CesiumForUnity::AzureMapsTilesetId::TrafficDelay:
5251
return AzureMapsTilesetId::trafficDelay;
53-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::TrafficReduced:
52+
case CesiumForUnity::AzureMapsTilesetId::TrafficReduced:
5453
return AzureMapsTilesetId::trafficReduced;
55-
case ::DotNet::CesiumForUnity::AzureMapsTilesetId::BaseRoad:
54+
case CesiumForUnity::AzureMapsTilesetId::BaseRoad:
5655
default:
5756
return AzureMapsTilesetId::baseRoad;
5857
}
@@ -63,11 +62,11 @@ CesiumAzureMapsRasterOverlayImpl::CesiumAzureMapsRasterOverlayImpl(
6362
const DotNet::CesiumForUnity::CesiumAzureMapsRasterOverlay& overlay)
6463
: _pOverlay(nullptr) {}
6564

66-
CesiumAzureMapsRasterOverlayImpl::~CesiumAzureMapsRasterOverlayImpl() {}
65+
CesiumAzureMapsRasterOverlayImpl::~CesiumAzureMapsRasterOverlayImpl() = default;
6766

6867
void CesiumAzureMapsRasterOverlayImpl::AddToTileset(
69-
const ::DotNet::CesiumForUnity::CesiumAzureMapsRasterOverlay& overlay,
70-
const ::DotNet::CesiumForUnity::Cesium3DTileset& tileset) {
68+
const CesiumForUnity::CesiumAzureMapsRasterOverlay& overlay,
69+
const CesiumForUnity::Cesium3DTileset& tileset) {
7170

7271
if (this->_pOverlay) {
7372
// Overlay already added.
@@ -104,8 +103,8 @@ void CesiumAzureMapsRasterOverlayImpl::AddToTileset(
104103
}
105104

106105
void CesiumAzureMapsRasterOverlayImpl::RemoveFromTileset(
107-
const ::DotNet::CesiumForUnity::CesiumAzureMapsRasterOverlay& overlay,
108-
const ::DotNet::CesiumForUnity::Cesium3DTileset& tileset) {
106+
const CesiumForUnity::CesiumAzureMapsRasterOverlay& overlay,
107+
const CesiumForUnity::Cesium3DTileset& tileset) {
109108
if (this->_pOverlay == nullptr)
110109
return;
111110

@@ -120,4 +119,4 @@ void CesiumAzureMapsRasterOverlayImpl::RemoveFromTileset(
120119
this->_pOverlay = nullptr;
121120
}
122121

123-
} // namespace CesiumForUnityNative
122+
} // namespace CesiumForUnityNative

native~/Runtime/src/CesiumAzureMapsRasterOverlayImpl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Copyright 2020-2025 CesiumGS, Inc. and Contributors
21
#pragma once
32

43
#include "CesiumImpl.h"

0 commit comments

Comments
 (0)