@maplat/ui 0.11.4 → 0.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +204 -0
- package/README.md +154 -76
- package/dist/index.d.ts +1 -0
- package/dist/maplat-ui.es.js +3692 -3667
- package/dist/maplat-ui.umd.js +215 -209
- package/dist/service-worker.js +3348 -0
- package/dist/ui_marker.d.ts +2 -2
- package/package.json +6 -6
- package/src/contextmenu/base.ts +3 -4
- package/src/contextmenu/helpers/mix.ts +5 -6
- package/src/contextmenu/html.ts +1 -1
- package/src/contextmenu/internal.ts +3 -3
- package/src/index.ts +9 -34
- package/src/maplat_control.ts +2 -2
- package/{less/maplat-specific.less → src/styles/maplat-specific.scss} +2 -0
- package/src/styles/ui.scss +7 -0
- package/src/ui_init.ts +145 -52
- package/src/ui_marker.ts +53 -17
- package/src/ui_utils.ts +6 -6
- package/less/bootstrap.less +0 -7010
- package/less/font-awesome.less +0 -51
- package/less/iziToast.less +0 -1733
- package/less/swiper4.css +0 -715
- package/less/ui.less +0 -11
- package/less/ui_packed.less +0 -11
- /package/{less/contextmenu.css → src/styles/contextmenu.scss} +0 -0
package/README.ja.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
[](https://github.com/code4history/Maplat/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@maplat/ui)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Maplat
|
|
9
|
+
Maplatは古地図/絵地図を歪める事なくGPSや正確な地図と連携させられるオープンソースプラットフォームです。
|
|
10
|
+
他のソリューションにない特徴として、各地図の座標変換において非線形かつ同相な投影変換が定義可能という点が挙げられます。
|
|
11
|
+
このプロジェクトは国土交通省主催の2018年ジオアクティビティコンテストにおいて、最優秀賞、教育効果賞、来場者賞をいただきました。
|
|
12
|
+
|
|
13
|
+
## 目次
|
|
14
|
+
- [Maplat](#maplat)
|
|
15
|
+
- [目次](#目次)
|
|
16
|
+
- [動作要件](#動作要件)
|
|
17
|
+
- [インストール](#インストール)
|
|
18
|
+
- [npm/pnpmでのインストール](#npmpnpmでのインストール)
|
|
19
|
+
- [Peer Dependencies (必要な外部依存)](#peer-dependencies-必要な外部依存)
|
|
20
|
+
- [ブラウザでのCDN利用](#ブラウザでのcdn利用)
|
|
21
|
+
- [利用方法](#利用方法)
|
|
22
|
+
- [ESM (EcmaScript Modules)](#esm-ecmascript-modules)
|
|
23
|
+
- [APIドキュメント](#apiドキュメント)
|
|
24
|
+
- [MaplatUi](#maplatui)
|
|
25
|
+
- [静的メソッド](#静的メソッド)
|
|
26
|
+
- [コンストラクタ](#コンストラクタ)
|
|
27
|
+
- [主なメソッド](#主なメソッド)
|
|
28
|
+
- [MaplatAppOption](#maplatappoption)
|
|
29
|
+
- [データ作成](#データ作成)
|
|
30
|
+
- [開発](#開発)
|
|
31
|
+
- [準備](#準備)
|
|
32
|
+
- [開発サーバー](#開発サーバー)
|
|
33
|
+
- [ビルド](#ビルド)
|
|
34
|
+
- [テスト](#テスト)
|
|
35
|
+
- [Contributors](#contributors)
|
|
36
|
+
- [Backers](#backers)
|
|
37
|
+
- [Sponsors](#sponsors)
|
|
38
|
+
|
|
39
|
+
## 動作要件
|
|
40
|
+
package.jsonの`engines`フィールドに基づきます。
|
|
41
|
+
|
|
42
|
+
- **Node.js**: v20, v22以上推奨 (GitHub Actionsでのテスト環境)
|
|
43
|
+
- **pnpm**: v9.0.0以上
|
|
44
|
+
|
|
45
|
+
## インストール
|
|
46
|
+
|
|
47
|
+
### npm/pnpmでのインストール
|
|
48
|
+
本プロジェクトではパッケージマネージャーとして **pnpm** を推奨しています。
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pnpm add @maplat/ui
|
|
52
|
+
```
|
|
53
|
+
または npm を使用する場合:
|
|
54
|
+
```bash
|
|
55
|
+
npm install @maplat/ui
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
#### Peer Dependencies (必要な外部依存)
|
|
59
|
+
Maplat UIは以下のライブラリに依存していますが、これらはPeer Dependenciesとして定義されているため、利用者が明示的にインストールする必要があります。
|
|
60
|
+
|
|
61
|
+
- **ol** (OpenLayers): v9.0.0 または v10.0.0 以上
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pnpm add ol
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
また、Vector Tileを使用する場合は、Mapbox GL JS または MapLibre GL JS が必要になる場合があります。
|
|
68
|
+
|
|
69
|
+
- mapbox-gl: ^1.0.0 || ^2.0.0 || ^3.0.0
|
|
70
|
+
- maplibre-gl: ^3.0.0 || ^4.0.0
|
|
71
|
+
|
|
72
|
+
### ブラウザでのCDN利用
|
|
73
|
+
|
|
74
|
+
バンドルされていない単体のビルドファイルも提供されています。ブラウザで直接利用する場合は、依存関係(OpenLayers)を先に読み込む必要があります。Maplat Coreはバンドルに含まれているため、個別の読み込みは不要です。
|
|
75
|
+
|
|
76
|
+
```html
|
|
77
|
+
<!-- OpenLayers -->
|
|
78
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@10/ol.min.css">
|
|
79
|
+
<script src="https://cdn.jsdelivr.net/npm/ol@10/dist/ol.min.js"></script>
|
|
80
|
+
|
|
81
|
+
<!-- Maplat UI -->
|
|
82
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@maplat/ui@0.11.5/dist/ui.css">
|
|
83
|
+
<script src="https://cdn.jsdelivr.net/npm/@maplat/ui@0.11.5/dist/maplat-ui.umd.js"></script>
|
|
84
|
+
|
|
85
|
+
<div id="map_div"></div>
|
|
86
|
+
<script>
|
|
87
|
+
var appOption = {
|
|
88
|
+
appid: "tm",
|
|
89
|
+
// ... options
|
|
90
|
+
};
|
|
91
|
+
MaplatUi.createObject(appOption).then(function(app) {
|
|
92
|
+
console.log("Maplat initialized");
|
|
93
|
+
});
|
|
94
|
+
</script>
|
|
95
|
+
```
|
|
96
|
+
※ バージョン番号は適宜最新のものに置き換えてください。
|
|
97
|
+
|
|
98
|
+
## 利用方法
|
|
99
|
+
|
|
100
|
+
### ESM (EcmaScript Modules)
|
|
101
|
+
```javascript
|
|
102
|
+
import { MaplatUi } from '@maplat/ui';
|
|
103
|
+
import '@maplat/ui/dist/ui.css'; // スタイルのインポート
|
|
104
|
+
|
|
105
|
+
const option = {
|
|
106
|
+
appid: 'myMark',
|
|
107
|
+
// ...
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
MaplatUi.createObject(option).then(app => {
|
|
111
|
+
// アプリケーション初期化完了
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## APIドキュメント
|
|
116
|
+
|
|
117
|
+
### MaplatUi
|
|
118
|
+
メインクラスです。
|
|
119
|
+
|
|
120
|
+
#### 静的メソッド
|
|
121
|
+
- **`createObject(option: MaplatAppOption): Promise<MaplatUi>`**
|
|
122
|
+
MaplatUiのインスタンスを作成し、初期化が完了するのを待ってから返します。推奨されるインスタンス化の方法です。
|
|
123
|
+
|
|
124
|
+
#### コンストラクタ
|
|
125
|
+
- **`new MaplatUi(option: MaplatAppOption)`**
|
|
126
|
+
インスタンスを作成しますが、初期化の完了は待ちません。`waitReady` プロパティで待機する必要があります。
|
|
127
|
+
|
|
128
|
+
#### 主なメソッド
|
|
129
|
+
- **`remove()`**: アプリケーションを破棄し、リソースを解放します。
|
|
130
|
+
- **`updateUrl()`**: 現在の状態に合わせてURLを更新します(`stateUrl`オプション有効時)。
|
|
131
|
+
|
|
132
|
+
### MaplatAppOption
|
|
133
|
+
初期化時に渡すオプションオブジェクトです(主なもの)。
|
|
134
|
+
|
|
135
|
+
| プロパティ | 型 | 説明 |
|
|
136
|
+
| ------------------ | ------------------- | -------------------------------------- |
|
|
137
|
+
| `appid` | `string` | アプリケーションID(必須に近い識別子) |
|
|
138
|
+
| `pwaManifest` | `boolean \| string` | PWAマニフェストの使用有無またはパス |
|
|
139
|
+
| `pwaWorker` | `string` | Service Workerのパス |
|
|
140
|
+
| `overlay` | `boolean` | オーバーレイモードの有効化 |
|
|
141
|
+
| `enableHideMarker` | `boolean` | マーカー非表示機能の有効化 |
|
|
142
|
+
| `enableMarkerList` | `boolean` | マーカーリスト機能の有効化 |
|
|
143
|
+
| `enableBorder` | `boolean` | 境界線表示機能の有効化 |
|
|
144
|
+
| `stateUrl` | `boolean` | URLによる状態管理の有効化 |
|
|
145
|
+
| `enableShare` | `boolean` | シェア機能の有効化 |
|
|
146
|
+
| `mapboxToken` | `string` | Mapbox利用時のアクセストークン |
|
|
147
|
+
|
|
148
|
+
## データ作成
|
|
149
|
+
データの作成には[MaplatEditor](https://github.com/code4history/MaplatEditor/)を利用してください。
|
|
150
|
+
|
|
151
|
+
## 開発
|
|
152
|
+
|
|
153
|
+
### 準備
|
|
154
|
+
リポジトリをクローンし、依存関係をインストールします。
|
|
155
|
+
```bash
|
|
156
|
+
git clone https://github.com/code4history/Maplat.git
|
|
157
|
+
cd Maplat
|
|
158
|
+
pnpm install
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### 開発サーバー
|
|
162
|
+
ホットリロード対応の開発サーバーを起動します。
|
|
163
|
+
```bash
|
|
164
|
+
pnpm dev
|
|
165
|
+
```
|
|
166
|
+
ブラウザで `http://localhost:5173/` にアクセスしてください。
|
|
167
|
+
|
|
168
|
+
### ビルド
|
|
169
|
+
```bash
|
|
170
|
+
pnpm build # npmパッケージのビルド (dist/)
|
|
171
|
+
pnpm build:demo # デモアプリのビルド (dist-demo/)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### テスト
|
|
175
|
+
```bash
|
|
176
|
+
pnpm test # テストの実行 (Vitest)
|
|
177
|
+
pnpm typecheck # 型チェック (TypeScript)
|
|
178
|
+
pnpm lint # リントとフォーマット (ESLint/Prettier)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Contributors
|
|
182
|
+
|
|
183
|
+
This project exists thanks to all the people who contribute. <!--[[Contribute](CONTRIBUTING.md)].-->
|
|
184
|
+
<a href="https://github.com/code4history/Maplat/graphs/contributors"><img src="https://opencollective.com/maplat/contributors.svg?width=890&button=false" /></a>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
## Backers
|
|
188
|
+
|
|
189
|
+
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/maplat#backer)]
|
|
190
|
+
|
|
191
|
+
<a href="https://opencollective.com/maplat#backers" target="_blank"><img src="https://opencollective.com/maplat/backers.svg?width=890"></a>
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
## Sponsors
|
|
195
|
+
Maplat is supported by
|
|
196
|
+
<a href="https://www.locazing.com/" target="_blank"><img src="https://code4history.github.io/Maplat/img/locazing.png" width="150"></a>
|
|
197
|
+
<a href="https://www.thedesignium.com/" target="_blank"><img src="https://code4history.github.io/Maplat/img/logo_TheDesignium.png" width="150"></a>
|
|
198
|
+
<a href="https://www.browserstack.com/" target="_blank"><img src="https://code4history.github.io/Maplat/img/browserstack-logo-600x315.png" width="150"></a>
|
|
199
|
+
<a href="https://zender.co.jp/" target="_blank"><img src="https://code4history.github.io/Maplat/img/Zender_logo_y_color.png" width="150"></a>
|
|
200
|
+
<a href="https://www.webimpact.co.jp/" target="_blank"><img src="https://code4history.github.io/Maplat/img/webimpact.jpg" width="150"></a>
|
|
201
|
+
|
|
202
|
+
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/maplat#sponsor)]
|
|
203
|
+
|
|
204
|
+
Copyright (c) 2024-2026 Code for History
|
package/README.md
CHANGED
|
@@ -1,102 +1,184 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* Maplat技術の特徴を知りたい方は、[技術紹介pdf](https://code4history.github.io/maplat_flyer_ja.pdf)へ
|
|
7
|
-
* Maplatライブラリの使い方を知りたい方は、[Qiitaの記事群](https://qiita.com/tags/maplat)へ
|
|
8
|
-
* 開発元であるCode for Historyの活動を知りたい方は、[Code for Historyのページ](https://code4history.github.io/index_ja.html)へ
|
|
3
|
+
[](https://github.com/code4history/Maplat/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@maplat/ui)
|
|
5
|
+
[](LICENSE)
|
|
9
6
|
|
|
7
|
+
# Maplat
|
|
10
8
|
Maplat is the cool Historical Map/Illustrated Map Viewer.
|
|
11
9
|
It can transform each map coordinates with nonlinear but homeomorphic projection and makes possible that the maps can collaborate with GPS/accurate maps, without distorting original maps.
|
|
12
10
|
Data editor of this solution is provided as another project, [MaplatEditor](https://github.com/code4history/MaplatEditor/).
|
|
13
11
|
This project won Grand Prize / Educational Effectiveness Prize / Visitors Selection Prize on Geo-Activity Contest 2018 held by Ministry of Land, Infrastructure, Transport and Tourism.
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
**[Read this document in Japanese / 日本語で読む](README.ja.md)**
|
|
14
|
+
|
|
15
|
+
## Table of Contents
|
|
16
|
+
- [Maplat](#maplat)
|
|
17
|
+
- [Table of Contents](#table-of-contents)
|
|
18
|
+
- [Prerequisites](#prerequisites)
|
|
19
|
+
- [Installation](#installation)
|
|
20
|
+
- [Using npm/pnpm](#using-npmpnpm)
|
|
21
|
+
- [Peer Dependencies](#peer-dependencies)
|
|
22
|
+
- [Using CDN in Browser](#using-cdn-in-browser)
|
|
23
|
+
- [Usage](#usage)
|
|
24
|
+
- [ESM (EcmaScript Modules)](#esm-ecmascript-modules)
|
|
25
|
+
- [API Documentation](#api-documentation)
|
|
26
|
+
- [MaplatUi](#maplatui)
|
|
27
|
+
- [Static Methods](#static-methods)
|
|
28
|
+
- [Constructor](#constructor)
|
|
29
|
+
- [Methods](#methods)
|
|
30
|
+
- [MaplatAppOption](#maplatappoption)
|
|
31
|
+
- [Data Editor](#data-editor)
|
|
32
|
+
- [Development](#development)
|
|
33
|
+
- [Setup](#setup)
|
|
34
|
+
- [Development Server](#development-server)
|
|
35
|
+
- [Build](#build)
|
|
36
|
+
- [Test](#test)
|
|
37
|
+
- [Contributors](#contributors)
|
|
38
|
+
- [Backers](#backers)
|
|
39
|
+
- [Sponsors](#sponsors)
|
|
18
40
|
|
|
19
|
-
|
|
20
|
-
|
|
41
|
+
## Prerequisites
|
|
42
|
+
Based on the `engines` field in `package.json`:
|
|
21
43
|
|
|
22
|
-
|
|
44
|
+
- **Node.js**: v20 or v22 (Recommended)
|
|
45
|
+
- **pnpm**: v9.0.0 or higher
|
|
23
46
|
|
|
24
|
-
|
|
25
|
-
<a href="https://www.slideshare.net/kokogiko/maplat"></a>
|
|
47
|
+
## Installation
|
|
26
48
|
|
|
27
|
-
|
|
28
|
-
|
|
49
|
+
### Using npm/pnpm
|
|
50
|
+
This project recommends **pnpm**.
|
|
29
51
|
|
|
30
|
-
|
|
52
|
+
```bash
|
|
53
|
+
pnpm add @maplat/ui
|
|
54
|
+
```
|
|
55
|
+
Or if you use npm:
|
|
56
|
+
```bash
|
|
57
|
+
npm install @maplat/ui
|
|
58
|
+
```
|
|
31
59
|
|
|
32
|
-
|
|
60
|
+
#### Peer Dependencies
|
|
61
|
+
Maplat UI depends on the following libraries as peer dependencies. You must install them manually.
|
|
33
62
|
|
|
34
|
-
|
|
35
|
-
- Node.js 20 or 22
|
|
36
|
-
- pnpm 9.0.0 or higher
|
|
63
|
+
- **ol** (OpenLayers): v9.0.0 or v10.0.0+
|
|
37
64
|
|
|
38
|
-
|
|
65
|
+
```bash
|
|
66
|
+
pnpm add ol
|
|
67
|
+
```
|
|
39
68
|
|
|
40
|
-
|
|
69
|
+
If you use Vector Tiles, you may also need Mapbox GL JS or MapLibre GL JS:
|
|
41
70
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
71
|
+
- mapbox-gl: ^1.0.0 || ^2.0.0 || ^3.0.0
|
|
72
|
+
- maplibre-gl: ^3.0.0 || ^4.0.0
|
|
73
|
+
|
|
74
|
+
### Using CDN in Browser
|
|
75
|
+
|
|
76
|
+
For usage directly in the browser without a bundler, you must load OpenLayers before loading Maplat UI. Maplat Core is bundled, so you do not need to load it separately.
|
|
77
|
+
|
|
78
|
+
```html
|
|
79
|
+
<!-- OpenLayers -->
|
|
80
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@10/ol.min.css">
|
|
81
|
+
<script src="https://cdn.jsdelivr.net/npm/ol@10/dist/ol.min.js"></script>
|
|
82
|
+
|
|
83
|
+
<!-- Maplat UI -->
|
|
84
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@maplat/ui@0.11.5/dist/ui.css">
|
|
85
|
+
<script src="https://cdn.jsdelivr.net/npm/@maplat/ui@0.11.5/dist/maplat-ui.umd.js"></script>
|
|
86
|
+
|
|
87
|
+
<div id="map_div"></div>
|
|
88
|
+
<script>
|
|
89
|
+
var appOption = {
|
|
90
|
+
appid: "tm",
|
|
91
|
+
// ... options
|
|
92
|
+
};
|
|
93
|
+
MaplatUi.createObject(appOption).then(function(app) {
|
|
94
|
+
console.log("Maplat initialized");
|
|
95
|
+
});
|
|
96
|
+
</script>
|
|
45
97
|
```
|
|
46
|
-
|
|
98
|
+
*Note: Make sure to use the latest compatible versions.*
|
|
47
99
|
|
|
48
|
-
|
|
100
|
+
## Usage
|
|
101
|
+
|
|
102
|
+
### ESM (EcmaScript Modules)
|
|
103
|
+
```javascript
|
|
104
|
+
import { MaplatUi } from '@maplat/ui';
|
|
105
|
+
import '@maplat/ui/dist/ui.css'; // Import styles
|
|
106
|
+
|
|
107
|
+
const option = {
|
|
108
|
+
appid: 'myMark',
|
|
109
|
+
// ...
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
MaplatUi.createObject(option).then(app => {
|
|
113
|
+
// Application initialized
|
|
114
|
+
});
|
|
115
|
+
```
|
|
49
116
|
|
|
117
|
+
## API Documentation
|
|
118
|
+
|
|
119
|
+
### MaplatUi
|
|
120
|
+
The main class.
|
|
121
|
+
|
|
122
|
+
#### Static Methods
|
|
123
|
+
- **`createObject(option: MaplatAppOption): Promise<MaplatUi>`**
|
|
124
|
+
Creates a MaplatUi instance and returns a Promise that resolves when initialization is complete. This is the recommended way to create an instance.
|
|
125
|
+
|
|
126
|
+
#### Constructor
|
|
127
|
+
- **`new MaplatUi(option: MaplatAppOption)`**
|
|
128
|
+
Creates an instance but does not wait for initialization. You should wait for the `waitReady` property.
|
|
129
|
+
|
|
130
|
+
#### Methods
|
|
131
|
+
- **`remove()`**: Destroys the application and releases resources.
|
|
132
|
+
- **`updateUrl()`**: Updates the URL to reflect current state (if `stateUrl` is enabled).
|
|
133
|
+
|
|
134
|
+
### MaplatAppOption
|
|
135
|
+
Key properties of the option object passed during initialization.
|
|
136
|
+
|
|
137
|
+
| Property | Type | Description |
|
|
138
|
+
| ------------------ | ------------------- | ----------------------------------- |
|
|
139
|
+
| `appid` | `string` | Application ID (Required) |
|
|
140
|
+
| `pwaManifest` | `boolean \| string` | Enable PWA manifest or specify path |
|
|
141
|
+
| `pwaWorker` | `string` | Service Worker path |
|
|
142
|
+
| `overlay` | `boolean` | Enable overlay mode |
|
|
143
|
+
| `enableHideMarker` | `boolean` | Enable marker hiding |
|
|
144
|
+
| `enableMarkerList` | `boolean` | Enable marker list |
|
|
145
|
+
| `enableBorder` | `boolean` | Enable border display |
|
|
146
|
+
| `stateUrl` | `boolean` | Enable URL state management |
|
|
147
|
+
| `enableShare` | `boolean` | Enable share feature |
|
|
148
|
+
| `mapboxToken` | `string` | Access token for Mapbox |
|
|
149
|
+
|
|
150
|
+
## Data Editor
|
|
151
|
+
Please use [MaplatEditor](https://github.com/code4history/MaplatEditor/) for data creation.
|
|
152
|
+
|
|
153
|
+
## Development
|
|
154
|
+
|
|
155
|
+
### Setup
|
|
156
|
+
Clone the repository and install dependencies.
|
|
50
157
|
```bash
|
|
51
|
-
|
|
52
|
-
|
|
158
|
+
git clone https://github.com/code4history/Maplat.git
|
|
159
|
+
cd Maplat
|
|
160
|
+
pnpm install
|
|
53
161
|
```
|
|
54
162
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
163
|
+
### Development Server
|
|
164
|
+
Start the development server with hot reload.
|
|
165
|
+
```bash
|
|
166
|
+
pnpm dev
|
|
167
|
+
```
|
|
168
|
+
Access `http://localhost:5173/` in your browser.
|
|
58
169
|
|
|
59
|
-
###
|
|
170
|
+
### Build
|
|
60
171
|
```bash
|
|
61
|
-
pnpm
|
|
62
|
-
pnpm
|
|
63
|
-
pnpm lint # Run linter and formatter
|
|
172
|
+
pnpm build # Build npm package (dist/)
|
|
173
|
+
pnpm build:demo # Build demo application (dist-demo/)
|
|
64
174
|
```
|
|
65
175
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
#
|
|
71
|
-
|
|
72
|
-
* https://s.maplat.jp/r/naramap/ (Maplat Nara)
|
|
73
|
-
* https://s.maplat.jp/r/aizumap/ (Maplat Aizuwakamatsu)
|
|
74
|
-
* https://s.maplat.jp/r/iwakimap/ (Maplat Iwaki)
|
|
75
|
-
* https://s.maplat.jp/r/tatebayashimap/ (Maplat Tatebayashi)
|
|
76
|
-
* https://s.maplat.jp/r/chuokumap/ (Maplat Tokyo Chuo-ku)
|
|
77
|
-
* https://s.maplat.jp/r/uedamap/ (Ueda city)
|
|
78
|
-
* https://s.maplat.jp/r/moriokamap/ (Morioka city)
|
|
79
|
-
* https://s.maplat.jp/r/sabaemap/ (Sabae city)
|
|
80
|
-
* https://s.maplat.jp/r/nobeokamap/ (Nobeoka city)
|
|
81
|
-
|
|
82
|
-
Documentation is undergoing.
|
|
83
|
-
|
|
84
|
-
最新の成果物は以下で確認できます。
|
|
85
|
-
* https://s.maplat.jp/r/naramap/ (ぷらっと奈良)
|
|
86
|
-
* https://s.maplat.jp/r/aizumap/ (ぷらっと会津若松)
|
|
87
|
-
* https://s.maplat.jp/r/iwakimap/ (ぷらっといわき)
|
|
88
|
-
* https://s.maplat.jp/r/tatebayashimap/ (ぷらっと館林)
|
|
89
|
-
* https://s.maplat.jp/r/chuokumap/ (ぷらっと東京中央区)
|
|
90
|
-
* https://s.maplat.jp/r/uedamap/ (上田市版)
|
|
91
|
-
* https://s.maplat.jp/r/moriokamap/ (盛岡市版)
|
|
92
|
-
* https://s.maplat.jp/r/sabaemap/ (鯖江市版)
|
|
93
|
-
* https://s.maplat.jp/r/nobeokamap/ (延岡市版)
|
|
94
|
-
|
|
95
|
-
成果物を他人がコンテンツ作れる形でまとめられていないですが、おいおい整理します。
|
|
96
|
-
|
|
97
|
-
# Collaboration demo with Jizo project
|
|
98
|
-
Code 4 NaraからUrban data challenge 2016に応募中のMaplatと[地蔵プロジェクト](https://github.com/code4history/JizoProject/wiki)をコラボレーションさせたデモを作りました。
|
|
99
|
-
* https://s.maplat.jp/r/narajizomap/
|
|
176
|
+
### Test
|
|
177
|
+
```bash
|
|
178
|
+
pnpm test # Run tests (Vitest)
|
|
179
|
+
pnpm typecheck # Run type checks (TypeScript)
|
|
180
|
+
pnpm lint # Run linter and formatter (ESLint/Prettier)
|
|
181
|
+
```
|
|
100
182
|
|
|
101
183
|
## Contributors
|
|
102
184
|
|
|
@@ -113,7 +195,6 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
|
|
|
113
195
|
|
|
114
196
|
## Sponsors
|
|
115
197
|
Maplat is supported by
|
|
116
|
-
<a href="https://www.jetbrains.com/" target="_blank"><img src="https://code4history.github.io/Maplat/img/jetbrains-variant-4.png" width="150"></a>
|
|
117
198
|
<a href="https://www.locazing.com/" target="_blank"><img src="https://code4history.github.io/Maplat/img/locazing.png" width="150"></a>
|
|
118
199
|
<a href="https://www.thedesignium.com/" target="_blank"><img src="https://code4history.github.io/Maplat/img/logo_TheDesignium.png" width="150"></a>
|
|
119
200
|
<a href="https://www.browserstack.com/" target="_blank"><img src="https://code4history.github.io/Maplat/img/browserstack-logo-600x315.png" width="150"></a>
|
|
@@ -122,7 +203,4 @@ Maplat is supported by
|
|
|
122
203
|
|
|
123
204
|
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/maplat#sponsor)]
|
|
124
205
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
206
|
+
Copyright (c) 2024-2026 Code for History
|
package/dist/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export declare class MaplatUi extends EventTarget {
|
|
|
44
44
|
lastClickPixel: Pixel | undefined;
|
|
45
45
|
lastClickCoordinate: Coordinate | undefined;
|
|
46
46
|
lastGPSError: string | undefined;
|
|
47
|
+
selectedMarkerNamespaceID: string | undefined;
|
|
47
48
|
constructor(appOption: MaplatAppOption);
|
|
48
49
|
initializer(appOption: any): Promise<void>;
|
|
49
50
|
handleMarkerAction(data: any): void;
|