MapControl.MapElements プロパティ

定義

MapControl の子である MapElement オブジェクトのコレクションを取得します。

public:
 property IVector<MapElement ^> ^ MapElements { IVector<MapElement ^> ^ get(); };
IVector<MapElement> MapElements();
public IList<MapElement> MapElements { get; }
var iVector = mapControl.mapElements;
Public ReadOnly Property MapElements As IList(Of MapElement)

プロパティ値

MapControl の子である MapElement オブジェクトのコレクション。

注釈

注意

Windows 10 Fall Creators Updateでは、MapElements コレクションに追加するのではなく、MapElementsLayer に MapElement オブジェクトを追加することをお勧めします。

MapControl にプッシュピン、画像、図形を表示するには、それらを MapElements コレクションに追加します。

  • MapIcon クラスを使用して、省略可能なテキストを含むプッシュピンなどの画像を表示します。 既定のイメージをそのまま使用するか、カスタム イメージを指定します。
  • MapPolygon または MapPolyline を定義して表示します。 または、 MapControl に XAML 要素を表示するには、それらを Children コレクションに追加します。

詳細については、「 2D ビュー、3D ビュー、および Streetside ビューを使用してマップを表示する」を参照してください。

適用対象

こちらもご覧ください