MapElement.MapStyleSheetEntry 속성

정의

MapElement에 적용하려는 맵 스타일시트의 항목 이름을 가져오거나 설정합니다.

public:
 property Platform::String ^ MapStyleSheetEntry { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring MapStyleSheetEntry();

void MapStyleSheetEntry(winrt::hstring value);
public string MapStyleSheetEntry { get; set; }
var string = mapElement.mapStyleSheetEntry;
mapElement.mapStyleSheetEntry = string;
Public Property MapStyleSheetEntry As String

속성 값

String

Platform::String

winrt::hstring

MapElement에 적용하려는 지도 스타일시트의 항목 이름입니다. 이 이름은 해당 형식의 기존 기본 맵 요소처럼 작동하는 기존 지도 요소(설명 참조)일 수 있습니다. 또는 이름은 기본 맵에서 사용되지 않지만 스타일시트 작성자가 설정하며 기본 맵에 영향을 주지 않고 변경할 수 있는 확장일 수 있습니다(예제 코드 참조).

Windows 요구 사항

디바이스 패밀리
Windows 10 Fall Creators Update (10.0.16299.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v5.0에서 도입되었습니다.)

예제

string myStyleSheetJson = @"{""version"": ""1.*"",
  ""elements"":{
    ""foodPoint"":{
      ""iconColor"":""#FF000000""}},
  ""extensions"":{
    ""myNamespace"":{
      ""myFoodPoint"":{
        ""parent"":""foodPoint"",
        ""scale"":2}}}}";

myMap.StyleSheet = MapStyleSheet.ParseFromJson(myStyleSheetJson);
myMap.MapElements.Add(new MapIcon
{
  Location = new Geopoint(new BasicGeoposition { Latitude = 50, Longitude = -120 }),
  MapStyleSheetEntry = MapStyleSheetEntries.FoodPoint,
});
myMap.MapElements.Add(new MapIcon
{
  Location = new Geopoint(new BasicGeoposition { Latitude = 44, Longitude = -120 }),
  MapStyleSheetEntry = "myNamespace.myFoodPoint",
});

설명

이 속성을 문자열 또는 MapStyleSheetEntries 클래스에서 사용할 수 있는 속성 값으로 설정합니다.

지도 스타일시트 항목에 대한 자세한 내용은 지도 스타일시트 참조 및 지도 스타일시트 확장을 참조하세요.

적용 대상