|
cesium-native 0.52.0
|
A RasterOverlay based on tile map service imagery.
More...
#include <CesiumRasterOverlays/TileMapServiceRasterOverlay.h>
Public Member Functions | |
| TileMapServiceRasterOverlay (const std::string &name, const std::string &url, const std::vector< CesiumAsync::IAssetAccessor::THeader > &headers={}, const TileMapServiceRasterOverlayOptions &tmsOptions={}, const RasterOverlayOptions &overlayOptions={}) | |
| Creates a new instance. | |
| virtual CesiumAsync::Future< CreateTileProviderResult > | createTileProvider (const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const std::shared_ptr< CesiumUtility::CreditSystem > &pCreditSystem, const std::shared_ptr< IPrepareRasterOverlayRendererResources > &pPrepareRendererResources, const std::shared_ptr< spdlog::logger > &pLogger, CesiumUtility::IntrusivePointer< const RasterOverlay > pOwner) const override |
| Begins asynchronous creation of a tile provider for this overlay and eventually returns it via a Future. | |
| CesiumAsync::Future< void > | refreshTileProviderWithNewUrlAndHeaders (const CesiumUtility::IntrusivePointer< RasterOverlayTileProvider > &pProvider, const std::optional< std::string > &newUrl, const std::optional< std::vector< CesiumAsync::IAssetAccessor::THeader > > &newHeaders) |
| Refresh a previously-created tile provider using a new URL and request headers. This is primarily useful to refresh an access token after it expires. | |
Public Member Functions inherited from CesiumRasterOverlays::RasterOverlay | |
| RasterOverlay (const std::string &name, const RasterOverlayOptions &overlayOptions=RasterOverlayOptions()) | |
| Creates a new instance. | |
| CesiumAsync::SharedFuture< void > & | getAsyncDestructionCompleteEvent (const CesiumAsync::AsyncSystem &asyncSystem) |
| A future that resolves when this RasterOverlay has been destroyed (i.e. its destructor has been called) and all async operations that it was executing have completed. | |
| const std::string & | getName () const noexcept |
| Gets the name of this overlay. | |
| RasterOverlayOptions & | getOptions () noexcept |
| Gets options for this overlay. | |
| const RasterOverlayOptions & | getOptions () const noexcept |
| Gets options for this overlay. | |
| CesiumUtility::IntrusivePointer< ActivatedRasterOverlay > | activate (const RasterOverlayExternals &externals, const CesiumGeospatial::Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84) const |
| Activates this overlay. | |
| CesiumUtility::IntrusivePointer< RasterOverlayTileProvider > | createPlaceholder (const RasterOverlayExternals &externals, const CesiumGeospatial::Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84) const |
Create a placeholder tile provider can be used in place of the real one while createTileProvider completes asynchronously. | |
Public Member Functions inherited from CesiumUtility::ReferenceCounted< T, false > | |
| void | addReference () const |
Adds a counted reference to this object. Use CesiumUtility::IntrusivePointer instead of calling this method directly. | |
| void | releaseReference () const |
Removes a counted reference from this object. When the last reference is removed, this method will delete this instance. Use CesiumUtility::IntrusivePointer instead of calling this method directly. | |
| std::int32_t | getReferenceCount () const noexcept |
| Returns the current reference count of this instance. | |
| void | addReference () const |
Adds a counted reference to this object. Use CesiumUtility::IntrusivePointer instead of calling this method directly. | |
| void | releaseReference () const |
Removes a counted reference from this object. When the last reference is removed, this method will delete this instance. Use CesiumUtility::IntrusivePointer instead of calling this method directly. | |
| std::int32_t | getReferenceCount () const noexcept |
| Returns the current reference count of this instance. | |
Additional Inherited Members | |
Public Types inherited from CesiumRasterOverlays::RasterOverlay | |
| using | CreateTileProviderResult |
| A result from a call to createTileProvider. This is expected to be an IntrusivePointer to a RasterOverlayTileProvider, but may be a RasterOverlayLoadFailureDetails if creating the tile provider wasn't successful. | |
A RasterOverlay based on tile map service imagery.
Definition at line 87 of file TileMapServiceRasterOverlay.h.
| CesiumRasterOverlays::TileMapServiceRasterOverlay::TileMapServiceRasterOverlay | ( | const std::string & | name, |
| const std::string & | url, | ||
| const std::vector< CesiumAsync::IAssetAccessor::THeader > & | headers = {}, | ||
| const TileMapServiceRasterOverlayOptions & | tmsOptions = {}, | ||
| const RasterOverlayOptions & | overlayOptions = {} ) |
Creates a new instance.
| name | The user-given name of this overlay layer. |
| url | The base URL. |
| headers | The headers. This is a list of pairs of strings of the form (Key,Value) that will be inserted as request headers internally. |
| tmsOptions | The TileMapServiceRasterOverlayOptions. |
| overlayOptions | The RasterOverlayOptions for this instance. |
|
overridevirtual |
Begins asynchronous creation of a tile provider for this overlay and eventually returns it via a Future.
| asyncSystem | The async system used to do work in threads. |
| pAssetAccessor | The interface used to download assets like overlay metadata and tiles. |
| pCreditSystem | The CesiumUtility::CreditSystem to use when creating a per-TileProvider CesiumUtility::Credit. |
| pPrepareRendererResources | The interface used to prepare raster images for rendering. |
| pLogger | The logger to which to send messages about the tile provider and tiles. |
| pOwner | The overlay that owns this overlay, or nullptr if this overlay is not aggregated. |
Implements CesiumRasterOverlays::RasterOverlay.
| CesiumAsync::Future< void > CesiumRasterOverlays::TileMapServiceRasterOverlay::refreshTileProviderWithNewUrlAndHeaders | ( | const CesiumUtility::IntrusivePointer< RasterOverlayTileProvider > & | pProvider, |
| const std::optional< std::string > & | newUrl, | ||
| const std::optional< std::vector< CesiumAsync::IAssetAccessor::THeader > > & | newHeaders ) |
Refresh a previously-created tile provider using a new URL and request headers. This is primarily useful to refresh an access token after it expires.
Calling this method on a tile provider that was not created by this TileMapServiceRasterOverlay will lead to undefined behavior.
| pProvider | The previously-created tile provider. |
| newUrl | The new URL to use. If std::nullopt, the existing URL is unchanged. |
| newHeaders | The new request headers to use. If std::nullopt, the existing headers are unchanged. |