#pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace CesiumRasterOverlays { /** * @brief A set of options for configuring a GeoJsonDocumentRasterOverlay. */ struct GeoJsonDocumentRasterOverlayOptions { /** * @brief The default style to use when no style is otherwise specified on a * \ref CesiumVectorData::GeoJsonObject. */ CesiumVectorData::VectorStyle defaultStyle; /** * @brief The ellipsoid to use for this overlay. */ CesiumGeospatial::Ellipsoid ellipsoid; /** * @brief The number of mip levels to generate. */ uint32_t mipLevels = 0; }; /** * @brief A raster overlay made from rasterizing a \ref * CesiumVectorData::GeoJsonDocument. */ class CESIUMRASTEROVERLAYS_API GeoJsonDocumentRasterOverlay final : public RasterOverlay { public: /** * @brief Creates a new GeoJsonDocumentRasterOverlay. * * @param asyncSystem The async system to use. * @param name The user-given name of this polygon layer. * @param document The GeoJSON document to use for the overlay. * @param vectorOverlayOptions Options to configure this * GeoJsonDocumentRasterOverlay. * @param overlayOptions Options to use for this RasterOverlay. */ GeoJsonDocumentRasterOverlay( const CesiumAsync::AsyncSystem& asyncSystem, const std::string& name, const std::shared_ptr& document, const GeoJsonDocumentRasterOverlayOptions& vectorOverlayOptions, const RasterOverlayOptions& overlayOptions = {}); /** * @brief Creates a new GeoJsonDocumentRasterOverlay from a future. * * @param name The user-given name of this polygon layer. * @param documentFuture A future resolving into a GeoJSON document to use for * the overlay. * @param vectorOverlayOptions Options to configure this * GeoJsonDocumentRasterOverlay. * @param overlayOptions Options to use for this RasterOverlay. */ GeoJsonDocumentRasterOverlay( const std::string& name, CesiumAsync::Future>&& documentFuture, const GeoJsonDocumentRasterOverlayOptions& vectorOverlayOptions, const RasterOverlayOptions& overlayOptions = {}); virtual ~GeoJsonDocumentRasterOverlay() override; virtual CesiumAsync::Future createTileProvider( const CreateRasterOverlayTileProviderParameters& parameters) const override; private: CesiumAsync::Future> _documentFuture; GeoJsonDocumentRasterOverlayOptions _options; }; } // namespace CesiumRasterOverlays