Back to Devexpress

SvgFileDataAdapter.FileUri Property

windowsforms-devexpress-dot-xtramap-dot-svgfiledataadapter.md

latest2.7 KB
Original Source

SvgFileDataAdapter.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 defines the 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 contains a vector data file URI.

|

Example

To load SVG file content to the Map Control, create a new SvgFileDataAdapter and assign it to the VectorItemsLayer.Data property. Then, specify the SvgFileDataAdapter.FileUri property of the adapter.

View Example

csharp
private void Form1_Load(object sender, EventArgs e) {
    Uri baseUri = new Uri(System.Reflection.Assembly.GetExecutingAssembly().Location);
    map.Layers.Add(new VectorItemsLayer {
        Data = new SvgFileDataAdapter {
            FileUri = new Uri(baseUri, "..\\..\\Data\\countries.svg")
        }
    });
}
vb
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
    Dim baseUri As New Uri(System.Reflection.Assembly.GetExecutingAssembly().Location)
    map.Layers.Add(New VectorItemsLayer With { _
        .Data = New SvgFileDataAdapter With {.FileUri = New Uri(baseUri, "..\..\Data\countries.svg")} _
    })
End Sub

See Also

SvgFileDataAdapter Class

SvgFileDataAdapter Members

DevExpress.XtraMap Namespace