cesium-native 0.44.2
Loading...
Searching...
No Matches
WebMapServiceRasterOverlay.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 <memory>
12
13namespace CesiumRasterOverlays {
14
19
23 std::string version = "1.3.0";
24
28 std::string layers;
29
34 std::string format = "image/png";
35
39 std::optional<std::string> credit;
40
48 int32_t minimumLevel = 0;
49
53 int32_t maximumLevel = 14;
54
58 int32_t tileWidth = 256;
59
63 int32_t tileHeight = 256;
64};
65
69class CESIUMRASTEROVERLAYS_API WebMapServiceRasterOverlay final
70 : public RasterOverlay {
71public:
83 const std::string& name,
84 const std::string& url,
85 const std::vector<CesiumAsync::IAssetAccessor::THeader>& headers = {},
86 const WebMapServiceRasterOverlayOptions& wmsOptions = {},
87 const RasterOverlayOptions& overlayOptions = {});
88 virtual ~WebMapServiceRasterOverlay() override;
89
91 const CesiumAsync::AsyncSystem& asyncSystem,
92 const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
93 const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
94 const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
95 pPrepareRendererResources,
96 const std::shared_ptr<spdlog::logger>& pLogger,
98 const override;
99
100private:
101 std::string _baseUrl;
102 std::vector<CesiumAsync::IAssetAccessor::THeader> _headers;
104};
105
106} // 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 accessing images from a Web Map Service (WMS) 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...
WebMapServiceRasterOverlay(const std::string &name, const std::string &url, const std::vector< CesiumAsync::IAssetAccessor::THeader > &headers={}, const WebMapServiceRasterOverlayOptions &wmsOptions={}, 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::string version
The Web Map Service version. The default is "1.3.0".
std::string format
The image format to request, expressed as a MIME type to be given to the server. The default is "imag...
int32_t maximumLevel
The maximum level-of-detail supported by the imagery provider.
std::string layers
Comma separated Web Map Service layer names to request.
int32_t minimumLevel
The minimum level-of-detail supported by the imagery provider.
std::optional< std::string > credit
A credit for the data source, which is displayed on the canvas.