Angular 地理記号マップ
Angular マップ コンポーネントでは、IgxGeographicSymbolSeriesComponent を使用して、地理的コンテキストでポイントまたはマーカーを使用して地理空間データを表示できます。地理的シリーズのこのタイプは、都市、空港、地震または興味のあるポイントなどの地理的位置のコレクションを描画するためにしばしば使用されます。
Angular 地理記号マップの例
データ要件
マップコンポーネントの他の種類の地理的シリーズと同様に、IgxGeographicSymbolSeriesComponent には、オブジェクトの配列にバインドできる dataSource プロパティがあります。さらに、このオブジェクトの各データ項目は、地理的位置 (経度と緯度) を保存する 2 つの数値データ列を持つ必要があります。これらのデータ列は、latitudeMemberPath および longitudeMemberPath プロパティにマップされます。IgxGeographicSymbolSeriesComponent は、これらのマップされたデータ列の値を使用して、地理マップコンポーネントにシンボル要素をプロットします。
コード スニペット
以下のコードは、IgxShapefileRecord を使用してシェイプ ファイルからロードした都市の場所に IgxGeographicSymbolSeriesComponent をバインドする方法を示します。
<igx-geographic-map
#geoMap
height="100%"
width="100%"
zoomable="true">
<igx-geographic-symbol-series
#citiesSeries
[dataSource]="worldCities"
markerType="Circle"
latitudeMemberPath="y"
longitudeMemberPath="x"
markerBrush="White"
markerOutline="Gray">
</igx-geographic-symbol-series>
<igx-geographic-symbol-series
#capitalsSeries
[dataSource]="worldCapitals"
markerType="Circle"
latitudeMemberPath="y"
longitudeMemberPath="x"
markerBrush="White"
markerOutline="rgba(32, 146, 252, 1)">
</igx-geographic-symbol-series>
</igx-geographic-map>
API リファレンス
IgxGeographicSymbolSeriesComponent
IgxShapefileRecord