Skip to main content

DevExpress v24.1 Update — Your Feedback Matters

Our What's New in v24.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to: Manually Generate Vector Items from WKT

To manually provide vector items from the Well-Known Text, do the following.

private void Form1_Load(object sender, EventArgs e) {
    SqlGeometryItemStorage storage = new SqlGeometryItemStorage();

    storage.Items.Add(SqlGeometryItem.FromWkt("POINT(-0.1275 51.507222 0 10)", 0));
    storage.Items.Add(SqlGeometryItem.FromWkt("POINT(12.5 41.9 0 10)", 1));
    storage.Items.Add(SqlGeometryItem.FromWkt("POINT(2.3508 48.8567 0 10)", 2));
    storage.Items.Add(SqlGeometryItem.FromWkt("POINT(13.38 52.52 0 10)", 3));
    storage.Items.Add(SqlGeometryItem.FromWkt("POINT(-3.68 40.4 0 10)", 4));

    VectorItemsLayer layer = new VectorItemsLayer() { Data = storage };
    layer.DataLoaded += layer_DataLoaded;
    mapControl1.Layers.Add(layer);
}