|
| 1 | +// Copyright 2020-2025 CesiumGS, Inc. and Contributors |
| 2 | + |
| 3 | +#pragma once |
| 4 | + |
| 5 | +#include "CesiumRasterOverlay.h" |
| 6 | +#include "CoreMinimal.h" |
| 7 | +#include "CesiumAzureMapsRasterOverlay.generated.h" |
| 8 | + |
| 9 | +/** |
| 10 | + * Supported values for the `TilesetId` property. |
| 11 | + */ |
| 12 | +UENUM(BlueprintType) |
| 13 | +enum class EAzureMapsTilesetId : uint8 { |
| 14 | + /** |
| 15 | + * @brief All layers with Azure Maps' main style. |
| 16 | + */ |
| 17 | + BaseRoad UMETA(DisplayName = "Base"), |
| 18 | + /** |
| 19 | + * @brief All layers with Azure Maps' dark grey style. |
| 20 | + */ |
| 21 | + BaseDarkGrey, |
| 22 | + /** |
| 23 | + * @brief Label data in Azure Maps' main style. |
| 24 | + */ |
| 25 | + BaseLabelsRoad, |
| 26 | + /** |
| 27 | + * @brief Label data in Azure Maps' dark grey style. |
| 28 | + */ |
| 29 | + BaseLabelsDarkGrey, |
| 30 | + /** |
| 31 | + * @brief A combination of satellite or aerial imagery. Only available in S1 |
| 32 | + * and G2 pricing SKU. |
| 33 | + */ |
| 34 | + Imagery, |
| 35 | + /** |
| 36 | + * @brief Shaded relief and terra layers. |
| 37 | + */ |
| 38 | + Terra, |
| 39 | +}; |
| 40 | + |
| 41 | +/** |
| 42 | + * A raster overlay that directly accesses Azure Maps. If you're using Azure |
| 43 | + * Maps via Cesium ion, use the "Cesium ion Raster Overlay" component instead. |
| 44 | + */ |
| 45 | +UCLASS(ClassGroup = Cesium, meta = (BlueprintSpawnableComponent)) |
| 46 | +class CESIUMRUNTIME_API UCesiumAzureMapsRasterOverlay |
| 47 | + : public UCesiumRasterOverlay { |
| 48 | + GENERATED_BODY() |
| 49 | + |
| 50 | +public: |
| 51 | + /** |
| 52 | + * The Azure Maps subscription key to use. |
| 53 | + */ |
| 54 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 55 | + FString Key; |
| 56 | + |
| 57 | + /** |
| 58 | + * The version number of Azure Maps API. |
| 59 | + */ |
| 60 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 61 | + FString ApiVersion = "2024-04-01"; |
| 62 | + |
| 63 | + /** |
| 64 | + * The tileset ID to use. |
| 65 | + */ |
| 66 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 67 | + EAzureMapsTilesetId TilesetId = EAzureMapsTilesetId::Imagery; |
| 68 | + |
| 69 | + /** |
| 70 | + * The language in which search results should be returned. This should be one |
| 71 | + * of the supported IETF language tags, case insensitive. When data in the |
| 72 | + * specified language is not available for a specific field, default language |
| 73 | + * is used. |
| 74 | + */ |
| 75 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 76 | + FString Language = "en-US"; |
| 77 | + |
| 78 | + /** |
| 79 | + * The View parameter (also called the "user region" parameter) allows |
| 80 | + * you to show the correct maps for a certain country/region for |
| 81 | + * geopolitically disputed regions. |
| 82 | + * |
| 83 | + * Different countries/regions have different views of such regions, and the |
| 84 | + * View parameter allows your application to comply with the view required by |
| 85 | + * the country/region your application will be serving. By default, the View |
| 86 | + * parameter is set to "Unified" even if you haven't defined it in the |
| 87 | + * request. It is your responsibility to determine the location of your users, |
| 88 | + * and then set the View parameter correctly for that location. Alternatively, |
| 89 | + * you have the option to set 'View=Auto', which will return the map data |
| 90 | + * based on the IP address of the request. The View parameter in Azure Maps |
| 91 | + * must be used in compliance with applicable laws, including those regarding |
| 92 | + * mapping, of the country/region where maps, images and other data and third |
| 93 | + * party content that you are authorized to access via Azure Maps is made |
| 94 | + * available. Example: view=IN. |
| 95 | + */ |
| 96 | + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") |
| 97 | + FString View = "US"; |
| 98 | + |
| 99 | +protected: |
| 100 | + virtual std::unique_ptr<CesiumRasterOverlays::RasterOverlay> CreateOverlay( |
| 101 | + const CesiumRasterOverlays::RasterOverlayOptions& options = {}) override; |
| 102 | +}; |
0 commit comments