Skip to content

Concepts

Kohei Otsuka edited this page Jul 24, 2026 · 1 revision

Concepts

Background on MaplatEditor: its role in the Maplat ecosystem, the data formats it produces, and how it relates to the other Maplat libraries.

Table of Contents


What MaplatEditor does

MaplatEditor is the desktop data-authoring tool for the Maplat viewer ecosystem. It is an Electron + Vite application that runs on Windows and macOS. Its job is to take a historical map image plus a set of ground control points (GCPs) and produce the data files the Maplat viewer consumes.

MaplatEditor is not published to npm (private: true in package.json). Binaries are distributed via GitHub Releases.

Data formats produced

MaplatEditor produces two main kinds of data:

  • Map data — placed under maps/{mapID}.json. Defines the coordinate correspondence between the historical image and the modern map (Web Mercator, SRID:3857). Can be either the human-editable standard format (with gcps) or the pre-computed compiled format (with compiled).
  • App data — placed under apps/{appID}.json. Aggregates multiple map sources, POI definitions, and app-level settings (home position, default zoom, fake GPS for testing, etc.).

For the schema details of these formats, see the Maplat Wiki Concepts page (MaplatEditor produces the same formats the viewer consumes).

Relationship to MaplatTin / MaplatTransform

MaplatEditor uses the Maplat coordinate-transform stack internally:

  • @maplat/tin — solves the TIN transform from the GCPs the user places.
  • @maplat/transform — preprocessing utilities for tile generation and compiled-data production.

When the user clicks "Save", MaplatEditor runs @maplat/tin's updateTin() on the GCP set, checks strict_status, and serializes the result via getCompiled() into the compiled map data file.

Relationship to the Maplat viewer

The data MaplatEditor produces is consumed by Maplat (@maplat/ui) and MaplatCore (@maplat/core). The viewer loads the app JSON, initializes the TIN transforms from the compiled map data, and renders the historical maps with the homeomorphic overlay guarantee.

This is the "end-to-end" of the Maplat ecosystem:

  1. Author with MaplatEditor (place GCPs, generate tiles, configure app)
  2. Serve the data files (static hosting, CDN, etc.)
  3. Render with @maplat/ui (or @maplat/core for custom integration)

OpenLayers bundling

Unlike @maplat/core and @maplat/ui, where OpenLayers is a peer dependency the user must install separately, MaplatEditor bundles OpenLayers (ol) as a regular dependency in its package.json. This is because MaplatEditor is an end-user desktop application — the user should not need to manage npm peer dependencies to use it.

For the same reason, MaplatEditor has no Peer Dependencies section in its README and no docs/api/ directory — it is a UI application, not a library with a public API surface.


日本語版はこちら / Read this page in Japanese

See Also

MaplatEditor

Language / 言語

Pages / ページ

English

日本語

API-Reference はありません(UI アプリのため)。ライブラリ API は MaplatCore Wiki / MaplatTin Wiki を参照。

External / 外部

Clone this wiki locally