cesium-native  0.41.0
BingMapsRasterOverlay.h
1 #pragma once
2 
3 #include "Library.h"
4 #include "RasterOverlay.h"
5 
6 #include <CesiumAsync/IAssetRequest.h>
7 #include <CesiumGeospatial/Ellipsoid.h>
8 
9 #include <functional>
10 #include <memory>
11 
12 namespace CesiumRasterOverlays {
13 
20 struct BingMapsStyle final {
24  static const std::string AERIAL;
25 
31  static const std::string AERIAL_WITH_LABELS;
32 
36  static const std::string AERIAL_WITH_LABELS_ON_DEMAND;
37 
43  static const std::string ROAD;
44 
48  static const std::string ROAD_ON_DEMAND;
49 
53  static const std::string CANVAS_DARK;
54 
58  static const std::string CANVAS_LIGHT;
59 
63  static const std::string CANVAS_GRAY;
64 
70  static const std::string ORDNANCE_SURVEY;
71 
75  static const std::string COLLINS_BART;
76 };
77 
82 class CESIUMRASTEROVERLAYS_API BingMapsRasterOverlay final
83  : public RasterOverlay {
84 public:
104  const std::string& name,
105  const std::string& url,
106  const std::string& key,
107  const std::string& mapStyle = BingMapsStyle::AERIAL,
108  const std::string& culture = "",
109  const CesiumGeospatial::Ellipsoid& ellipsoid =
111  const RasterOverlayOptions& overlayOptions = {});
112  virtual ~BingMapsRasterOverlay() override;
113 
115  const CesiumAsync::AsyncSystem& asyncSystem,
116  const std::shared_ptr<CesiumAsync::IAssetAccessor>& pAssetAccessor,
117  const std::shared_ptr<CesiumUtility::CreditSystem>& pCreditSystem,
118  const std::shared_ptr<IPrepareRasterOverlayRendererResources>&
119  pPrepareRendererResources,
120  const std::shared_ptr<spdlog::logger>& pLogger,
122  const override;
123 
124 private:
125  static const std::string BING_LOGO_HTML;
126 
127  std::string _url;
128  std::string _key;
129  std::string _mapStyle;
130  std::string _culture;
131  CesiumGeospatial::Ellipsoid _ellipsoid;
132 };
133 
134 } // 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
A quadratic surface defined in Cartesian coordinates.
Definition: Ellipsoid.h:38
static const Ellipsoid WGS84
An Ellipsoid instance initialized to the WGS84 standard.
Definition: Ellipsoid.h:47
A RasterOverlay that uses Bing Maps as the source for the imagery data.
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...
BingMapsRasterOverlay(const std::string &name, const std::string &url, const std::string &key, const std::string &mapStyle=BingMapsStyle::AERIAL, const std::string &culture="", const CesiumGeospatial::Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84, const RasterOverlayOptions &overlayOptions={})
Creates a new instance.
The base class for a rasterized image that can be draped over a Tileset. The image may be very,...
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.
Styles of Bing Maps overlays.
static const std::string ROAD
Roads without additional imagery.
static const std::string ORDNANCE_SURVEY
Ordnance Survey imagery.
static const std::string CANVAS_LIGHT
A lighter version of the road maps.
static const std::string CANVAS_GRAY
A grayscale version of the road maps.
static const std::string COLLINS_BART
Collins Bart imagery.
static const std::string AERIAL_WITH_LABELS
Aerial imagery with a road overlay.
static const std::string CANVAS_DARK
A dark version of the road maps.
static const std::string AERIAL
Aerial imagery.
static const std::string ROAD_ON_DEMAND
Roads without additional imagery.
static const std::string AERIAL_WITH_LABELS_ON_DEMAND
Aerial imagery with a road overlay.
Options for loading raster overlays.
Definition: RasterOverlay.h:35