cesium-native 0.43.0
Loading...
Searching...
No Matches
WebMapTileServiceRasterOverlay.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#include <vector>
15
16namespace CesiumRasterOverlays {
17
22
28 std::optional<std::string> format;
29
36 std::vector<std::string> subdomains;
37
41 std::optional<std::string> credit;
42
46 std::string layer;
47
51 std::string style;
52
56 std::string tileMatrixSetID;
57
62 std::optional<std::vector<std::string>> tileMatrixLabels;
63
72 std::optional<uint32_t> minimumLevel;
73
79 std::optional<uint32_t> maximumLevel;
80
85 std::optional<CesiumGeometry::Rectangle> coverageRectangle;
86
90 std::optional<CesiumGeospatial::Projection> projection;
91
96 std::optional<CesiumGeometry::QuadtreeTilingScheme> tilingScheme;
97
101 std::optional<std::map<std::string, std::string>> dimensions;
102
108 std::optional<uint32_t> tileWidth;
109
115 std::optional<uint32_t> tileHeight;
116};
117
122class CESIUMRASTEROVERLAYS_API WebMapTileServiceRasterOverlay final
123 : public RasterOverlay {
124public:
136 const std::string& name,
137 const std::string& url,
138 const std::vector<CesiumAsync::IAssetAccessor::THeader>& headers = {},
139 const WebMapTileServiceRasterOverlayOptions& tmsOptions = {},
140 const RasterOverlayOptions& overlayOptions = {});
141 virtual ~WebMapTileServiceRasterOverlay() override;
142
144 const CesiumAsync::AsyncSystem& asyncSystem,
145 const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
146 const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
147 const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
148 pPrepareRendererResources,
149 const std::shared_ptr<spdlog::logger>& pLogger,
151 const override;
152
153private:
154 std::string _url;
155 std::vector<CesiumAsync::IAssetAccessor::THeader> _headers;
157};
158
159} // 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:11
The base class for a rasterized image that can be draped over a Cesium3DTilesSelection::Tileset....
A RasterOverlay accessing images from a Web Map Tile Service (WMTS) server.
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...
WebMapTileServiceRasterOverlay(const std::string &name, const std::string &url, const std::vector< CesiumAsync::IAssetAccessor::THeader > &headers={}, const WebMapTileServiceRasterOverlayOptions &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< uint32_t > minimumLevel
The minimum level-of-detail supported by the imagery provider.
std::optional< std::string > format
The MIME type for images to retrieve from the server.
std::optional< CesiumGeospatial::Projection > projection
The CesiumGeospatial::Projection that is used.
std::optional< std::vector< std::string > > tileMatrixLabels
A list of identifiers in the TileMatrix to use for WMTS requests, one per TileMatrix level.
std::vector< std::string > subdomains
The subdomains to use for the {s} placeholder in the URL template.
std::optional< std::string > credit
A credit for the data source, which is displayed on the canvas.
std::optional< uint32_t > tileWidth
Pixel width of image tiles.
std::optional< CesiumGeometry::Rectangle > coverageRectangle
The CesiumGeometry::Rectangle, in radians, covered by the image.
std::optional< uint32_t > maximumLevel
The maximum level-of-detail supported by the imagery provider.
std::optional< std::map< std::string, std::string > > dimensions
A object containing static dimensions and their values.
std::string tileMatrixSetID
The identifier of the TileMatrixSet to use for WMTS requests.
std::optional< uint32_t > tileHeight
Pixel height of image tiles.
std::optional< CesiumGeometry::QuadtreeTilingScheme > tilingScheme
The CesiumGeometry::QuadtreeTilingScheme specifying how the ellipsoidal surface is broken into tiles.