Back to Devexpress

FileDataAdapterBase.FileUri Property

windowsforms-devexpress-dot-xtramap-dot-filedataadapterbase.md

latest2.9 KB
Original Source

FileDataAdapterBase.FileUri Property

SECURITY-RELATED CONSIDERATIONS

Downloading map data passed through URLs specified by the FileUri property may create security issues. Review the following help topic and learn how to spot, analyze, and prohibit unwanted download requests:

Suppress Control Requests to Download Data from External URLs

Gets or sets a URI that specifies location of a vector data file.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
[DefaultValue(null)]
public Uri FileUri { get; set; }
vb
<DefaultValue(Nothing)>
Public Property FileUri As Uri

Property Value

TypeDefaultDescription
Urinull

A Uri object that that specifies a path to a vector data file.

|

Example

To load shape data from a shapefile do the following.

View Example

csharp
// 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;
}
vb
' Create data for the MapLayer.
    MapLayer.Data = CreateData()
Private Function CreateData() As MapDataAdapterBase
    Dim baseUri As New Uri(System.Reflection.Assembly.GetEntryAssembly().Location)

    ' Create an adapter to load data from shapefile.
    Dim adapter As New ShapefileDataAdapter() With {.FileUri = New Uri(baseUri, filename)}

    Return adapter
End Function

See Also

FileDataAdapterBase Class

FileDataAdapterBase Members

DevExpress.XtraMap Namespace