public MainWindow() { InitializeComponent(); this.routeProvider = new BingRouteProvider(); this.routeProvider.ApplicationId = "AqaPuZWytKRUA8Nm5nqvXHWGL8BDCXvK8onCl2PkC581Zp3T_fYAQBiwIphJbRAK"; this.routeProvider.MapControl = this.radMap; this.routeProvider.RoutingCompleted += this.RouteProvider_RoutingCompleted; this.wayPointsLayer.ItemsSource = this.wayPoints; }
public MainPage() { InitializeComponent(); this.routeProvider = new BingRouteProvider(); this.routeProvider.ApplicationId = "AqaPuZWytKRUA8Nm5nqvXHWGL8BDCXvK8onCl2PkC581Zp3T_fYAQBiwIphJbRAK"; this.routeProvider.MapControl = this.radMap; this.routeProvider.RoutingCompleted += this.RouteProvider_RoutingCompleted; this.wayPointsLayer.ItemsSource = this.wayPoints; }
private void Button_Click_1(object sender, RoutedEventArgs e) { string bingMapsKey = this.BingMapsKey.Text; this.radMap.Provider = new BingMapProvider(MapMode.Aerial, true, bingMapsKey); this.routeProvider = new BingRouteProvider(); this.routeProvider.ApplicationId = (this.radMap.Provider as BingMapProvider).ApplicationId; this.routeProvider.MapControl = this.radMap; this.routeProvider.RoutingCompleted += this.routeProvider_RoutingCompleted; this.ExecuteRouting(); }
// Initialize Virtual Earth map provider. private void SetProvider() { BingMapProvider provider = new BingMapProvider(MapMode.Aerial, true, VEKey); #if WPF provider.IsTileCachingEnabled = true; #endif this.RadMap1.Provider = provider; // Init route provider. routeProvider = new BingRouteProvider(); routeProvider.ApplicationId = VEKey; routeProvider.MapControl = this.RadMap1; routeProvider.RoutingCompleted += new EventHandler<RoutingCompletedEventArgs>(Provider_RoutingCompleted); }
// Initialize Virtual Earth map provider. private void SetProvider() { #if SILVERLIGHT BingMapProvider provider = new BingMapProvider(MapMode.Aerial, true, this.VEKey); #else BingMapProvider provider = new BingMapProvider(MapMode.Aerial, true, BingMapHelper.VEKey); provider.IsTileCachingEnabled = true; #endif this.RadMap1.Provider = provider; // Init route provider. routeProvider = new BingRouteProvider(); #if SILVERLIGHT routeProvider.ApplicationId = this.VEKey; #else routeProvider.ApplicationId = BingMapHelper.VEKey; #endif routeProvider.MapControl = this.RadMap1; routeProvider.RoutingCompleted += new EventHandler<RoutingCompletedEventArgs>(Provider_RoutingCompleted); }