自畫圖層

Accessors

  • get enableShadow(): boolean
  • 是否顯示陰影,若 ov.TerrainView 關閉陰影則不會顯示

    Returns boolean

  • get name(): string
  • 圖層名稱

    Returns string

  • get show(): boolean
  • 是否顯示圖層。

    Returns boolean

Methods

  • 產生自畫正多邊形柱體圖素。

    Parameters

    Returns CustomBarEntity

    圖素物件。

    Example

    const param = {
    geo: new GeoPoint(121, 22, 100),
    color: new ov.Color("#FFFFFF"),
    size: 10.0,
    height: 10000.0,
    side: 6.0,
    absHeight: true,
    };
    const bar = customLayer.addBarEntity(param);
  • 產生自畫群集圖素。

    Parameters

    Returns CustomClusterEntity

    圖素物件。

    Example

    const label = {
    text: "文字",
    color: new ov.Color("#FFFFFF"),
    font: "微軟正黑體",
    size: 16,
    borderColor: new ov.Color("#000000"),
    borderSize: 3,
    };
    const children = [
    {geo, absHeight, ..., children:[]},
    //...參考param
    {geo, absHeight, ..., children:[]}
    ];
    const param = {
    geo: new GeoPoint(123, 25),
    absHeight: false,
    epsg: 4326,
    label,
    labelOffset: new GeoPoint(0, 0),
    symbol: "http://127.0.0.1/m1.png",
    size: 16,
    minDispHeight: 5000,
    maxDispHeight: 20000,
    displayLeafCount: true,
    attr: "點擊資訊",
    childrenCluster: false,
    childrenGridSize: 32,
    childrenMaxSize: 0,
    children,
    };
    const cluster = customLayer.addClusterEntity(param);
  • 產生自畫圓錐圖素。

    Parameters

    Returns CustomConeEntity

    圖素物件。

    Example

    const param = {
    geo = new GeoPoint(122.498026, 24.968293, 1000000),
    direction = new Geo3DPoint(1, 1, -1),
    distance = 4000000,
    radius = 1000000,
    color = new ov.Color("#FFE800"),
    opacity = 0.5,
    };
    const cone = customLayer.addConeEntity(param);
  • 產生自畫地表聚合線圖素。

    Parameters

    Returns CustomGroundPolylineEntity

    圖素物件。

    Example

    const param = {
    geo: new GeoPolyline([new GeoPoint(121, 22), new GeoPoint(122, 23)]),
    color: new ov.Color("#FF0000"),
    size: 4,
    opacity: 1.0,
    epsg: 4326,
    };
    const groundPolyline = customLayer.addGroundPolylineEntity(param);
  • 產生自畫洞圖素。

    Parameters

    Returns CustomHoleEntity

    圖素物件。

    Example

    const param = {
    geo: new GeoPolygon([new GeoPoint(121, 22), new GeoPoint(122, 23), new GeoPoint(122, 22)]),
    depth: 50,
    epsg: 4326
    };
    const hole = customLayer.addHoleEntity(param);
  • 產生自畫人手孔圖素。

    Parameters

    Returns CustomManholeEntity

    圖素物件。

    Example

    const param = {
    geo: new GeoPoint(121, 22), // 幾何
    color: new ov.Color("#FFFFFF"),
    image: "hole.png",
    width: 10.0,
    height: 0.0,
    depth: 10,
    bulge: 0.1,
    absHeight: true,
    };
    const manhole = customLayer.addManholeEntity(param);
  • 產生自畫管線圖素。

    Parameters

    Returns CustomPipelineEntity

    圖素物件。

    Example

    const param = {
    geo: new GeoPolyline([new GeoPoint(121, 22), new GeoPoint(122, 23), new GeoPoint(122, 22)]),
    color: new ov.Color("#FF0000"),
    width: 1.0,
    height: 0.0,
    absHeight: true,
    };
    const pipeline = customLayer.addPipelineEntity(param);
  • 產生自畫點圖素。

    Parameters

    Returns CustomPointEntity

    圖素物件。

    Example

    const param = {
    geo: new GeoPoint(122, 23, 300),
    color: new ov.Color("#FF0000"),
    opacity: 1.0,
    size: 32,
    epsg: 4326,
    absHeight: true,
    label: {
    color:new ov.Color("#00FF00"),
    text:"測試文字",
    font:"微軟正黑體",
    size:20,
    borderColor:new ov.Color("#000000"),
    borderSize:1
    }, // 加上文字Label
    symbol: "symbol.png"
    };
    const pointEntity = customLayer.addPointEntity(param);
  • 產生自畫多邊形柱體圖素。

    Parameters

    Returns CustomPolygonPrismEntity

    圖素物件。

    Example

    const param = {
    geo: new GeoPolygonSet(new GeoPolygon([new GeoPoint(121, 22), new GeoPoint(122, 23), new GeoPoint(122, 22)])),
    surfaceHeight: 500,
    height: 500,
    epsg: 4326,
    color: new ov.Color("#FF0000"),
    drawBorder: true,
    borderColor: new ov.Color("#FFFFFF"),
    };
    const polygonPrism = customLayer.addPolygonPrismEntity(param);
  • 產生自畫聚合線圖素。

    Parameters

    Returns CustomPolylineEntity

    圖素物件。

    Example

    const param = {
    geo = new GeoPolyline([new GeoPoint(121, 22, 100), new GeoPoint(122, 23, 100)]),
    color = new ov.Color("#FF0000"),
    size = 4,
    opacity = 1.0,
    epsg = 4326,
    dashScale = -1.0,
    };
    const polylineEntity = customLayer.addPolylineEntity(param);
  • 產生自畫Projector攝影機圖素。

    Parameters

    Returns CustomProjectorEntity

    圖素物件。

    Example

    const param = {
    ImageType: ov.PROJECTOR_IMAGE.NORMAL,
    SrcType: ov.PROJECTOR_SRC.VIDEO,
    VideoPath: "test.mp4",
    Pos: new GeoPoint(120.68, 24.12, 74.36),
    V: new Geo3DPoint(0.16, 0.94, -0.29),
    Up: new Geo3DPoint(0.05, 0.29, 0.95),
    VFov: 45,
    HFov: 65,
    Far: 1000,
    Near: 5,
    WallOpacity: 1,
    VideoOpacity: 1,
    MinPlaneHeight: 0,
    MinDisplayDistance: 0,
    MaxDisplayDistance: 0,
    ShowFovLine: true,
    FovLineColor: new ov.Color("#FF0000"),
    DistortionParamA: 0,
    DistortionParamB: 0,
    DistortionParamC: 0,
    DistortionScale: 1,
    ImgW: 512,
    ImgH: 512,
    CenterX: 0.5,
    CenterY: 0.5,
    FisheyeRadiusXRate: 0.5,
    FisheyeRadiusYRate: 0.5,
    };
    const projector = customLayer.addProjectorEntity(param);
  • 產生自畫圖釘圖素。

    Parameters

    Returns CustomPushpinEntity

    Example

    const param = {
    geo: new GeoPoint(1, 2, 3),
    color: new ov.Color("#FF0000"),
    text: "測試文字",
    font: "新細明體",
    size: 14,
    epsg: 4326,
    borderColor: new ov.Color("#000000"),
    borderSize: 4,
    pullUpY: 100,
    opacity: 1.0,
    symbol: "pin.png"
    };
    const pushpin = customLayer.addPushpinEntity(param);
  • 產生自畫球體圖素。

    Parameters

    Returns CustomSphereEntity

    圖素物件。

    Example

    const param = {
    geo: new GeoPoint(120.5, 23, 1000),
    color: new ov.Color("#FF0000"),
    opacity: 1,
    radius: 1,
    epsg: 4326,
    mode: "uv",
    sphereDetail: 30,
    lineMode: false,
    absHeight: true,
    };
    const sphere = customLayer.addSphereEntity(param);
  • 產生自畫表面圓圖素。

    Parameters

    Returns CustomSurfaceCircleEntity

    圖素物件。

    Example

    const param = {
    geo: new GeoPoint(120.5, 23),
    detail: 120,
    radius: 10,
    color: new ov.Color("#FF0000"),
    opacity: 1.0,
    epsg: 4326,
    };
    const circle = customLayer.addSurfaceCircleEntity(param);
  • 產生自畫表面多邊形圖素。

    Parameters

    Returns CustomSurfacePolygonSetEntity

    圖素物件。

    Example

    const param = {
    geo: new GeoPolygon([new GeoPoint(121, 22), new GeoPoint(122, 23), new GeoPoint(122, 22)]),
    color: new ov.Color("#FF0000"),
    opacity: 1.0,
    epsg: 4326,
    };
    const polygonSetEntity = customLayer.addSurfacePolygonSetEntity(param);
  • 產生自畫表面聚合線圖素。

    Parameters

    Returns CustomSurfacePolylineEntity

    圖素物件。

    Example

    const param = {
    geo: new GeoPolyline([new GeoPoint(121, 22), new GeoPoint(122, 23)]),
    color: new ov.Color("#FF0000"),
    size: 4,
    opacity: 1.0,
    epsg: 4326,
    };
    const surfacePolyline = customLayer.addSurfacePolylineEntity(param);
  • 產生自畫文字圖素。

    Parameters

    Returns CustomTextEntity

    圖素物件。

    Example

    const param = {
    geo = new GeoPoint(121, 22, 100),
    color = new ov.Color("#FFFFFF"),
    text = "測試文字",
    font = "新細明體",
    size = 14,
    borderColor = new ov.Color("#000000"),
    borderSize = 4,
    epsg = 4326
    };
    const text = customLayer.addTextEntity(param);
  • 產生自畫三角網格圖素。

    Parameters

    Returns CustomTriangleSetEntity

    圖素物件。

    Example

    const triA = [
    new GeoPoint(120.18, 22.99, 70),
    new GeoPoint(120.18, 22.99, 60),
    new GeoPoint(120.19, 22.99, 60)
    ];
    const triB = [
    new GeoPoint(120.19, 22.99, 60),
    new GeoPoint(120.19, 22.99, 70),
    new GeoPoint(120.18, 22.99, 70)
    ];
    const param = {
    geo: [triA, triB],
    drawLines: false,
    drawColor: new ov.Color("#FF0000"),
    fillColor: new ov.Color("#EBEBEB"),
    texture: "rock.jpg";
    fillOpacity: 1,
    drawOpacity: 1,
    epsg: 4326,
    triangleTp: [
    [new GeoPoint(0, 0), new GeoPoint(0, 1), new GeoPoint(1, 1)],
    [new GeoPoint(1, 1), new GeoPoint(1, 0), new GeoPoint(0, 0)]
    ];
    };
    const triangleSet = customLayer.addTriangleSetEntity(param);
  • 移除全部圖素。

    Returns boolean

    是否移除成功。

  • 移除圖素。

    Parameters

    • entity: number | CustomEntity

      欲刪除的圖素物件或索引。

    Returns boolean

    是否移除成功。

  • 設置自畫圖層深度測試的方式。

    Parameters

    Returns boolean

    是否設置成功。

  • 設置自畫圖層是否要在作圖時開啟深度測試。

    Parameters

    • depthTest: boolean

      是否開啟深度測試。

    Returns boolean

    是否設置成功。

  • 設置自畫圖層不透明程度。

    Parameters

    • opacity: number

      自畫圖層不透明程度(0~1)。

    Returns boolean

    是否設置成功。

Generated using TypeDoc