How to: Manually Generate Vector Items from WKT
To manually provide vector items from the Well-Known Text, do the following.
- Create a SqlGeometryItemStorage object and assign it to the VectorLayer.Data property.
- Add SqlGeometryItem objects with the specified SqlGeometryItem.WktString property to the SqlGeometryItemStorage.Items collection.
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map"
x:Class="SqlGeometryItemStorageExample.MainWindow"
Title="MainWindow" Height="350" Width="525">
<Grid>
<dxm:MapControl CenterPoint="50,15" ZoomLevel="3">
<dxm:ImageTilesLayer>
<dxm:BingMapDataProvider BingKey="Your Bing Key"/>
</dxm:ImageTilesLayer>
<dxm:VectorLayer>
<dxm:SqlGeometryItemStorage>
<dxm:SqlGeometryItemStorage.Items>
<dxm:SqlGeometryItem WktString="POINT(-0.1275 51.507222 0 25)" Srid="0"/>
<dxm:SqlGeometryItem WktString="POINT(12.5 41.9 0 25)" Srid="1"/>
<dxm:SqlGeometryItem WktString="POINT(2.3508 48.8567 0 25)" Srid="2"/>
<dxm:SqlGeometryItem WktString="POINT(13.38 52.52 0 25)" Srid="3"/>
<dxm:SqlGeometryItem WktString="POINT(-3.68 40.4 0 25)" Srid="4"/>
</dxm:SqlGeometryItemStorage.Items>
</dxm:SqlGeometryItemStorage>
</dxm:VectorLayer>
</dxm:MapControl>
</Grid>
</Window>