Class ImagePointGraphic

Hierarchy

  • baseGraphic
    • ImagePointGraphic

Constructors

  • Parameters

    • options: IimagePointOption

    Returns ImagePointGraphic

Properties

Proj: proj
option: IGraphicOption

Methods

  • Parameters

    • popupInfo: string
    • option: {
          offset: number[];
      } = ...
      • offset: number[]

    Returns void

  • Parameters

    • tooltipInfo: string
    • option: {
          offset: number[];
      } = ...
      • offset: number[]

    Returns void

  • Returns void

  • Parameters

    • projection: string = "3857"

    Returns any

  • Parameters

    • projection: string = "3857"

    Returns {
        attribute: {
            [x: string]: any;
        };
        dataWkID: string;
        lnglat: any;
        style: any;
        type: string;
    }

    • attribute: {
          [x: string]: any;
      }
      • [x: string]: any
    • dataWkID: string
    • lnglat: any
    • style: any
    • type: string
  • Returns boolean

  • Returns boolean

  • Parameters

    • Optional popupInfo: string | ITooltipInfo[]
    • Optional popupOption: {
          offset: number[];
      }
      • offset: number[]

    Returns void

  • Parameters

    • tooltipInfo: string
    • Optional tooltipOption: {
          offset: number[];
      }
      • offset: number[]

    Returns void

  • Parameters

    • attribute: any

    Returns void

  • 设置圆点样式

    Parameters

    • ImageStyleOption: IImageStyle = {}

    Returns void

    Example

    setCirclePointStyle({
    scale: 1, //比例
    radius: 5, //大小
    fill: {
    color: "rgba(255, 0, 0,1)", // 填充色
    },
    stroke: {
    color: "rgba(255, 255, 0,1)", // 边框色
    width: 1, //宽度

    },
    })
  • Parameters

    • lng: number
    • lat: number
    • dataWkID: crsType = crsType.EPSG4326

    Returns void

  • 设置填充简单模式样式 ,从图片模式转到普通模式时,需注意等图片加载完成后才可设置

    Parameters

    • color: string

    Returns void

    Example

    setFillColor("rgba(255, 255, 255,1)")//"#fff"
    
  • 设置多边形图片填充模式样式,初始设置时当pattern==null或undefined 且image有值才能生效

    Parameters

    • imageUrl: string

    Returns void

    Example

    setFillImageStyle(imageurl)
    
  • 设置多边形图案填充模式样式,pattern与image 二选一,不用的需undefined,同时配置优先pattern

    Parameters

    • fillStyleOption: IFillOption

    Returns void

    Example

    setFillPatternStyle({
    pattern: undefined,图案Enum:mirage2d.DataType.featureStyleType.caps
    // image: undefined,
    patternColor: "rgba(0, 0, 0,1)",//图案颜色
    fill: "rgba(255, 255, 0,1)",//背景色
    width: 2,
    lineDash: null,
    ratio: 1,
    offset: 0,
    scale: 1,
    size: 5,
    spacing: 10,
    angle: 0
    })
  • Parameters

    • imageOption: any

    Returns void

  • Parameters

    • angle: number

    Returns void

  • 平滑曲线

    Parameters

    • param: number = 5

      越大越平滑

    • isLine: boolean = true

    Returns void

  • 设置正方形样式

    Parameters

    • ImageStyleOption: IImageStyle = {}

    Returns void

    Example

    setSquarePointStyle({
    scale: 1, // 比例
    radius: 5, // 大小
    fill: {
    color: "rgba(255, 0, 0,1)", // 填充色
    },
    stroke: {
    color: "rgba(255, 255, 0,1)", // 边框色
    width: 1, //宽度

    },
    })
  • 设置五角星点样式

    Parameters

    • ImageStyleOption: IImageStyle = {}

    Returns void

    Example

    setStarPointStyle({
    scale: 1, //比例
    radius: 5, //大小
    fill: {
    color: "rgba(255, 0, 0,1)", // 填充色
    },
    stroke: {
    color: "rgba(255, 255, 0,1)", // 边框色
    width: 1, //宽度

    },
    })
  • 设置边框图案填充模式样式,pattern与image 二选一,不用的需undefined,同时配置优先pattern

    Parameters

    • strokeStyleOption: IStrokeOption

    Returns void

    Example

    setStrokePatternStyle({
    pattern: undefined,图案Enum:mirage2d.DataType.featureStyleType.caps
    // image: undefined,
    color: "rgba(255, 255, 0,1)",//背景色
    width: 2,
    lineDash: null,
    ratio: 1,
    patternColor: "rgba(0, 0, 0,1)",//图案颜色
    offset: 0,
    scale: 1,
    size: 5,
    spacing: 10,
    angle: 0
    })
  • 设置边框简单模式样式

    Parameters

    • strokeStyleOption: IStrokeOption

    Returns void

    Example

    setStrokeSimpleStyle({
    color: "rgba(255, 255, 255,1)", //"#fff",
    width: 2, //2,
    lineDash:[10,10] 或null
    })
  • 设置图形文字样式

    Parameters

    • textStyleOption: ITextOption

    Returns void

    Example

    setTextStyle({
    font: "14px Microsoft YaHei",
    text: "示例",
    fill: {
    color: "#8B4513", //"rgba(255, 255, 255, 1)",
    },
    stroke: {
    color: "rgba(255, 255, 255,1)", //"#fff",
    width: 2, //2,
    },
    backgroundFill: {
    color: "rgba(255, 255, 255, 0.0)", //"rgba(255, 255, 255, 1)",
    },
    backgroundStroke: {
    color: "rgba(0, 0, 0, 0.0)", //"#fff",
    width: 2,
    },
    padding: [3, 3, 3, 3],
    offsetX: 0,
    offsetY: -10,
    textBaseline: "bottom",
    })
  • 设置三角点样式

    Parameters

    • ImageStyleOption: IImageStyle = {}

    Returns void

    Example

    setTrianglePointStyle({
    scale: 1, //比例
    radius: 5, //大小
    fill: {
    color: "rgba(255, 0, 0,1)", // 填充色
    },
    stroke: {
    color: "rgba(255, 255, 0,1)", // 边框色
    width: 1, //宽度

    },
    })
  • Parameters

    • zindex: number

    Returns void

  • 平滑方法

    Parameters

    • coordinate: number[] | Coordinate[]

      坐标

    • param: number = 5

      参数

    • isLine: boolean = true

    Returns any

  • Returns Geometry

Generated using TypeDoc