Skip to content

YY. Ellipse ​

覆盖物椭圆 基于 YY. Overlay

creation ​

  • constructor(lnglat, width, height, [style], [pro], [conf])
    • lnglat {Array||YY. LngLat}经纬度
    • width {Number} 宽度
    • height {Number} 高度
    • style {YY. Style} 样式
    • pro {Object} 附加属性值
    • conf {Object} 基本配置

events ​

example ​

demo

js
var ellipse = new YY.Ellipse([120, 31], 2000, 1000);
vectorLayer.addOverlay(ellipse);

var elli = new YY.Ellipse(
    [110, 33],
    50000,
    30000,
    YY.Style.formatFill({
        lineColor: "black"
    }), {
        // altitude : 400
    }
);

vectorLayer.addOverlay(elli);

method ​

getLngLat() ​

setLngLat(lnglat) ​

  • 设置经纬度
  • 参数
  • 返回值: this

getWidth() ​

  • 获取宽度
  • 返回值: Number

setWidth(width) ​

  • 设置宽度
  • 参数
    • {Number} width:
  • 返回值: this

getHeight() ​

  • 获取高度
  • 返回值: Number

setHeight(height) ​

  • 设置宽度
  • 参数
    • {Number} height:
  • 返回值: this

getShell() ​

hasHoles() ​

  • 是否有内环,有洞
  • 返回值: Boolean

getHoles() ​

其他方法参考 ​

YY. Overlay

This document is generated by vitepress and Edit by deyihu