Interface IPickModule

interface IPickModule {
    actionDrawEdit: ((opts?) => Promise<{}>);
    actionDrawLineSting: ((opts?) => Promise<{
        data: PolylineItemData;
        isCancel?: boolean;
    }>);
    actionDrawPoint: ((opts?) => Promise<{
        data: SymbolItemData;
        isCancel?: boolean;
    }>);
    actionDrawPolygon: ((opts?) => Promise<{
        data: PolygonItemData;
        isCancel?: boolean;
    }>);
    actionPickSelect: ((opts?) => Promise<{
        info?: TLEventHandler;
        isCancel: boolean;
        select?: InteractiveObject;
    }>);
    drawSelectBox: ((style?) => Promise<{
        cancel: boolean;
        reason?: string;
    } | [Vector2, Vector2]>);
    getDrawLayer: ((layerName?, noCreateStyle?) => {
        addPointData: ((data, addToCommand?) => SymbolEntity);
        addPolygonData: ((data, addToCommand?) => PolygonsEntity);
        addPolylineData: ((data, addToCommand?) => PolylinesEntity);
        deletePointData: ((data, addToCommand?) => boolean);
        deletePolygonData: ((data, addToCommand?) => boolean);
        deletePolylineData: ((data, addToCommand?) => boolean);
        polygons: (() => PolygonsEntity);
        polylines: (() => PolylinesEntity);
        symbol: (() => SymbolEntity);
        updatePointData: ((data, addToCommand?) => boolean);
        updatePolygonData: ((data, addToCommand?) => boolean);
        updatePolylineData: ((data, addToCommand?) => boolean);
    });
    isFreeStatus: boolean;
    isFreeStatusRef: Ref<boolean>;
    pickEntity: ((opts?) => Promise<{
        cancel: boolean;
        clearHighlight: Function;
        entities: Entity[];
        reason?: string;
    }>);
    pickPoint: ((opts?) => Promise<{
        cancel: boolean;
        event?: InteractiveEvent;
        intersectObject?: any;
        point?: Vector3;
        reason?: string;
    }>);
}

Implemented by

Properties

actionDrawEdit: ((opts?) => Promise<{}>)

Type declaration

actionDrawLineSting: ((opts?) => Promise<{
    data: PolylineItemData;
    isCancel?: boolean;
}>)

绘制一条线,获取线坐标

Type declaration

actionDrawPoint: ((opts?) => Promise<{
    data: SymbolItemData;
    isCancel?: boolean;
}>)

绘制一个点,获取点坐标

Type declaration

actionDrawPolygon: ((opts?) => Promise<{
    data: PolygonItemData;
    isCancel?: boolean;
}>)

绘制一个多边形,获取多边形坐标

Type declaration

actionPickSelect: ((opts?) => Promise<{
    info?: TLEventHandler;
    isCancel: boolean;
    select?: InteractiveObject;
}>)

选中一个实体对象

Type declaration

drawSelectBox: ((style?) => Promise<{
    cancel: boolean;
    reason?: string;
} | [Vector2, Vector2]>)

绘制一个选择框

Type declaration

    • (style?): Promise<{
          cancel: boolean;
          reason?: string;
      } | [Vector2, Vector2]>
    • 绘制一个选择框

      Parameters

      • Optional style: Record<string, any>

      Returns Promise<{
          cancel: boolean;
          reason?: string;
      } | [Vector2, Vector2]>

getDrawLayer: ((layerName?, noCreateStyle?) => {
    addPointData: ((data, addToCommand?) => SymbolEntity);
    addPolygonData: ((data, addToCommand?) => PolygonsEntity);
    addPolylineData: ((data, addToCommand?) => PolylinesEntity);
    deletePointData: ((data, addToCommand?) => boolean);
    deletePolygonData: ((data, addToCommand?) => boolean);
    deletePolylineData: ((data, addToCommand?) => boolean);
    polygons: (() => PolygonsEntity);
    polylines: (() => PolylinesEntity);
    symbol: (() => SymbolEntity);
    updatePointData: ((data, addToCommand?) => boolean);
    updatePolygonData: ((data, addToCommand?) => boolean);
    updatePolylineData: ((data, addToCommand?) => boolean);
})

通过图层名称获取当前绘图层的实体

Type declaration

    • (layerName?, noCreateStyle?): {
          addPointData: ((data, addToCommand?) => SymbolEntity);
          addPolygonData: ((data, addToCommand?) => PolygonsEntity);
          addPolylineData: ((data, addToCommand?) => PolylinesEntity);
          deletePointData: ((data, addToCommand?) => boolean);
          deletePolygonData: ((data, addToCommand?) => boolean);
          deletePolylineData: ((data, addToCommand?) => boolean);
          polygons: (() => PolygonsEntity);
          polylines: (() => PolylinesEntity);
          symbol: (() => SymbolEntity);
          updatePointData: ((data, addToCommand?) => boolean);
          updatePolygonData: ((data, addToCommand?) => boolean);
          updatePolylineData: ((data, addToCommand?) => boolean);
      }
    • 通过图层名称获取当前绘图层的实体

      Parameters

      • Optional layerName: string
      • Optional noCreateStyle: Record<string, any>

      Returns {
          addPointData: ((data, addToCommand?) => SymbolEntity);
          addPolygonData: ((data, addToCommand?) => PolygonsEntity);
          addPolylineData: ((data, addToCommand?) => PolylinesEntity);
          deletePointData: ((data, addToCommand?) => boolean);
          deletePolygonData: ((data, addToCommand?) => boolean);
          deletePolylineData: ((data, addToCommand?) => boolean);
          polygons: (() => PolygonsEntity);
          polylines: (() => PolylinesEntity);
          symbol: (() => SymbolEntity);
          updatePointData: ((data, addToCommand?) => boolean);
          updatePolygonData: ((data, addToCommand?) => boolean);
          updatePolylineData: ((data, addToCommand?) => boolean);
      }

isFreeStatus: boolean

当前应该是否处于自由状态

isFreeStatusRef: Ref<boolean>

自由状态响应式对象

pickEntity: ((opts?) => Promise<{
    cancel: boolean;
    clearHighlight: Function;
    entities: Entity[];
    reason?: string;
}>)

拾取实体

Type declaration

    • (opts?): Promise<{
          cancel: boolean;
          clearHighlight: Function;
          entities: Entity[];
          reason?: string;
      }>
    • 拾取实体

      Parameters

      Returns Promise<{
          cancel: boolean;
          clearHighlight: Function;
          entities: Entity[];
          reason?: string;
      }>

pickPoint: ((opts?) => Promise<{
    cancel: boolean;
    event?: InteractiveEvent;
    intersectObject?: any;
    point?: Vector3;
    reason?: string;
}>)

拾取一个点

Type declaration

    • (opts?): Promise<{
          cancel: boolean;
          event?: InteractiveEvent;
          intersectObject?: any;
          point?: Vector3;
          reason?: string;
      }>
    • 拾取一个点

      Parameters

      Returns Promise<{
          cancel: boolean;
          event?: InteractiveEvent;
          intersectObject?: any;
          point?: Vector3;
          reason?: string;
      }>