npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

roadmap-fusion

v0.0.7

Published

A map fusion SDK providing unified RoadMap API for MapLibre, AMap, and 3D RenderStreaming

Downloads

250

Readme

RoadMap-Fusion

一个基于 Vite + TypeScript 的地图融合 SDK,用统一的 RoadMap API 整合:

  • MapLibre 二维地图与业务图层
  • AMap / BDMap / MapVThree / TianDiTu 等二维底图
  • 远端 3D RenderStreaming 场景
  • 2D / 3D / Fusion 三种运行模式

项目适合数字孪生、路网展示、二维三维联动演示等场景。

当前公开入口

SDK 对外入口是 src/index.ts,默认导出 RoadMap

主调用链:

RoadMap
  -> Fusion
    -> Core2D
    -> Core3D

说明:

  • src/mapFusion.ts 仍保留历史实现,但不是当前主入口。
  • 如果你在旧文档里看到 MapFusion,请以当前源码为准。

核心能力

  • 多二维底图适配:RoadMap / AMap / BDMap / MapVThree / TianDiTu
  • 2D / 3D 相机同步
  • Fusion 模式自动切换与分屏对比
  • 统一事件桥接
  • 实体、图层、工具类 API
  • API 调用日志回放与实体快照恢复

主要目录

  • src/index.ts:SDK 入口
  • src/Map.ts:公开主类 RoadMap
  • src/sync/:Fusion 编排、相机、provider 适配
  • src/core_2d/:二维地图核心
  • src/core_2d/sdk/:二维 API 实现层
  • src/core_3d/:三维推流与事件核心
  • src/api/:对外 API 门面层
  • demo2-static/:静态示例交付目录
  • memory/:给 AI 和维护者的项目记忆

开发命令

安装依赖:

yarn install

启动开发环境:

yarn dev

构建 demo:

yarn build

构建 SDK:

yarn build:sdk

预览静态 demo:

  • yarn preview:static
  • 该脚本当前使用 live-server 托管 demo2-static/
  • 如果你习惯用 VSCode Live Preview,本质上也是等价的静态 HTTP 预览方式

例如:

yarn preview:static

demo2-static

demo2-static/ 是当前最重要的静态示例和交付目录。

运行时配置位于:

  • demo2-static/app-config.js

主要配置项:

  • 天地图 token
  • 高德 key
  • 百度 AK
  • MapVThree AK
  • 3D 服务 host / port / scene

示例代码位于:

  • demo2-static/js/data/examples/

3D 运行前提

3D 和 Fusion 模式依赖可访问的远端流媒体服务,不是纯前端本地 Three 场景。

如果 3D 无法工作,优先检查:

  • host
  • port
  • scene
  • 对应 RenderStreaming / TURN 服务是否可用

给维护者和 AI

第一次进入仓库,推荐先看:

  1. memory/MEMORY_INDEX.md
  2. memory/MEMORY_PROJECT.md
  3. memory/MEMORY_ARCHITECTURE.md
  4. src/index.ts
  5. src/Map.ts
  6. src/sync/fusion.ts

如果要改 2D API,再看:

  • memory/MEMORY_2D_API.md