Skip to content

YY. MultiPoint

多点覆盖物, 基于 YY. Overlay

creation

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

events

example

js
const markerFile9 = YY.Style.formatImage({
    markerFile: "./../../../../assets/icons/0009.png",
    markerDy: 40,
    markerHeight: 70,
});
// let style=YY.Style.formatGraphical( {markerWidth:50,markerHeight:30,markerType:'bar',markerFill:'red',markerLineColor:'white'});
let multiPoint = new YY.MultiPoint(
    [
        [120.6114, 31.27683],
        [120.6666, 31.23761],
        [120.57162, 31.21344],
    ],
    markerFile9, {
        name: "hello"
    }
);
vectorLayer.addOverlay(multiPoint);

method

getLngLats()

setLngLats(lnglats)

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

其他方法参考

YY. Overlay

This document is generated by vitepress and Edit by deyihu