2016-06-11 4 views
-1

빙지도에 문제가 있습니다. 맞춤 핀 (이미지)을지도에 넣고 싶지만 모든 핀이 보이지는 않습니다. 핀이빙지도, 맞춤 핀이 사라짐

을 사라지게하는 줌이 내 코드입니다 :

foreach (Stores store in boltok) 
     { 
      var myPosition = new Windows.Devices.Geolocation.BasicGeoposition(); 
      myPosition.Latitude = store.Latitude; 
      myPosition.Longitude = store.Longitude; 
      var myStorePoint = new Windows.Devices.Geolocation.Geopoint(myPosition); 
      MapIcon icon = new MapIcon(); 
      icon.Location = new Geopoint(new BasicGeoposition() 
      { 
       Latitude = store.Latitude, 
       Longitude = store.Longitude 
      }); 
      icon.Visible = true; 
      icon.ZIndex = 0; 
      icon.Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/StoreFinder/Pin.png")); 
      icon.NormalizedAnchorPoint = new Point(0.5, 1.0); 

      myMapControl.MapElements.Add(icon); 
      myMapControl.Children.Add(icon); 

     } 

제발 도와주세요!

답변

0

MapIcon을 사용하는 경우 children 속성이 아닌 MapElements 속성에만 추가하십시오. MapIcon은 일부 충돌 감지 기능으로 설계되었으며 묶음이 겹칠 때 숨길 것입니다. 확대 할 때 다시 나타납니다. 이 작업을 원하지 않으면 압정으로 사용하기 위해 UserControl을 만들고지도의 Children 속성에 추가하십시오. 이 설명서의 "지도 컨트롤에 XAML 요소 표시"섹션을 확인하십시오. https://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn792121.aspx

관련 문제