cesium-native 0.43.0
Loading...
Searching...
No Matches
WebMapServiceRasterOverlay.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 <memory>
13
14namespace CesiumRasterOverlays {
15
20
24 std::string version = "1.3.0";
25
29 std::string layers;
30
35 std::string format = "image/png";
36
40 std::optional<std::string> credit;
41
49 int32_t minimumLevel = 0;
50
54 int32_t maximumLevel = 14;
55
59 int32_t tileWidth = 256;
60
64 int32_t tileHeight = 256;
65};
66
70class CESIUMRASTEROVERLAYS_API WebMapServiceRasterOverlay final
71 : public RasterOverlay {
72public:
84 const std::string& name,
85 const std::string& url,
86 const std::vector<CesiumAsync::IAssetAccessor::THeader>& headers = {},
87 const WebMapServiceRasterOverlayOptions& wmsOptions = {},
88 const RasterOverlayOptions& overlayOptions = {});
89 virtual ~WebMapServiceRasterOverlay() override;
90
92 const CesiumAsync::AsyncSystem& asyncSystem,
93 const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
94 const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
95 const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
96 pPrepareRendererResources,
97 const std::shared_ptr<spdlog::logger>& pLogger,
99 const override;
100
101private:
102 std::string _baseUrl;
103 std::vector<CesiumAsync::IAssetAccessor::THeader> _headers;
105};
106
107} // 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 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.