Reputation: 3912
I am using the DevExtreme XPF MapControl and am trying to create the below style of map:
The only way I can see to generate this type of map is by using shape files with an associated ".dbf" file to generate the colours for the countries. The maps will be generated at runtime from data in a database which means I can't pre-prepare the ".dbf" files. Does anyone know of a way to programatically do this?
Upvotes: 1
Views: 2605
Reputation: 3912
The way I ended up doing this was by storing the KML files for all countries, regions and cities that I cared about, and then plotted them on the map using polylines.
Upvotes: 1
Reputation: 58
You can use DotNetDbf to easily generate .dbf files
Example
using (Stream fos = File.Open(@"C:\Foo.dbf", FileMode.OpenOrCreate, FileAccess.ReadWrite))
{
var writer = new DBFWriter();
var field = new DBFField("Foo1", NativeDbType.Numeric, 15, 0);
writer.Fields = new[] { field };
writtenValue = 123456789012345L;
writer.AddRecord(writtenValue);
writer.Write(fos);
}
Upvotes: 1