
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
语言 / Languages: 中文(默认) · English
在 vjmap 上叠加 CAD 级矢量绘图、标注与高性能特效图层(fx) 的前端扩展库。核心类 MapCadLayer 实现 vjmap 的 IControl,可作为地图控件挂载,提供实体、命令、捕捉、夹点、撤销、标注、动画、GPU 着色器特效与可选内置 UI(工具栏 / 属性 / 命令行)。
AnimationManager,支持补间、路径等效果。dist 内 .d.ts,具体以发布包为准)。vjmap.Map 等),再使用本库。vjmap 与 vjmapext(或已安装满足版本要求的 vjmap)。仅安装 vjmapext、未安装/未加载 vjmap 时无法正常工作。package.json 的 files 为准,一般为 dist 下的 vjmapext.min.js(UMD) 与类型声明;不包含 .map 源映射文件。npm install vjmap vjmapext
若已单独安装 vjmap,请保证其版本满足当前 vjmapext 版本的兼容范围(见发布说明或 peer 依赖约束)。
发布 dist 仅含 UMD 的 vjmapext.min.js(无 ESM 分包)。在打包工具中请使用 命名空间导入,例如:
import * as vjmapext from 'vjmapext';
const { MapCadLayer, setLocale } = vjmapext;
并配置好 vjmap 的解析(与 node_modules 中 vjmap 入口一致)。
<script> 引用在纯 HTML 或不经打包工具的场景下,请严格按顺序加载:先 vjmap,再 vjmapext(本库依赖 vjmap 提供的全局对象与地图实例)。
<link rel="stylesheet" href="./vjmap.min.css" />
<script src="./vjmap.min.js"></script>
<script src="./vjmapext.min.js"></script>
<script>
// 此时应已存在全局 vjmap;vjmapext 的导出挂在全局 vjmapext(与 dist UMD 一致)
// 先按 vjmap 文档创建 map、打开服务,再:
// const mapcadLayer = new vjmapext.MapCadLayer();
// map.addControl(mapcadLayer);
</script>
路径请按实际部署修改;切勿在 vjmap 未加载完成前执行依赖 vjmap 或 MapCadLayer 的代码。
import 'vjmap/dist/vjmap.min.css';
import vjmap from 'vjmap';
import { MapCadLayer, setLocale } from 'vjmapext';
// …创建 map、打开图纸或服务,await map.onLoad() 之后:
setLocale('zh'); // 或 'en'
const mapcad = new MapCadLayer();
map.addControl(mapcad);
mapcad.createUI({ theme: 'dark' }); // 可选:内置工具栏 / 属性面板 / 命令行
// 示例:添加实体(具体 API 以类型定义与文档为准)
// mapcad.store / mapcad.commandRegistry 等
产品介绍与架构说明见 vjmap 官方文档站点中的 vjmapext / MapCadLayer 章节。
高性能特效图层文档见 fx 专题(总览、快速开始、点/线预设、Shadertoy、CAD 绑定、性能调优等)。
本包以 LGPL-3.0 发布(见仓库内 LICENSE 或 npm 元数据)。
Back to 中文 (top)
vjmapext is a front-end extension for vjmap that adds CAD-style vector drawing, annotation, and a high-performance FX layer on top of the map. The core class MapCadLayer implements vjmap’s IControl interface, attaches as a map control, and provides entities, commands, object snaps, grips, undo/redo, dimensions, animation, GPU shader effects, and an optional built-in UI (toolbar / property panel / command line).
AnimationManager (tweens, paths, etc.).dist (subject to the published package layout).vjmap.Map instance) before using this library.vjmap and vjmapext (or ensure a compatible vjmap is already installed). Installing only vjmapext is not sufficient.npm install vjmap vjmapext
Ensure your vjmap version satisfies the compatibility range required by your vjmapext release.
The published dist contains vjmapext.min.js (UMD) only (no ESM split). Prefer a namespace import:
import * as vjmapext from 'vjmapext';
const { MapCadLayer, setLocale } = vjmapext;
Ensure vjmap resolves like your other node_modules dependencies.
<script> tags (UMD)Load scripts in order: vjmap first, then vjmapext. The library expects the global vjmap environment to exist first.
<link rel="stylesheet" href="./vjmap.min.css" />
<script src="./vjmap.min.js"></script>
<script src="./vjmapext.min.js"></script>
<script>
// Globals: vjmap, vjmapext (UMD bundle names as shipped in dist)
// Create the map per vjmap docs, then e.g. new vjmapext.MapCadLayer()
</script>
Adjust paths to your deployment. Do not load vjmapext before vjmap.
import 'vjmap/dist/vjmap.min.css';
import vjmap from 'vjmap';
import { MapCadLayer, setLocale } from 'vjmapext';
// …create the map, open your map service, after await map.onLoad():
setLocale('en'); // or 'zh'
const mapcad = new MapCadLayer();
map.addControl(mapcad);
mapcad.createUI({ theme: 'dark' }); // optional built-in UI
// Add entities / run commands via mapcad.store, mapcad.commandRegistry, etc.
See the official vjmap documentation for vjmapext / MapCadLayer.
See the FX documentation for the new GPU effect layer (overview, quick start, presets, Shadertoy, CAD binding, and performance tuning).
Playground : https://vjmap.com/app/demoext/#/gallery/map?lang=en
Published under LGPL-3.0 (see LICENSE in the repository or npm metadata).
FAQs
vjmapext
The npm package vjmapext receives a total of 2 weekly downloads. As such, vjmapext popularity was classified as not popular.
We found that vjmapext demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.