LoginSignup
0
0

More than 1 year has passed since last update.

【Harmoware-VIS】停留所アイコンを複数レイヤーで表示

Posted at

Harmoware-VIS とは

停留所アイコンを複数レイヤーで表示

Harmoware-VIS で停留所等を表示する DepotsLayer は、Harmoware-VISで停留所データが複数管理できないため、重複させることが出来ません。
その問題を解決するため、一つの停留所データ内で停留所の type を識別することで、 DepotsLayer 内で複数のアイコンレイヤーを重ねることが出来ます。

停留所データ(depotsBase)の type 定義の例

[ //停留所データの配列
    {"type": "station", //この停留所のtypeをstationと定義
        "position": [・・・・・・] //停留所位置データ
    },
    {"type": "busstop", //この停留所のtypeをbusstopと定義
        "position": [・・・・・・] //停留所位置データ
    },
]

DepotsLayer のコード例

new DepotsLayer({
    depotsData,
    iconDesignations:[ //ここでtype毎に使用するレイヤーを指定する。
        {type:'station', layer:'SimpleMesh'},
        {type:'busstop', layer:'Scatterplot'},],
})

上の例ではtype毎のレイヤー指定のみですが、色やサイズ、3Dアイコンデータなどもtype毎にプロパティ設定できます。

詳細はDepotsLayericonDesignations のリファレンスを参照してください。

typeの設定をしていないオブジェクトは DepotsLayer 全体へのプロパティ設定値を適用します。

0
0
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
0
0