Geography Reference
In-Depth Information
const string countyGidColumnName = "gid" ;
VectorStyle ukCountyStyle = new VectorStyle { Fill = Brushes .Green, Outline =
Pens .Black, EnableOutline = true };
VectorLayer ukCountys = new VectorLayer ( "ukcountys" )
{
Style = ukCountyStyle,
DataSource = new PostGIS (_connString, countyTableName,
countyGeometryColumnName,countyGidColumnName),
MaxVisible = 40000
};
We repeat this pattern two more times to load the data for our towns and cities:
const string cityTableName = "ukcitys_wgs" ;
const string cityGeometryColumnName = "geometry" ;
const string cityGidColumnName = "gid" ;
const string townTableName = "uktowns_wgs" ;
const string townGeometryColumnName = "geometry" ;
const string townGidColumnName = "gid" ;
VectorStyle ukCountyStyle = new VectorStyle { Fill = Brushes .Green, Outline =
Pens .Black, EnableOutline = true };
VectorStyle ukCityStyle = new VectorStyle { PointColor = Brushes .OrangeRed };
VectorLayer ukCitys = new VectorLayer ( "ukcitys" )
{
Style = ukCityStyle,
DataSource = new PostGIS (_connString, cityTableName, cityGeometryColumnName,
cityGidColumnName),
MaxVisible = 40000
};
VectorStyle ukTownStyle = new VectorStyle { PointColor = Brushes .DodgerBlue };
VectorLayer ukTowns = new VectorLayer ( "uktowns" )
{
Style = ukTownStyle,
Search WWH ::




Custom Search