cesium-native 0.44.2
Loading...
Searching...
No Matches
IonRasterOverlay.h
1#pragma once
2
3#include <CesiumAsync/IAssetRequest.h>
4#include <CesiumGeospatial/Ellipsoid.h>
5#include <CesiumRasterOverlays/Library.h>
6#include <CesiumRasterOverlays/RasterOverlay.h>
7
8#include <functional>
9#include <memory>
10
11namespace CesiumRasterOverlays {
12
16class CESIUMRASTEROVERLAYS_API IonRasterOverlay final : public RasterOverlay {
17public:
33 const std::string& name,
34 int64_t ionAssetID,
35 const std::string& ionAccessToken,
36 const RasterOverlayOptions& overlayOptions = {},
37 const std::string& ionAssetEndpointUrl = "https://api.cesium.com/");
38 virtual ~IonRasterOverlay() override;
39
41 const CesiumAsync::AsyncSystem& asyncSystem,
42 const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
43 const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
44 const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
45 pPrepareRendererResources,
46 const std::shared_ptr<spdlog::logger>& pLogger,
48 const override;
49
50private:
51 int64_t _ionAssetID;
52 std::string _ionAccessToken;
53 std::string _ionAssetEndpointUrl;
54
55 struct AssetEndpointAttribution {
56 std::string html;
57 bool collapsible = true;
58 };
59
60 struct ExternalAssetEndpoint {
61 std::string externalType;
62 std::string url;
63 std::string mapStyle;
64 std::string key;
65 std::string culture;
66 std::string accessToken;
67 std::vector<AssetEndpointAttribution> attributions;
68 };
69
70 static std::unordered_map<std::string, ExternalAssetEndpoint> endpointCache;
71
73 const ExternalAssetEndpoint& endpoint,
74 const CesiumAsync::AsyncSystem& asyncSystem,
75 const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
76 const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
77 const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
78 pPrepareRendererResources,
79 const std::shared_ptr<spdlog::logger>& pLogger,
81};
82
83} // 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
A RasterOverlay that obtains imagery data from Cesium ion.
IonRasterOverlay(const std::string &name, int64_t ionAssetID, const std::string &ionAccessToken, const RasterOverlayOptions &overlayOptions={}, const std::string &ionAssetEndpointUrl="https://api.cesium.com/")
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...
The base class for a rasterized image that can be draped over a Cesium3DTilesSelection::Tileset....
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.
Options for loading raster overlays.