-
-
Notifications
You must be signed in to change notification settings - Fork 3
FAQ
Frequently asked questions about MaplatTin.
- Can I use MaplatTin commercially?
- What is the difference between MaplatTin and MaplatCore?
- What license were past versions under?
- Does MaplatTin require OpenLayers?
- Can MaplatTin run on Node.js (server-side)?
- What happens when topology is broken?
- See Also
Yes. MaplatTin is licensed under Apache License 2.0, which permits commercial use, modification, and redistribution. The patent grant (Patent No. 6684776) is included. See the README License section for details.
MaplatCore (@maplat/core) is
the browser rendering library of the Maplat viewer. It uses MaplatTin
internally for the live coordinate transform, but wraps it with
OpenLayers rendering, the app-data protocol, POI/layer management, GPS, and
events.
MaplatTin (@maplat/tin) is the standalone coordinate-transform library only
— no rendering, no I/O. Use MaplatTin when you need pure transform math
(e.g. a Node.js preprocessing pipeline). Use MaplatCore when you are building
a viewer.
Versions before 0.14.2 were published under the "Maplat Limited License 1.1" (a restricted license). Starting from 0.14.2, MaplatTin has reverted to Apache License 2.0. Note that npmjs.com still shows the restricted license notation for past versions — this is an npm display limitation, not a current licensing issue. See known-discrepancies for details.
No. MaplatTin has no OpenLayers dependency. It is pure coordinate math.
This is intentional: MaplatTin can run in a pure Node.js context for offline preprocessing (e.g. as part of a MaplatTransform pipeline), without pulling in the browser-only OpenLayers bundle.
Yes. MaplatTin is designed to be isomorphic: the same package runs in the
browser (via UMD or ESM CDN) and in Node.js (via import).
Typical server-side use is batch preprocessing — read a GCP set, solve the TIN, and write the compiled state for later use by the viewer:
import Tin from '@maplat/tin';
import { readFileSync, writeFileSync } from 'node:fs';
const tin = new Tin({ wh: [2000, 1500] });
tin.setPoints(JSON.parse(readFileSync('gcps.json')));
tin.updateTin();
writeFileSync('compiled.json', JSON.stringify(tin.getCompiled()));When the control points cannot produce a topology-preserving TIN (typically
because they create folding triangles), MaplatTin's behavior depends on
strictMode:
-
"strict"—updateTin()throws an error. -
"auto"(default) — falls back to loose mode;strict_statusbecomesSTATUS_LOOSE. -
"loose"— always allows;strict_statusisSTATUS_LOOSE.
In STATUS_LOOSE, forward transforms still work, but inverse transforms may
not be unique. See Concepts § Strict and loose modes
for details.
日本語版はこちら / Read this page in Japanese
- Home
- Concepts — strict/loose modes and topology
- README
- MaplatCore Wiki — how MaplatCore uses MaplatTin
- MaplatTransform — preprocessing tools
- 🇬🇧 English (Home)
- 🇯🇵 日本語 (Home.ja)
English
日本語
- 📄 README / README.ja
- 📚 docs/api/ — API signatures
- 🗺️ Ecosystem Map(現在外部非公開)
- 🌐 Product site / 製品サイト
- 🏢 Nayuta, Inc. / コーポレートサイト