cesium-native  0.41.0
TileMapServiceRasterOverlay.h
1 #pragma once
2 
3 #include "Library.h"
4 #include "RasterOverlay.h"
5 
6 #include <CesiumAsync/IAssetRequest.h>
7 #include <CesiumGeometry/QuadtreeTilingScheme.h>
8 #include <CesiumGeospatial/Ellipsoid.h>
9 #include <CesiumGeospatial/GlobeRectangle.h>
10 #include <CesiumGeospatial/Projection.h>
11 
12 #include <functional>
13 #include <memory>
14 
15 namespace CesiumRasterOverlays {
16 
21 
25  std::optional<std::string> fileExtension;
26 
30  std::optional<std::string> credit;
31 
39  std::optional<uint32_t> minimumLevel;
40 
46  std::optional<uint32_t> maximumLevel;
47 
52  std::optional<CesiumGeometry::Rectangle> coverageRectangle;
53 
57  std::optional<CesiumGeospatial::Projection> projection;
58 
63  std::optional<CesiumGeometry::QuadtreeTilingScheme> tilingScheme;
64 
72  std::optional<CesiumGeospatial::Ellipsoid> ellipsoid;
73 
77  std::optional<uint32_t> tileWidth;
78 
82  std::optional<uint32_t> tileHeight;
83 
91  std::optional<bool> flipXY;
92 };
93 
97 class CESIUMRASTEROVERLAYS_API TileMapServiceRasterOverlay final
98  : public RasterOverlay {
99 public:
111  const std::string& name,
112  const std::string& url,
113  const std::vector<CesiumAsync::IAssetAccessor::THeader>& headers = {},
114  const TileMapServiceRasterOverlayOptions& tmsOptions = {},
115  const RasterOverlayOptions& overlayOptions = {});
116  virtual ~TileMapServiceRasterOverlay() override;
117 
119  const CesiumAsync::AsyncSystem& asyncSystem,
120  const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
121  const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
122  const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
123  pPrepareRendererResources,
124  const std::shared_ptr<spdlog::logger>& pLogger,
126  const override;
127 
128 private:
129  std::string _url;
130  std::vector<CesiumAsync::IAssetAccessor::THeader> _headers;
132 };
133 
134 } // namespace CesiumRasterOverlays
A system for managing asynchronous requests and tasks.
Definition: AsyncSystem.h:36
A value that will be available in the future, as produced by AsyncSystem.
Definition: Future.h:29
The base class for a rasterized image that can be draped over a Tileset. The image may be very,...
A RasterOverlay based on tile map service imagery.
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 Futu...
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.
A smart pointer that calls addReference and releaseReference on the controlled object.
Classes for raster overlays, which allow draping massive 2D textures over a model.
std::optional< CesiumGeometry::Rectangle > coverageRectangle
The CesiumGeometry::Rectangle, in radians, covered by the image.
std::optional< CesiumGeometry::QuadtreeTilingScheme > tilingScheme
The CesiumGeometry::QuadtreeTilingScheme specifying how the ellipsoidal surface is broken into tiles.
std::optional< uint32_t > tileWidth
Pixel width of image tiles.
std::optional< CesiumGeospatial::Ellipsoid > ellipsoid
The CesiumGeospatial::Ellipsoid.
std::optional< std::string > fileExtension
The file extension for images on the server.
std::optional< bool > flipXY
An otion to flip the x- and y values of a tile map resource.
std::optional< std::string > credit
A credit for the data source, which is displayed on the canvas.
std::optional< uint32_t > maximumLevel
The maximum level-of-detail supported by the imagery provider.
std::optional< CesiumGeospatial::Projection > projection
The CesiumGeospatial::Projection that is used.
std::optional< uint32_t > minimumLevel
The minimum level-of-detail supported by the imagery provider.
std::optional< uint32_t > tileHeight
Pixel height of image tiles.