cesium-native 0.44.2
Loading...
Searching...
No Matches
CesiumRasterOverlays::UrlTemplateRasterOverlay Class Referencefinal

A RasterOverlay accessing images from a templated URL. More...

#include <CesiumRasterOverlays/UrlTemplateRasterOverlay.h>

Inheritance diagram for CesiumRasterOverlays::UrlTemplateRasterOverlay:
CesiumRasterOverlays::RasterOverlay CesiumUtility::ReferenceCounted< T, isThreadSafe >

Public Member Functions

 UrlTemplateRasterOverlay (const std::string &name, const std::string &url, const std::vector< CesiumAsync::IAssetAccessor::THeader > &headers={}, const UrlTemplateRasterOverlayOptions &urlTemplateOptions={}, const RasterOverlayOptions &overlayOptions={})
 Creates a new instance.
 
virtual CesiumAsync::Future< CreateTileProviderResultcreateTileProvider (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.
 
- 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.
 
RasterOverlayOptionsgetOptions () noexcept
 Gets options for this overlay.
 
const RasterOverlayOptionsgetOptions () const noexcept
 Gets options for this overlay.
 
const std::vector< CesiumUtility::Credit > & getCredits () const noexcept
 Gets the credits for this overlay.
 
std::vector< CesiumUtility::Credit > & getCredits () noexcept
 Gets the credits for this overlay.
 
CesiumUtility::IntrusivePointer< RasterOverlayTileProvidercreatePlaceholder (const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, 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, isThreadSafe >
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.
 

Detailed Description

A RasterOverlay accessing images from a templated URL.

Definition at line 79 of file UrlTemplateRasterOverlay.h.

Constructor & Destructor Documentation

◆ UrlTemplateRasterOverlay()

CesiumRasterOverlays::UrlTemplateRasterOverlay::UrlTemplateRasterOverlay ( const std::string & name,
const std::string & url,
const std::vector< CesiumAsync::IAssetAccessor::THeader > & headers = {},
const UrlTemplateRasterOverlayOptions & urlTemplateOptions = {},
const RasterOverlayOptions & overlayOptions = {} )
inline

Creates a new instance.

The following template parameters are supported in url:

  • {x} - The tile X coordinate in the tiling scheme, where 0 is the westernmost tile.
  • {y} - The tile Y coordinate in the tiling scheme, where 0 is the nothernmost tile.
  • {z} - The level of the tile in the tiling scheme, where 0 is the root of the quadtree pyramid.
  • {reverseX} - The tile X coordinate in the tiling scheme, where 0 is the easternmost tile.
  • {reverseY} - The tile Y coordinate in the tiling scheme, where 0 is the southernmost tile.
  • {reverseZ} - The tile Z coordinate in the tiling scheme, where 0 is equivalent to urlTemplateOptions.maximumLevel.
  • {westDegrees} - The western edge of the tile in geodetic degrees.
  • {southDegrees} - The southern edge of the tile in geodetic degrees.
  • {eastDegrees} - The eastern edge of the tile in geodetic degrees.
  • {northDegrees} - The northern edge of the tile in geodetic degrees.
  • {minimumX} - The minimum X coordinate of the tile's projected coordinates.
  • {minimumY} - The minimum Y coordinate of the tile's projected coordinates.
  • {maximumX} - The maximum X coordinate of the tile's projected coordinates.
  • {maximumY} - The maximum Y coordinate of the tile's projected coordinates.
  • {width} - The width of each tile in pixels.
  • {height} - The height of each tile in pixels.
Parameters
nameThe user-given name of this overlay layer.
urlThe URL with template parameters.
headersThe headers. This is a list of pairs of strings of the form (Key,Value) that will be inserted as request headers internally.
urlTemplateOptionsThe UrlTemplateRasterOverlayOptions.
overlayOptionsThe RasterOverlayOptions for this instance.

Definition at line 110 of file UrlTemplateRasterOverlay.h.

Member Function Documentation

◆ createTileProvider()

virtual CesiumAsync::Future< CreateTileProviderResult > CesiumRasterOverlays::UrlTemplateRasterOverlay::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
overridevirtual

Begins asynchronous creation of a tile provider for this overlay and eventually returns it via a Future.

Parameters
asyncSystemThe async system used to do work in threads.
pAssetAccessorThe interface used to download assets like overlay metadata and tiles.
pCreditSystemThe CesiumUtility::CreditSystem to use when creating a per-TileProvider CesiumUtility::Credit.
pPrepareRendererResourcesThe interface used to prepare raster images for rendering.
pLoggerThe logger to which to send messages about the tile provider and tiles.
pOwnerThe overlay that owns this overlay, or nullptr if this overlay is not aggregated.
Returns
The future that resolves to the tile provider when it is ready, or to error details in the case of an error.

Implements CesiumRasterOverlays::RasterOverlay.


The documentation for this class was generated from the following file: