123456789101112131415161718192021222324252627282930313233343536 |
- #pragma once
- #include "CoreMinimal.h"
- #include "Kismet/BlueprintFunctionLibrary.h"
- #include "BFL_Coordinate.generated.h"
- UCLASS()
- class IOC_TEMPLATE_API UBFL_Coordinate : public UBlueprintFunctionLibrary
- {
- GENERATED_BODY()
-
- public:
-
- UFUNCTION(BlueprintCallable, Category = "Geo|Coordinate Conversion", meta = (Keywords = "GCJ02 WGS84"))
- static FVector2D GCJ02ToWGS84(double Longitude, double Latitude);
- UFUNCTION(BlueprintCallable, Category = "Color")
- static FColor HexToColor(FString HexString);
- UFUNCTION(BlueprintCallable, Category = "Color")
- static FString ColorToHex(FColor Color);
- private:
- static constexpr double a = 6378245.0;
- static constexpr double ee = 0.00669342162296594323;
- static bool IsOutOfChina(const FVector2D& Coord);
- static double TransformLatitude(double lng, double lat);
- static double TransformLongitude(double lng, double lat);
- };
|