コード例 #1
0
 public MapTakeover(UIElement mapOverlay, RectSubset centerRegionOverride, MapView viewOverride)
 {
     MapOverlay = mapOverlay;
     CenterRegionOverride = centerRegionOverride;
     ViewOverride = viewOverride;
 }
コード例 #2
0
 public async Task TrySetView(MapView view)
 {
     if (view.Area == null)
     {
         Geopoint adjustedCenter = null;
         if (view.Center != null)
             adjustedCenter = (Geopoint)CenterConverter.Convert(view.Center.Value, typeof(Geopoint), null, null);
         var result = await MainMap.TrySetViewAsync(adjustedCenter, view.ZoomLevel, null, null, view.Animate ? MapAnimationKind.Default : MapAnimationKind.None);
     }
     else
     {
         await MainMap.TrySetViewBoundsAsync(new GeoboundingBox(view.Area.Value.NW.ToBasicGeoposition(), view.Area.Value.SE.ToBasicGeoposition()), null, view.Animate ? MapAnimationKind.Default : MapAnimationKind.None);
     }
 }
コード例 #3
0
 protected void OnChangeViewRequested(MapView view)
 {
     if (ChangeViewBackCommand?.CanExecute(view) ?? false)
         ChangeViewBackCommand.Execute(view);
 }
コード例 #4
0
 private void SetTakeover(MapView requestedView = null)
 {
     if (ArrivalsPopup.Visibility == Visibility.Visible)
     {
         MapTakeover takeover;
         if (Maximized)
             takeover = new MapTakeover(OffMapPopup, new RectSubset() { Top = MAXIMIZED_MAP_MARGIN, TopValueType = RectSubsetValueType.Length }, requestedView);
         else
             takeover = new MapTakeover(null, new RectSubset() { Top = 0.2, TopValueType = RectSubsetValueType.Length, TopScale = RectSubsetScale.Relative }, requestedView);
         InvokeTakeoverRequested(takeover);
     }
     else
         InvokeTakeoverRequested(null);
 }