Close
Angular React Web Components Blazor Web Components
Premium

Web Components 地理バブル マップ

Web Components マップ コンポーネントでは、GeographicProportionalSymbolSeries を使用して、アプリケーションのデータで指定された地理的位置にバブルまたは相対マーカーをプロットできます。このマップ シリーズは、百貨店、倉庫、オフィスなど、特定のビジネス ケースに応じたポイントをハイライト表示する場合に役立ちます。また、動的な車両追跡のためにフリート管理システムまたは GPS システムでこの地図シリーズを使用することができます。

Web Components 地理バブル マップの例

上記のデモは、GeographicProportionalSymbolSeries シリーズと、シリーズのデータ​​バインディングオプションを指定する方法を示しています。予定表連動マーカー選択は、マーカー競合回避ロジックと合わせて構成され、マーカー アウトラインと塗りつぶしの色も指定されます。

構成の概要

マップコントロールの他のタイプの散布シリーズと同様に、GeographicProportionalSymbolSeries シリーズには、オブジェクトの配列にバインドできる DataSource プロパティがあります。また、項目ソースの各項目は、地理経度および緯度を表す 2 つのデータ列があります。LongitudeMemberPathLatitudeMemberPath プロパティを使用してこのデータ列をマップします。RadiusScaleRadiusMemberPath は、バブルの半径を設定します。

以下の表に、データ バインドに使用される GeographicHighDensityScatterSeries シリーズのプロパティをまとめています。

プロパティ タイプ 概要
DataSource any 項目のソースを取得または設定します
LongitudeMemberPath string DataSource プロパティを使用して、割り当てられた商品の経度の値の場所を特定します。
LatitudeMemberPath string DataSource プロパティを使用して、割り当てられた商品の緯度値の場所を決定します。
RadiusMemberPath string シリーズの半径値を取得するために使用するパスを設定します。
RadiusScale SizeScale 現在のバブル シリーズの半径スケール プロパティを取得または設定します。
MinimumValue any 値のサブ範囲を計算するための最小値を設定します。
MaximumValue any 値のサブ範囲を計算するための最大値を設定します。

コード スニペット

<igc-geographic-map id="geoMap" width="100%" height="100%">

</igc-geographic-map>
import { IgcGeographicProportionalSymbolSeriesComponent } from 'igniteui-webcomponents-maps';
import { IgcValueBrushScaleComponent } from 'igniteui-webcomponents-charts';
import { IgcSizeScaleComponent } from 'igniteui-webcomponents-charts';
//...
connectedCallback() {
    this.geoMap = document.getElementById("geoMap") as IgcGeographicMapComponent;
    this.addSeriesWith(WorldLocations.getAll());
}

addSeriesWith(locations: any[])
{
    const sizeScale = new IgcSizeScaleComponent();
    sizeScale.minimumValue = 4;
    sizeScale.maximumValue = 60;

    const brushes = [
        "rgba(14, 194, 14, 0.4)",  // semi-transparent green
        "rgba(252, 170, 32, 0.4)", // semi-transparent orange
        "rgba(252, 32, 32, 0.4)",  // semi-transparent red
    ];

    const brushScale = new IgcValueBrushScaleComponent();
    brushScale.brushes = brushes;
    brushScale.minimumValue = 0;
    brushScale.maximumValue = 30;

    const symbolSeries = new IgcGeographicProportionalSymbolSeriesComponent ();
    symbolSeries.dataSource = locations;
    symbolSeries.markerType = MarkerType.Circle;
    symbolSeries.radiusScale = sizeScale;
    symbolSeries.fillScale = brushScale;
    symbolSeries.fillMemberPath = "pop";
    symbolSeries.radiusMemberPath = "pop";
    symbolSeries.latitudeMemberPath = "lat";
    symbolSeries.longitudeMemberPath = "lon";
    symbolSeries.markerOutline = "rgba(0,0,0,0.3)";

    this.geoMap.series.add(symbolSeries);
}

API リファレンス

GeographicProportionalSymbolSeries
RadiusScale