cesium-native  0.41.0
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 
14 namespace 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 
69  std::optional<CesiumGeospatial::Ellipsoid> ellipsoid = std::nullopt;
70 };
71 
75 class CESIUMRASTEROVERLAYS_API WebMapServiceRasterOverlay final
76  : public RasterOverlay {
77 public:
89  const std::string& name,
90  const std::string& url,
91  const std::vector<CesiumAsync::IAssetAccessor::THeader>& headers = {},
92  const WebMapServiceRasterOverlayOptions& wmsOptions = {},
93  const RasterOverlayOptions& overlayOptions = {});
94  virtual ~WebMapServiceRasterOverlay() override;
95 
97  const CesiumAsync::AsyncSystem& asyncSystem,
98  const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
99  const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
100  const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
101  pPrepareRendererResources,
102  const std::shared_ptr<spdlog::logger>& pLogger,
104  const override;
105 
106 private:
107  std::string _baseUrl;
108  std::vector<CesiumAsync::IAssetAccessor::THeader> _headers;
110 };
111 
112 } // 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 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.
std::optional< CesiumGeospatial::Ellipsoid > ellipsoid
The ellipsoid used for this overlay.
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.