FileDataAdapterBase.FileUri Property
Gets or sets an Uri that defines the location of a vector data file.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v19.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Uri | *null* | A Uri object that contains a vector data file Uri. |
Example
To load shape data from a shapefile do the following.
- Create a ShapefileDataAdapter object.
- Specify its ShapefileDataAdapter.FileUri property.
- Assign this object as the VectorItemsLayer.Data property value.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-colorize-map-contours-loaded-from-shapefiles-using-the-choropleth-colorizer-e4691
// Create data for the MapLayer.
MapLayer.Data = CreateData();
private MapDataAdapterBase CreateData() {
Uri baseUri = new Uri(System.Reflection.Assembly.GetEntryAssembly().Location);
// Create an adapter to load data from shapefile.
ShapefileDataAdapter adapter = new ShapefileDataAdapter() {
FileUri = new Uri(baseUri, filename)
};
return adapter;
}
See Also