I have two questions regarding the mapping control.
1) What mapping service do I need to purchase from Microsoft? Is it the service known as "Bing Maps for Enterprise - Known User Full"?
2) Thanks to Microsoft bending over backwards to accommodate any NSA request my client is unable to provide internet access (for fear NSA will have backdoor access to their critical infrastructure). Is there a way for me to (legally) cache the map data prior to shipment so internet access is not required once I've delivered the system to the customer. I understand the Microsoft license agreement requires full time internet access as part of the agreement. Could I run some sort of web cache? Are unique URL's used for each request to prevent caching? I'm not trying to avoid the license fees, I'm happy with those, it's the lack of internet access that's my problem.
Andrew
From the examples I can load a KML file to an informationlayer like this:
Dim streamResource As StreamResourceInfo = Application.GetResourceStream(New Uri("/MyApp;component/Resources/bulgaria.kml", UriKind.RelativeOrAbsolute))Dim elements As List(Of FrameworkElement) = KmlReader.Read(streamResource.Stream)For Each element As FrameworkElement In elements Me.informationLayer.Items.Add(element)Next element
... however in your Bulgaria.kml example I notice this:
<Icon>
<href>http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png</href>
</Icon>
... how can I change it so that placemark_circle.png is local, and does not require google? When I copy the .png file to a local location, no value for the icon href works for adding to the information layer. Do you have any suggestions?
var itemsSource = new List<double>[] { new List<double> { 9, 2, 3, 4 }, new List<double> { 5, 7, 3, 4 } };<Window xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="TestWPF2.MainWindow" Title="MainWindow" Height="443.5" Width="890.5" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="*"/> <RowDefinition Height="*"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <telerik:RadCartesianChart Margin="0,0,0,0" Grid.Row="0"> <telerik:RadCartesianChart.HorizontalAxis> <telerik:CategoricalAxis/> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis/> </telerik:RadCartesianChart.VerticalAxis> <telerik:BarSeries> <telerik:BarSeries.DataPoints> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/> </telerik:BarSeries.DataPoints> </telerik:BarSeries> </telerik:RadCartesianChart> <telerik:RadCartesianChart Margin="0" Grid.Column="1" Grid.Row="0"> <telerik:RadCartesianChart.HorizontalAxis> <telerik:CategoricalAxis/> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis/> </telerik:RadCartesianChart.VerticalAxis> <telerik:BarSeries> <telerik:BarSeries.DataPoints> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/> </telerik:BarSeries.DataPoints> </telerik:BarSeries> </telerik:RadCartesianChart> <telerik:RadCartesianChart Margin="0" Grid.Row="1"> <telerik:RadCartesianChart.HorizontalAxis> <telerik:CategoricalAxis/> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis/> </telerik:RadCartesianChart.VerticalAxis> <telerik:BarSeries> <telerik:BarSeries.DataPoints> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/> </telerik:BarSeries.DataPoints> </telerik:BarSeries> </telerik:RadCartesianChart> <telerik:RadCartesianChart Margin="0" Grid.Column="1" Grid.Row="1"> <telerik:RadCartesianChart.HorizontalAxis> <telerik:CategoricalAxis/> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis/> </telerik:RadCartesianChart.VerticalAxis> <telerik:BarSeries> <telerik:BarSeries.DataPoints> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/> </telerik:BarSeries.DataPoints> </telerik:BarSeries> </telerik:RadCartesianChart> <telerik:RadCartesianChart Margin="0" Grid.Row="2"> <telerik:RadCartesianChart.HorizontalAxis> <telerik:CategoricalAxis/> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis/> </telerik:RadCartesianChart.VerticalAxis> <telerik:BarSeries> <telerik:BarSeries.DataPoints> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/> </telerik:BarSeries.DataPoints> </telerik:BarSeries> </telerik:RadCartesianChart> <telerik:RadCartesianChart Margin="0" Grid.Column="1" Grid.Row="2"> <telerik:RadCartesianChart.HorizontalAxis> <telerik:CategoricalAxis/> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis/> </telerik:RadCartesianChart.VerticalAxis> <telerik:BarSeries> <telerik:BarSeries.DataPoints> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/> </telerik:BarSeries.DataPoints> </telerik:BarSeries> </telerik:RadCartesianChart> <telerik:RadCartesianChart Margin="0" Grid.Row="3"> <telerik:RadCartesianChart.HorizontalAxis> <telerik:CategoricalAxis/> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis/> </telerik:RadCartesianChart.VerticalAxis> <telerik:BarSeries> <telerik:BarSeries.DataPoints> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/> </telerik:BarSeries.DataPoints> </telerik:BarSeries> </telerik:RadCartesianChart> <telerik:RadCartesianChart Margin="0" Grid.Column="1" Grid.Row="3"> <telerik:RadCartesianChart.HorizontalAxis> <telerik:CategoricalAxis/> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis/> </telerik:RadCartesianChart.VerticalAxis> <telerik:BarSeries> <telerik:BarSeries.DataPoints> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/> </telerik:BarSeries.DataPoints> </telerik:BarSeries> </telerik:RadCartesianChart> </Grid></Window>//Part of the ViewModel - Beginprivate ObservableCollection<ProductCategoryModel> _planCollection = null;public ViewModel(){ //ViewModel Constructor _planCollection = new ObservableCollection<ProductCategoryModel> { new ProductCategoryModel("AlphaPlan"), new ProductCategoryModel("BetaPlan") }}public ObservableCollection<ProductCategoryModel> PlanCollection{ get { return _planCollection; } set { _planCollection = value; }}public ObservableCollection<CalendarWeek> AlphaPlan{ get { return _planCollection[0].Numbers; } set { throw new NotImplementedException(); }}public ObservableCollection<CalendarWeek> BetaPlan{ get { return _planCollection[1].Numbers; } set { throw new NotImplementedException(); }}//Part of the ViewModel - End//The Models - Beginpublic class CalendarWeek : INotifyPropertyChanged { public CalendarWeek(int week, float value) { this.Week = week; this.Value = value; } [Display(AutoGenerateField = false)] public int Week { get; set; } [DisplayAttribute(Name = "Value")] public double Value { get; set; } }public class ProductCategoryModel { public ProductCategoryModel(string leName) { this.Product = leName; this.Numbers = new ObservableCollection<CalendarWeek>(); for (int i = 1; i <= 52; i++) { Random r = new Random(Guid.NewGuid().GetHashCode()); int rInt = r.Next(0, 100); this.Numbers.Add(new CalendarWeek(i, rInt)); } } public ObservableCollection<CalendarWeek> Numbers { get; set; } public string Product { get; set; } }//The Models - End
<telerik:RadComboBox Name="rcbNew" Grid.Row="0"
IsEditable="True" Height="25" Width="200">
<telerik:RadComboBox.Items>
<telerik:RadComboBoxItem>
<telerik:RadComboBoxItem.Template>
<ControlTemplate>
<my1:RadGridView x:Name="RadGridView1" ShowGroupPanel="False" CanUserFreezeColumns="False"
RowIndicatorVisibility="Collapsed" IsReadOnly="True"
IsFilteringAllowed="False" ItemsSource="{Binding .}"
Width="200" Height="150" SelectionChanged="RadGridView1_SelectionChanged" >
</my1:RadGridView>
</ControlTemplate>
</telerik:RadComboBoxItem.Template>
</telerik:RadComboBoxItem>
</telerik:RadComboBox.Items>
</telerik:RadComboBox>
DependencyProperty currentSelectedValue = DependencyProperty.Register("rcbNewSelectedValue", typeof(Int32), typeof(Int32));
// Constructor
public GridinDropDown()
{
InitializeComponent();
IList<Company> MyObject;
MyObject = new List<Company>()
{
new Company { Id=1, Name="Description1" },
new Company { Id=2, Name="Description2" },
new Company { Id=3, Name="Description3" },
new Company { Id=4, Name="Description4" }
};
this.DataContext = MyObject;
}
private void RadGridView1_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
{
rcbNew.Text = ((Company)((Telerik.Windows.Controls.GridView.GridViewDataControl)sender).SelectedItem).Name;
rcbNew.SetValue(currentSelectedValue, ((Company)((Telerik.Windows.Controls.GridView.GridViewDataControl)sender).SelectedItem).Id);// = ((Company)((Telerik.Windows.Controls.GridView.GridViewDataControl)sender).SelectedItem).Id;
rcbNew.IsDropDownOpen = false;
}