12 Answers, 1 is accepted
0
Hello Andrew,
The ZoomRange is not supported on the map shape data objects. I would recommend using the map shapes virtualization. You can find more details here.
Regards,
The ZoomRange is not supported on the map shape data objects. I would recommend using the map shapes virtualization. You can find more details here.
Regards,
Andrey Murzov
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Andrew
Top achievements
Rank 2
answered on 01 Aug 2014, 08:48 AM
I did try using Virtualization but was getting threading errors. Perhaps this was because I'm was trying to return MapPolyline objects. It sounds like I need to return PoylineData objects instead.
Andrew
Andrew
0
Hi Andrew,
There are 2 visualization engines in the RadMap package.
The old implementation of the map objects' (points and shapes) visualization consists of 3 layers: InformationLayer, DynamicLayer and VirtualizationLayer.
The new visualization engine replaces all 3 layers with the new VisualizationLayer.
The MapPolyline object (like any other object inherited from the MapSÑ€ape class) is designed to be used with old engine (i.e. InformationLayer) and it can't be used with new engine (i.e. VisualizationLayer).
New engine has own class hierarchy which represents map shapes: the data objects inherited from the MapShapeData class (LineData, PolylineData, PathData and so on). This is regular data objects (not a DependencyObjects) which can be created in the background thread. These classes do not support binding in anyway and can't be used in the data template.
Regards,
There are 2 visualization engines in the RadMap package.
The old implementation of the map objects' (points and shapes) visualization consists of 3 layers: InformationLayer, DynamicLayer and VirtualizationLayer.
The new visualization engine replaces all 3 layers with the new VisualizationLayer.
The MapPolyline object (like any other object inherited from the MapSÑ€ape class) is designed to be used with old engine (i.e. InformationLayer) and it can't be used with new engine (i.e. VisualizationLayer).
New engine has own class hierarchy which represents map shapes: the data objects inherited from the MapShapeData class (LineData, PolylineData, PathData and so on). This is regular data objects (not a DependencyObjects) which can be created in the background thread. These classes do not support binding in anyway and can't be used in the data template.
Regards,
Andrey Murzov
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Andrew
Top achievements
Rank 2
answered on 04 Aug 2014, 08:28 AM
Does the new VisualisationLayer internally support virtualisation? I have hundreds of thousands of polylines (each 1m long) and need to work out the best approach. I create two data sets, one containing the full 1m data set (visible with zoom > 18) and another visible at lower zoom levels with one polyline per 100m.
0
Hello Andrew,
Yes it is. For more details you can take a look at the Map Shapes Virtualization article.
Regards,
Yes it is. For more details you can take a look at the Map Shapes Virtualization article.
Regards,
Andrey Murzov
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Andrew
Top achievements
Rank 2
answered on 11 Aug 2014, 09:44 PM
Andrey
the link you provided does not work.
Andrew
the link you provided does not work.
Andrew
0
Andrew
Top achievements
Rank 2
answered on 11 Aug 2014, 11:44 PM
Can you provide some example code demonstrating virtualisation of Polyline objects with the new visualisation layer?
0
Hello Andrew,
I'm sorry, the wrong link has been copied to the message. Use following link to read the article: http://www.telerik.com/help/wpf/radmap-features-visualization-layer-shapes-virtualization.html
Regards,
I'm sorry, the wrong link has been copied to the message. Use following link to read the article: http://www.telerik.com/help/wpf/radmap-features-visualization-layer-shapes-virtualization.html
Regards,
Andrey Murzov
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Andrew
Top achievements
Rank 2
answered on 15 Aug 2014, 09:32 AM
Where can I download the example app from that page?
Andrew
Andrew
0
Hi Andrew,
I have attached a sample solution.
I hope it helps.
Regards,
Andrey Murzov
Telerik
I have attached a sample solution.
I hope it helps.
Regards,
Andrey Murzov
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Andrew
Top achievements
Rank 2
answered on 15 Aug 2014, 05:13 PM
Ok, I've implemented the virtualization as per the example. In QueryItems I have code like this
PolylineData pld = new PolylineData();
pld.Points = new LocationCollection();
pld.Points.Add(new Telerik.Windows.Controls.Map.Location(52.1865304892871, -0.146490724389641));
pld.Points.Add(new Telerik.Windows.Controls.Map.Location(52.1867409774947, -0.153464467828342));
shapes.Add(pld);
Which works ok. How do I change the colour of the PolylineData. When I try and use
pld.ShapeFill = new MapShapeFill()
{
Stroke = new SolidColorBrush(Colors.Red),
StrokeThickness = 2
};
I get threading errors.
PolylineData pld = new PolylineData();
pld.Points = new LocationCollection();
pld.Points.Add(new Telerik.Windows.Controls.Map.Location(52.1865304892871, -0.146490724389641));
pld.Points.Add(new Telerik.Windows.Controls.Map.Location(52.1867409774947, -0.153464467828342));
shapes.Add(pld);
Which works ok. How do I change the colour of the PolylineData. When I try and use
pld.ShapeFill = new MapShapeFill()
{
Stroke = new SolidColorBrush(Colors.Red),
StrokeThickness = 2
};
I get threading errors.
0
Hello Andrew,
The QueryItems method is invoked in the background thread, but the MapShapeFill class uses types which can be used in the UI thread only. So, in this case I would recommend you to use the MapShapeData.SerializedShapeFill property instead of using ShapeFill property.
The sample code is below.
Regards,
Andrey Murzov
Telerik
The QueryItems method is invoked in the background thread, but the MapShapeFill class uses types which can be used in the UI thread only. So, in this case I would recommend you to use the MapShapeData.SerializedShapeFill property instead of using ShapeFill property.
The sample code is below.
PolylineData pld =
new
PolylineData();
pld.Points =
new
LocationCollection();
pld.Points.Add(
new
Telerik.Windows.Controls.Map.Location(52.1865304892871, -0.146490724389641));
pld.Points.Add(
new
Telerik.Windows.Controls.Map.Location(52.1867409774947, -0.153464467828342));
shapes.Add(pld);
pld.SerializedShapeFill =
new
MapShapeDataFill()
{
StrokeColor = Colors.Red,
StrokeThickness = 2
};
Regards,
Andrey Murzov
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.