@equinor/videx-map

中文文档
2.2.4发布于 2026/11/03MITTypeScriptESM + CJS构建来源已验证近 30 天下载 2597

Component for Pixi-overlay in Leaflet.

原始使用文档
文档目录12 节
  1. Installation
  2. Usage
  3. Wellbore Module
  4. Configurations
  5. Field Module
  6. Configurations
  7. Faultline Module
  8. GeoJSON Module
  9. Configurations
  10. Outline Module
  11. Contribution
  12. Quick start

npm version SCM Compliance

Videx map

A leaflet layer for visualizing wellbore related data.

Installation

npm install --save @equinor/videx-map

Usage

// ES6
import { WellboreModule, FaultlineModule, FieldModule, GeoJSONModule, OutlineModule } from '@equinor/videx-map';

Modules

Videx map is divided into various modules with specific purposes. These modules can be used individually or combined into a single WebGL context.

Wellbore Module

Module responsible for visualizing wellbores with roots and paths.

Configurations

  • scale - Relative scale of everything. (Default: 1.0)
  • labelScale - Scale of labels. (Default: 0.011)
  • labelBgOpacity - Opacity of label background. (Default: 0.5)
  • fontSize - Size of font. (Default: 18)
  • batchSize - Amount of wellbores per batch. (Default: 20)
  • zoomOrigin - Origin zoom level, i.e. where input for scaling function is 0. (Default: 0)
  • customEventHandler - Provide your custom event handler.
  • scaling - Zoom event handler.
  • gridSize - Grid size to control resolution of spatial indexing.
  • wellboreResize - Resize configurations of wellbores.
  • rootResize - Resize configurations of roots.
  • wellboreDash - Size of wellbore dash. (Default: 0.01)
  • tick - Object { width, height } for tick marks along wellbore lines.
  • onWellboreClick - Function to be called when a wellbore is selected.
  • onHighlightOn - Function to be called when wellbores are highlighted.
  • onHighlightOff - Function to be called when highlight is removed.
// Example configuration
const wellbores: WellboreModule = new WellboreModule({
  rootRadius: 0.3,
  scale: 1.5,
  labelBgOpacity: 0.2,
  zoomOrigin: 0,
  scaling: zoom => factors[zoom] || 0,
  rootResize: {
    base: 1.75,
    multiplier: 0.5,
    zoomReference: 12.0,
  },
  onHighlightOn: event => {
    // Special 'HighlightOn' logic ...
  },
  onHighlightOff: () => {
    // Special 'HighlightOff' logic ...
  },
  onWellboreClick: wellbore => {
    // Special 'WellboreClick' logic ...
  }
});

Field Module

Module responsible for visualizing oil and gas fields with filled polygons, outlines, and labels.

Configurations

  • initialHash - Initial scale of field hash pattern. (Default: 1.0)
  • minHash - Minimum scale of field hash pattern. (Default: 0.0)
  • maxHash - Maximum scale of field hash pattern. (Default: Infinity)
// Example configuration
const fields: FieldModule = new FieldModule({
  initialHash: 0.5,
  minHash: 0.1,
  maxHash: 2.0,
});

Faultline Module

Module responsible for visualizing faultlines on fields.

  • color - Color of faultline on format 0xRRGGBB. (Default: 0x727D88)
  • alpha - Alpha of faultlines. (Default: 1.0)
  • outlineWidth - Width of outline. (Default: 0.125)
// Example configuration
const faultlines: FaultlineModule = new FaultlineModule({
  color: 0xFF00FF,
  alpha: 0.75,
  outlineWidth: 0.13,
});

GeoJSON Module

Module responsible for visualizing arbitrary GeoJSON data, supporting Point, LineString, Polygon, and MultiPolygon geometry types.

Configurations

  • customEventHandler - Provide your custom event handler.
  • onFeatureHover - Function called when a feature is hovered.
  • outlineResize - Resize configuration for outlines.
  • labelResize - Resize configuration for labels.
// Example usage
const geojson: GeoJSONModule = new GeoJSONModule({
  onFeatureHover: (event, data) => {
    // Handle hover ...
  },
});

// Pass a GeoJSON FeatureCollection and an optional props mapper
geojson.set(featureCollection, feature => ({
  id: feature.properties.id,
  label: feature.properties.name,
  style: {
    lineColor: '#FF0000',
    lineWidth: 2,
    fillColor: '#00FF00',
    fillOpacity: 0.5,
  },
}));

Outline Module

Module responsible for visualizing field outlines.

  • zoomOrigin - Origin zoom level, i.e. where input for scaling function is 0. (Default: 0)
  • lineWidth - Width of line. (Default: 0.125)
  • scaling - Zoom event handler.
// Example configuration
const outlines: OutlineModule = new OutlineModule({
  zoomOrigin: 12,
  lineWidth: 0.1,
  scaling: zoom => (1.5 ** -zoom),
});

Contribution

We greatly appreciate contributions to this repository, see our contribution page on how to get started.

Quick start

$ git clone https://github.com/equinor/videx-map.git
$ npm install
$ npm start

Equinor Logo

版本与发布记录

@equinor/videx-map 共发布 118 个版本,首次发布于 2019/12/04;过去 12 个月发布了 25 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.2.4latest2026/11/0310 天前
2.2.32026/10/2717 天前
2.2.22026/10/2421 天前
2.2.12026/10/2024 天前
2.2.02026/10/131 个月前
2.1.172026/10/061 个月前

关于 @equinor/videx-map 的常见问题

@equinor/videx-map 是什么?

Component for Pixi-overlay in Leaflet.

如何安装 @equinor/videx-map?

在项目目录运行 npm install @equinor/videx-map,或使用 pnpm add / yarn add / bun add。

@equinor/videx-map 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@equinor/videx-map 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@equinor/videx-map 可以商用吗?

@equinor/videx-map 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@equinor/videx-map 的下载量有多少?

根据 npm 官方下载统计,@equinor/videx-map 在 2026/10/14 – 2026/11/12 这 30 天内被下载 2,597 次,日均约 87 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@equinor/videx-map 还在维护吗?

最新版本 2.2.4 发布于 2026/11/03(10 天前);至今共发布 118 个版本,其中过去 12 个月发布了 25 个;首次发布于 2019/12/04。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。