0
0

More than 1 year has passed since last update.

【Harmoware-VIS】移動体アイコンを複数レイヤーで表示

Posted at

Harmoware-VIS とは

移動体アイコンを複数レイヤーで表示

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

移動体データの type 定義の例

[ //移動体データの配列
    {"type": "train", //この移動体のtypeをtrainと定義
        "operation": [・・・・・・] //移動経路データ配列
    },
    {"type": "bus", //この移動体のtypeをbusと定義
        "operation": [・・・・・・] //移動経路データ配列
    },
    {"type": "walker", //この移動体のtypeをwalkerと定義
        "operation": [・・・・・・] //移動経路データ配列
    },・・・・・・
]

MovesLayer のコード例

new MovesLayer({
    routePaths, movedData, movesbase, clickedObject, actions,
    iconDesignations:[ //ここでtype毎に使用するレイヤーを指定する。
        {type:'train', layer:'SimpleMesh'},
        {type:'bus', layer:'Scenegraph'},
        {type:'walker', layer:'Scatterplot'},],
})

上の例ではtype毎のレイヤー指定のみですが、色やサイズ、3Dアイコンデータなどもtype毎にprops設定できます。
詳細はMovesLayerのリファレンスiconDesignations の項目を参照してください。

移動体データでtypeの設定をしていないオブジェクトは MovesLayer 全体へのprops設定値を適用します。

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