Cesium for Unity 1.23.0
Loading...
Searching...
No Matches
CesiumGeoJsonDocumentRasterOverlay.cs
Go to the documentation of this file.
1using Reinterop;
2using System;
3using System.Collections.Generic;
4using UnityEngine;
5
6namespace CesiumForUnity
7{
30
36 [ReinteropNativeImplementation(
37 "CesiumForUnityNative::CesiumGeoJsonDocumentRasterOverlayImpl",
38 "CesiumGeoJsonDocumentRasterOverlayImpl.h")]
39 [AddComponentMenu("Cesium/Cesium GeoJSON Document Raster Overlay")]
40 [IconAttribute("Packages/com.cesium.unity/Editor/Resources/Cesium-24x24.png")]
42 {
43 [SerializeField]
46
51 {
52 get => this._source;
53 set
54 {
55 this._source = value;
56 this.Refresh();
57 }
58 }
59
60 [SerializeField]
61 private string _url = "";
62
70 public string url
71 {
72 get => this._url;
73 set
74 {
75 this._url = value;
76 this.Refresh();
77 }
78 }
79
80 [SerializeField]
81 private long _ionAssetID = 0;
82
90 public long ionAssetID
91 {
92 get => this._ionAssetID;
93 set
94 {
95 this._ionAssetID = value;
96 this.Refresh();
97 }
98 }
99
100 [SerializeField]
101 private string _ionAccessToken = "";
102
111 public string ionAccessToken
112 {
113 get => this._ionAccessToken;
114 set
115 {
116 this._ionAccessToken = value;
117 this.Refresh();
118 }
119 }
120
121 [SerializeField]
122 private CesiumIonServer _ionServer = null;
123
132 {
133 get
134 {
135 if (this._ionServer == null)
136 {
137 this._ionServer = CesiumIonServer.serverForNewObjects;
138 }
139 return this._ionServer;
140 }
141 set
142 {
143 if (value == null) value = CesiumIonServer.serverForNewObjects;
144 this._ionServer = value;
145 this.Refresh();
146 }
147 }
148
149 [SerializeField]
150 private int _mipLevels = 0;
151
160 public int mipLevels
161 {
162 get => this._mipLevels;
163 set
164 {
165 this._mipLevels = value;
166 this.Refresh();
167 }
168 }
169
170 [SerializeField]
171 private CesiumVectorStyle _defaultStyle = CesiumVectorStyle.Default;
172
181 {
182 get => this._defaultStyle;
183 set
184 {
185 this._defaultStyle = value;
186 this.Refresh();
187 }
188 }
189
190 private CesiumGeoJsonDocument _document = null;
191
202 {
203 get => this._document;
204 set
205 {
206 this._document = value;
207 this._source = CesiumGeoJsonDocumentRasterOverlaySource.FromDocument;
208 this.Refresh();
209 }
210 }
211
213 protected override partial void AddToTileset(Cesium3DTileset tileset);
214
216 protected override partial void RemoveFromTileset(Cesium3DTileset tileset);
217 }
218}
A tileset in the 3D Tiles format.
A raster overlay that rasterizes a GeoJSON document and drapes it over the tileset.
string url
The URL from which to load the GeoJSON document.
CesiumGeoJsonDocument document
Gets or sets the GeoJSON document used by this overlay.
override partial void AddToTileset(Cesium3DTileset tileset)
int mipLevels
The number of mip levels to generate for each tile of this raster overlay.
CesiumGeoJsonDocumentRasterOverlaySource source
The source from which to load the GeoJSON document.
CesiumVectorStyle defaultStyle
The default style to use for this raster overlay.
override partial void RemoveFromTileset(Cesium3DTileset tileset)
CesiumIonServer ionServer
The Cesium ion server from which this raster overlay is loaded.
string ionAccessToken
The access token to use to access the Cesium ion resource.
Represents a parsed GeoJSON document.
Defines a Cesium ion Server.
static CesiumIonServer serverForNewObjects
Gets the current Cesium ion server that should be assigned to newly-created objects.
A pyramid of 2D images - sometimes terabytes or more in size - that can be draped over a Cesium3DTile...
void Refresh()
Refreshes this overlay by calling RemoveFromTileset followed by AddToTileset.
@ FromCesiumIon
The dataset is from Cesium ion.
@ FromUrl
The dataset is from a regular web URL.
CesiumGeoJsonDocumentRasterOverlaySource
Configures where the CesiumGeoJsonDocumentRasterOverlay should load its GeoJSON data from.
@ FromDocument
The raster overlay will use a GeoJSON document that has been parsed and styled in code using CesiumGe...
Style information to use when drawing vector data.
static CesiumVectorStyle Default
Creates a default vector style.