11using Reinterop ;
22using System . Collections ;
33using System . Collections . Generic ;
4+ using System . ComponentModel ;
45using UnityEngine ;
56
67namespace CesiumForUnity
78{
89 /// <summary>
910 /// The available styles of the <see cref="CesiumAzureMapsRasterOverlay"/>.
1011 /// </summary>
11- public enum AzureMapsStyle
12+ public enum AzureMapsTilesetId
1213 {
13- Aerial ,
14- AerialWithLabelsOnDemand ,
15- RoadOnDemand ,
16- CanvasDark ,
17- CanvasLight ,
18- CanvasGray ,
19- OrdnanceSurvey ,
20- CollinsBart
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 ,
2196 }
2297
2398 /// <summary>
@@ -32,33 +107,99 @@ public enum AzureMapsStyle
32107 public partial class CesiumAzureMapsRasterOverlay : CesiumRasterOverlay
33108 {
34109 [ SerializeField ]
35- private string _azureMapsKey = "" ;
110+ private string _key = "" ;
36111
37112 /// <summary>
38- /// The Azure Maps API key to use.
113+ /// The Azure Maps subscription key to use. .
39114 /// </summary>
40- public string azureMapsKey
115+ public string key
41116 {
42- get => this . _azureMapsKey ;
117+ get => this . _key ;
43118 set
44119 {
45- this . _azureMapsKey = value ;
120+ this . _key = value ;
121+ this . Refresh ( ) ;
122+ }
123+ }
124+
125+ [ SerializeField ] private string _apiVersion = "2024-04-01" ;
126+
127+ /// <summary>
128+ /// The version number of Azure Maps API.
129+ /// </summary>
130+ public string apiVersion
131+ {
132+ get => this . _apiVersion ;
133+ set
134+ {
135+ this . _apiVersion = value ;
136+ this . Refresh ( ) ;
137+ }
138+ }
139+
140+ [ SerializeField ]
141+ private AzureMapsTilesetId _tilesetId = AzureMapsTilesetId . BaseRoad ;
142+
143+ /// <summary>
144+ /// The tileset ID to use.
145+ /// </summary>
146+ public AzureMapsTilesetId tilesetId
147+ {
148+ get => this . _tilesetId ;
149+ set
150+ {
151+ this . _tilesetId = value ;
152+ this . Refresh ( ) ;
153+ }
154+ }
155+
156+ [ SerializeField ]
157+ private string _language = "en-us" ;
158+
159+ /// <summary>
160+ /// 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
162+ /// specified language is not available for a specific field, default language
163+ /// is used.
164+ /// </summary>
165+ public string language
166+ {
167+ get => this . _language ;
168+ set
169+ {
170+ this . _language = value ;
46171 this . Refresh ( ) ;
47172 }
48173 }
49174
50175 [ SerializeField ]
51- private AzureMapsStyle _mapStyle = AzureMapsStyle . Aerial ;
176+ private string _view = "US" ;
52177
53178 /// <summary>
54- /// The map style to use.
179+ /// The View parameter (also called the "user region" parameter) allows
180+ /// you to show the correct maps for a certain country/region for
181+ /// geopolitically disputed regions.
55182 /// </summary>
56- public AzureMapsStyle mapStyle
183+ /// <remarks>
184+ /// Different countries/regions have different views of such regions, and the
185+ /// View parameter allows your application to comply with the view required by
186+ /// the country/region your application will be serving. By default, the View
187+ /// parameter is set to "Unified" even if you haven't defined it in the
188+ /// request. It is your responsibility to determine the location of your users,
189+ /// and then set the View parameter correctly for that location. Alternatively,
190+ /// you have the option to set 'View=Auto', which will return the map data
191+ /// based on the IP address of the request. The View parameter in Azure Maps
192+ /// must be used in compliance with applicable laws, including those regarding
193+ /// mapping, of the country/region where maps, images and other data and third
194+ /// party content that you are authorized to access via Azure Maps is made
195+ /// available. Example: view=IN.
196+ /// </remarks>
197+ public string view
57198 {
58- get => this . _mapStyle ;
199+ get => this . _view ;
59200 set
60201 {
61- this . _mapStyle = value ;
202+ this . _view = value ;
62203 this . Refresh ( ) ;
63204 }
64205 }
0 commit comments