VectorFileLayer Class
A layer that displays vector elements loaded from a file (e.g., Shapefile or KML).
Namespace: DevExpress.UI.Xaml.Map
Assembly: DevExpress.UI.Xaml.Map.v18.2.dll
Declaration
[Bindable]
[ContentProperty(Name = "FileReader")]
public class VectorFileLayer :
VectorLayer
Example
To load vector data from a Shapefile, do the following.
- Create a
VectorFileLayer
object and add it to the MapControl.Layers collection. - Create an instance of the ShapefileReader class and assign the instance to the VectorFileLayer.FileReader property.
- Create a MapFileSourceBase class descendant object, configure it and assign it to the MapFileReaderBase.FileSource property of the instance.
Note
A complete sample project is available at: https://github.com/DevExpress-Examples/how-to-load-vector-data-from-shapefile-t279980
<Map:VectorFileLayer
ShapeStroke="{ThemeResource AppBarBackgroundThemeBrush}">
<Map:ShapefileReader>
<Map:ShapefileReader.FileSource>
<Map:MapPackageFileSource FileName="Assets\Countries.shp"/>
</Map:ShapefileReader.FileSource>
</Map:ShapefileReader>
</Map:VectorFileLayer>
Inheritance
Object
Windows.UI.Xaml.DependencyObject
Windows.UI.Xaml.UIElement
Windows.UI.Xaml.FrameworkElement
Windows.UI.Xaml.Controls.Control
MapElement
LayerBase
MapItemsLayerBase
VectorLayer
VectorFileLayer
See Also