cesium-native 0.45.0
Loading...
Searching...
No Matches
TileMapServiceRasterOverlay.h
1#pragma once
2
3#include <CesiumAsync/IAssetRequest.h>
4#include <CesiumGeometry/QuadtreeTilingScheme.h>
5#include <CesiumGeospatial/Ellipsoid.h>
6#include <CesiumGeospatial/GlobeRectangle.h>
7#include <CesiumGeospatial/Projection.h>
8#include <CesiumRasterOverlays/Library.h>
9#include <CesiumRasterOverlays/RasterOverlay.h>
10
11#include <functional>
12#include <memory>
13
14namespace CesiumRasterOverlays {
15
20
24 std::optional<std::string> fileExtension;
25
29 std::optional<std::string> credit;
30
38 std::optional<uint32_t> minimumLevel;
39
45 std::optional<uint32_t> maximumLevel;
46
51 std::optional<CesiumGeometry::Rectangle> coverageRectangle;
52
56 std::optional<CesiumGeospatial::Projection> projection;
57
62 std::optional<CesiumGeometry::QuadtreeTilingScheme> tilingScheme;
63
67 std::optional<uint32_t> tileWidth;
68
72 std::optional<uint32_t> tileHeight;
73
81 std::optional<bool> flipXY;
82};
83
87class CESIUMRASTEROVERLAYS_API TileMapServiceRasterOverlay final
88 : public RasterOverlay {
89public:
101 const std::string& name,
102 const std::string& url,
103 const std::vector<CesiumAsync::IAssetAccessor::THeader>& headers = {},
104 const TileMapServiceRasterOverlayOptions& tmsOptions = {},
105 const RasterOverlayOptions& overlayOptions = {});
106 virtual ~TileMapServiceRasterOverlay() override;
107
109 const CesiumAsync::AsyncSystem& asyncSystem,
110 const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
111 const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
112 const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
113 pPrepareRendererResources,
114 const std::shared_ptr<spdlog::logger>& pLogger,
116 const override;
117
118private:
119 std::string _url;
120 std::vector<CesiumAsync::IAssetAccessor::THeader> _headers;
122};
123
124} // 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 Promise.h:12
The base class for a rasterized image that can be draped over a Cesium3DTilesSelection::Tileset....
A RasterOverlay based on tile map service imagery.
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 Futu...
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< 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.