package com.yj.earth.params; import com.yj.earth.annotation.SourceType; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.util.ArrayList; import java.util.List; @Data @Schema(description = "集结地对象") @SourceType("rendezvous") public class PolygonRendezvousObject { @Schema(description = "唯一标识") private String id; @Schema(description = "显示/隐藏", defaultValue = "true") private boolean show = true; @Schema(description = "名称") private String name; @Schema(description = "颜色", defaultValue = "rgba(255, 0, 0, 0.5)") private String color = "rgba(255, 0, 0, 0.5)"; @Schema(description = "高度") private double height; @Schema(description = "高度模式(0:海拔高度;1:相对地表;2:依附模式)", defaultValue = "2") private int heightMode = 2; @Schema(description = "面积单位", defaultValue = "平方米") private String areaUnit = "平方米"; @Schema(description = "边框") private Line line = new Line(); @Schema(description = "经纬度和高度的列表(必填)") private List positions = new ArrayList<>(); @Schema(description = "标签对象") private Label label = new Label(); @Schema(description = "属性内容") private Attribute attribute = new Attribute(); @Schema(description = "富文本内容") private String richTextContent; @Schema(description = "默认视角") private CustomView customView = new CustomView(); @Data @Schema(description = "边框属性") public static class Line { @Schema(description = "边框宽", defaultValue = "2") private double width = 2; @Schema(description = "边框颜色", defaultValue = "rgba(155, 155, 124, 0.89)") private String color = "rgba(155, 155, 124, 0.89)"; } @Data @Schema(description = "位置属性") public static class Position { @Schema(description = "经度") private double lng; @Schema(description = "纬度") private double lat; @Schema(description = "高度") private double alt; } @Data @Schema(description = "标签参数") public static class Label { @Schema(description = "标签文本") private String text; @Schema(description = "标签显隐") private Boolean show; @Schema(description = "标签位置") private Position position = new Position(); @Schema(description = "字体大小", defaultValue = "20") private int fontSize = 20; @Schema(description = "字体项 0:黑体;1:思源黑体;2:庞门正道标题体;3:数黑体", defaultValue = "0") private int fontFamily = 0; @Schema(description = "字体颜色", defaultValue = "#ffffff") private String color = "#ffffff"; @Schema(description = "引线宽", defaultValue = "4") private double lineWidth = 4; @Schema(description = "引线颜色", defaultValue = "#00ffff80") private String lineColor = "#00ffff80"; @Schema(description = "字体偏移(引线长度)", defaultValue = "20") private double pixelOffset = 20; @Schema(description = "背景颜色", defaultValue = "['#00ffff80', '#00ffff80']") private String[] backgroundColor = {"#00ffff80", "#00ffff80"}; @Schema(description = "距离缩放", defaultValue = "false") private boolean scaleByDistance = false; @Schema(description = "视野缩放最近距离", defaultValue = "2000") private int near = 2000; @Schema(description = "视野缩放最远距离", defaultValue = "100000") private int far = 100000; } @Data @Schema(description = "属性内容") public static class Attribute { @Schema(description = "链接", defaultValue = "{}") private Link link = new Link(); @Data @Schema(description = "链接属性") public static class Link { @Schema(description = "链接内容列表", defaultValue = "[]") private List content = new ArrayList<>(); @Data @Schema(description = "链接内容") public static class LinkContent { @Schema(description = "链接名称") private String name; @Schema(description = "链接地址") private String url; } } } @Data @Schema(description = "默认视角属性") public static class CustomView { @Schema(description = "默认视角方位") private Orientation orientation = new Orientation(); @Schema(description = "视角相对位置") private RelativePosition relativePosition = new RelativePosition(); @Data @Schema(description = "视角方位属性") public static class Orientation { @Schema(description = "航向角") private double heading; @Schema(description = "俯仰角") private double pitch; @Schema(description = "翻滚角") private double roll; } @Data @Schema(description = "视角相对位置属性") public static class RelativePosition { @Schema(description = "经度") private double lng; @Schema(description = "纬度") private double lat; @Schema(description = "高度") private double alt; } } }