Map 工具工厂

类型 / 参数 / 返回值 / 用法 · 右侧为本页导航

自定义 本库 API OL OpenLayers 融合 自定义与 OL 混用

Map 工具工厂

Map 方法 · 工具工厂

示例页:/advanced

addTrack(callback, options?)

const track = map.addTrack((index) => console.log('play', index), {
  lineColor: '#22c55e',
  list: [
    { gpsX: 13528400, gpsY: 3676400, uploadTime: '2024-01-01 10:00:00' },
    { gpsX: 13528500, gpsY: 3676500, uploadTime: '2024-01-01 10:05:00' }
  ]
});
track.play(0);

pipeInspection(callback, options)

const insp = map.pipeInspection((msg) => console.log(msg), {
  cloudLayerCodes: ['hydrant']
});

historyDispatch(options)

const hd = map.historyDispatch({ layerCodes: ['vehicle'] });
hd.play(0);

pipeProfile(callback, options)

const profile = map.pipeProfile((data) => console.log(data), {
  pipeLayerCode: 'pipe',
  flowLayerCode: 'flow'
});