Пример #1
0
        private async void OnQuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
        {
            if (!(args.ChosenSuggestion is LocationSuggestion chosen))
            {
                sender.Text = string.Empty;
                return;
            }

            var scene = MapScene.CreateFromLocation(chosen.Location.Point);
            await Map.TrySetSceneAsync(scene);
        }
Пример #2
0
        private async void EnsureMapView()
        {
            await Task.Delay(2000);

            var toolbar = Map.FindDescendant <StackPanel>();

            if (toolbar != null)
            {
                toolbar.Visibility = Visibility.Visible;
            }

            Map.Style = MapStyle.Aerial3DWithRoads;
            await Map.TrySetSceneAsync(MapScene.CreateFromLocation(Constants.AreaCenter));

            Map.ZoomLevel = Constants.InitialZoomLevel;
        }
Пример #3
0
 private void mapCenterOnTw()
 {
     // Center map on Taiwan center.
     map.Scene     = MapScene.CreateFromLocation(StaticTaqModel.twCenterLoc);
     map.ZoomLevel = 7.5;
 }