// Copyright 2020-2024 CesiumGS, Inc. and Contributors #include "CesiumWebMapServiceRasterOverlay.h" #include "Algo/Transform.h" #include "CesiumRasterOverlays/WebMapServiceRasterOverlay.h" #include "CesiumRuntime.h" std::unique_ptr UCesiumWebMapServiceRasterOverlay::CreateOverlay( const CesiumRasterOverlays::RasterOverlayOptions& options) { if (this->BaseUrl.IsEmpty()) { // Don't create an overlay with an empty base URL. return nullptr; } CesiumRasterOverlays::WebMapServiceRasterOverlayOptions wmsOptions; if (MaximumLevel > MinimumLevel) { wmsOptions.minimumLevel = MinimumLevel; wmsOptions.maximumLevel = MaximumLevel; } wmsOptions.layers = TCHAR_TO_UTF8(*Layers); wmsOptions.tileWidth = TileWidth; wmsOptions.tileHeight = TileHeight; return std::make_unique( TCHAR_TO_UTF8(*this->MaterialLayerKey), TCHAR_TO_UTF8(*this->BaseUrl), std::vector(), wmsOptions, options); }