This is a migrated thread and some comments may be shown as answers.

I do not see the InformationLevel

3 Answers 62 Views
Map
This is a migrated thread and some comments may be shown as answers.
Pavel Ruslanovich Kovyev
Top achievements
Rank 1
Pavel Ruslanovich Kovyev asked on 06 Jun 2010, 09:54 AM
Привет.
Прилагаю к сообщению файл с проектом, над которым я не могу понять что происходит.
На карте есть 2 слоя. В слое inflayer1 есть polyline, если сделать этот слой видимым (Visibility), то мы увидим линию.
<maps:InformationLayer x:Name="inflayer1" Visibility="Collapsed"
                        <maps:MapLine Point1="58,56" 
     Point2="58,56.4" 
     Stroke="Red" 
     StrokeThickness="2" /> 
            </maps:InformationLayer> 

Второй слой ничем не отличается, кроме того, что он привязан к данным (Binding). В данных 4 элемента, в слое тоже появляются 4 элемента (это видно когда нажимаешь на кнопку),
private void Button_Click(object sender, RoutedEventArgs e) 
        { 
            MessageBox.Show(inflayer.Items.Count.ToString()); 
        } 
выходит число 4
Но самих линий на карте я не вижу.
<UserControl.Resources> 
        <c:Cars x:Key="cars"/> 
    </UserControl.Resources> 
    <Grid x:Name="LayoutRoot"
        <Grid.RowDefinitions> 
            <RowDefinition Height="*" /> 
            <RowDefinition Height="30" /> 
        </Grid.RowDefinitions> 
        <map:RadMap x:Name="radMap" 
                           Center="58,56" 
                           ZoomLevel="13" 
                           IsMouseWheelZoomEnabled="True"
            <maps:InformationLayer x:Name="inflayer" DataContext="{StaticResource cars}" ItemsSource="{Binding MyCars}"
                <maps:InformationLayer.ItemTemplate> 
                    <DataTemplate> 
                        <maps:MapLine Point1="58,56" 
     Point2="58,56.4" 
     Stroke="Red" 
     StrokeThickness="2" /> 
                    </DataTemplate> 
                </maps:InformationLayer.ItemTemplate> 
            </maps:InformationLayer> 

 Объясните, что я делаю не так?
Вот сами классы с данными:
public class Cars : INotifyPropertyChanged 
    { 
        private ObservableCollection<Car> _cars; 
        public ObservableCollection<Car> MyCars 
        { 
            get 
            { 
                return _cars; 
            } 
            set 
            { 
                if (_cars != value) 
                { 
                    _cars = value; 
                    NotifyPropertyChanged("MyCars"); 
                } 
            } 
        } 
 
        public event PropertyChangedEventHandler PropertyChanged; 
        private void NotifyPropertyChanged(String info) 
        { 
            if (PropertyChanged != null
            { 
                PropertyChanged(thisnew PropertyChangedEventArgs(info)); 
            } 
        } 
 
        public Cars() 
        { 
            _cars = new ObservableCollection<Car>(); 
            _cars.Add(new Car() { Name = "Тест1" }); 
            _cars.Add(new Car() { Name = "Тест2" }); 
            _cars.Add(new Car() { Name = "Тест3" }); 
            _cars.Add(new Car() { Name = "Тест4" }); 
        } 
    } 



Hello.
Attached to the message file to the project, on which I can not understand what is happening.
On the map there are 2 layers. In the layer is inflayer1 polyline, if you make this layer visible (Visibility), we see the line

The second layer is no different, except that it is linked to the data (Binding). In these 4 cells, also appear in the layer 4 cells (as seen when you click on the button), But the lines themselves on the map, I do not see.

3 Answers, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 08 Jun 2010, 02:08 PM
Hello Pavel Ruslanovich,

The MapShape elements such as MapLine, MapPolyline, MapPolygon etc. have been designed for using as items for information layer. The information layer does not support using them within item template.
We've created the PITS issue for support using them by this way in future releases. You can track its implementation by the following link:
http://www.telerik.com/support/pits.aspx#/public/silverlight/2362

Фигуры, подобные MapLine, MapPolyline, MapPolygon были разработаны для использования их в качестве элементов информационного слоя. К сожалению, он не поддерживает использование данных элементов внутри шаблона.
Мы открыли тему в PITS системе и рассмотрим возможность использования фигур в шаблоне элементов, чтобы включить эту возможность в будущих выпусках компоненты.
Вы можете отследить реализацию этой опции используя следующую ссылку:
http://www.telerik.com/support/pits.aspx#/public/silverlight/2362

Sincerely yours,
Andrey Murzov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Mark Kharitonov
Top achievements
Rank 1
answered on 02 Jul 2010, 12:42 AM
Hi

Are you planning on fixing this issue soon?
It is very hard to work without this capability
0
Andrey
Telerik team
answered on 02 Jul 2010, 09:32 AM
Hello Mark Kharitonov,

Unfortunately, the change you requested is not in our plans for Q2 2010 and it does not seem to be a trivial one. You can vote for this feature in our PITS so it has high priority in our future plans. For now I see 2 comments there, but only 1 vote. So this feature is not a priority one for now.

http://www.telerik.com/support/pits.aspx#/public/silverlight/2362

Regards,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Map
Asked by
Pavel Ruslanovich Kovyev
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Mark Kharitonov
Top achievements
Rank 1
Share this question
or