1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

パレットと屋内地図データ

Last updated at Posted at 2020-07-23

パレット

国連ベクトルタイルツールキットでベクトルタイルのスタイルを作るときに、私は style.json を直接書くこともしなければ、グラフィカルなツールも使いません。

HOCON でレイヤごとにスタイルを書いて include する形をとっています。

スタイルを書くときに煩雑になり、また手抜きの温床になりがちなのが色の指定です。色の指定にも include を使うことで、よく統制されたパレットを使いやすくなると思いました。

ディスプレイや紙と異なるのですから、ディスプレイに合わせて設計されたパレットを使うべきです。私は 2014 Material Design color palette を使うことが多いです。

Material Design color palette の Mapbox Style / HOCON 実装

スタイルの記述が、次のように実現できるようにします。

line-color: include "https://unvt.github.io/mat/orange-300"

その実装を https://github.com/unvt/mat に置きました。

屋内地図データのベクトルタイル化

屋内地図データのベクトルタイル化をたまたま手掛けていたので、上記のパレットを使用してみました。例えば、次のような形で記載しています。

id: drawing
type: line
source: v
source-layer: drawing
paint: {
  line-color: include "https://unvt.github.io/mat/blue-gray-300"
}

レポジトリは https://github.com/optgeo/technopolis で、テストサイトは https://optgeo.github.io/technopolis です。

上空にフロアの上下関係を表現しています。

上空に表現したフロアの上下関係

地上には、図面を素直に置いています。

地上に素直に置いた図面
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?