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); }
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; }
private void mapCenterOnTw() { // Center map on Taiwan center. map.Scene = MapScene.CreateFromLocation(StaticTaqModel.twCenterLoc); map.ZoomLevel = 7.5; }