Hi,
I have downloaded the beta version of the WPF RadMap specifically to look at the shape file importing.
I have used your examples to render your example .shp files
this works fine, but when I use some shape files that I have bought I get an error when the shapes are drawn on the canvas
Message=Width and Height must be non-negative.
Source=WindowsBase
StackTrace:
at System.Windows.Size..ctor(Double width, Double height)
at Telerik.Windows.Controls.Map.MapCanvas.SetItemPosition(MapCanvasItem item, Point point) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Map\Layers\MapCanvas.cs:line 371
at Telerik.Windows.Controls.Map.MapCanvas.ArrangeItem(MapCanvasItem item) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Map\Layers\MapCanvas.cs:line 696
at Telerik.Windows.Controls.Map.MapCanvas.ArrangeOverride(Size finalSize) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Map\Layers\MapCanvas.cs:line 387
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
If I load my shape files into MapWindowGIS, they require 3 files, the .shp, the .dbf and the .shx. I can't see where to specify the location of the .shx file in the MapShapeReader?
Am I missing something?
Thanks
Simon
I have downloaded the beta version of the WPF RadMap specifically to look at the shape file importing.
I have used your examples to render your example .shp files
ThematicLayer.Reader =
new MapShapeReader();
ThematicLayer.Reader.ReadCompleted += MapShapeReader_ReadCompleted;
ThematicLayer.Reader.Source =
new Uri(string.Format(ShapeFilePath, new object[] { layerName, ShapeExtension }), UriKind.Absolute);
ThematicLayer.Reader.DataSource =
new Uri(string.Format(ShapeFilePath, new object[] { layerName, DbfExtension }), UriKind.Absolute);
ThematicLayer.Reader.SourceType =
ShapeSourceType.ShapeFile;
this works fine, but when I use some shape files that I have bought I get an error when the shapes are drawn on the canvas
Message=Width and Height must be non-negative.
Source=WindowsBase
StackTrace:
at System.Windows.Size..ctor(Double width, Double height)
at Telerik.Windows.Controls.Map.MapCanvas.SetItemPosition(MapCanvasItem item, Point point) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Map\Layers\MapCanvas.cs:line 371
at Telerik.Windows.Controls.Map.MapCanvas.ArrangeItem(MapCanvasItem item) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Map\Layers\MapCanvas.cs:line 696
at Telerik.Windows.Controls.Map.MapCanvas.ArrangeOverride(Size finalSize) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\DataVisualization\Map\Layers\MapCanvas.cs:line 387
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
If I load my shape files into MapWindowGIS, they require 3 files, the .shp, the .dbf and the .shx. I can't see where to specify the location of the .shx file in the MapShapeReader?
Am I missing something?
Thanks
Simon