The Demographic and Lifestyle sample template gives you a head start on your statistics project, which includes details about race, age, gender, land usage, and more for all the states in U.S. The template contains pre-styled layers that can be used as-is, or as the foundation for adding your own map notes and layers.
Please refer to Wiki for the details.
This sample makes use of the following NuGet Packages
internal class CustomDotDensityStyle : DotDensityStyle
{
protected override void DrawSampleCore(GeoCanvas canvas, DrawingRectangleF drawingExtent)
{
base.DrawSampleCore(canvas, drawingExtent);
PointShape upperLeftPoint = ExtentHelper.ToWorldCoordinate(canvas.CurrentWorldExtent, drawingExtent.CenterX - drawingExtent.Width / 2, drawingExtent.CenterY - drawingExtent.Height / 2, canvas.Width, canvas.Height);
PointShape lowerRightPoint = ExtentHelper.ToWorldCoordinate(canvas.CurrentWorldExtent, drawingExtent.CenterX + drawingExtent.Width / 2, drawingExtent.CenterY + drawingExtent.Height / 2, canvas.Width, canvas.Height);
RectangleShape rectangle = new RectangleShape(upperLeftPoint, lowerRightPoint);
rectangle.ScaleDown(10);
// Here draw the points on Legend Image
Random random = new Random(DateTime.Now.Millisecond);
Collection<BaseShape> drawingPoints = new Collection<BaseShape>();
for (int i = 0; i < DrawingPointsNumber; i++)
{
double x = rectangle.LowerLeftPoint.X + random.NextDouble() * (rectangle.Width);
double y = rectangle.LowerLeftPoint.Y + random.NextDouble() * (rectangle.Height);
drawingPoints.Add(new PointShape(x, y));
}
TextStyle textStyle = new TextStyle(DrawingPointsNumber.ToString(), new GeoFont("Arial", 20, DrawingFontStyles.Bold), new GeoSolidBrush(GeoColor.FromArgb(180, GeoColor.FromHtml("#d3d3d3"))));
textStyle.DrawSample(canvas, drawingExtent);
CustomPointStyle.Draw(drawingPoints, canvas, new Collection<SimpleCandidate>(), new Collection<SimpleCandidate>());
}
}
Map Suite Desktop for Winforms Wiki Resources
Map Suite Desktop for Winforms Product Description
This example makes use of the following APIs:
- ThinkGeo.MapSuite.Shapes.DrawingRectangleF
- ThinkGeo.MapSuite.Drawing.GeoCanvas
- ThinkGeo.MapSuite.Shapes.PointShape
- ThinkGeo.MapSuite.Shapes.ExtentHelper
- ThinkGeo.MapSuite.Shapes.RectangleShape
- ThinkGeo.MapSuite.Shapes.BaseShape
- ThinkGeo.MapSuite.Styles.TextStyle
Map Suite is a set of powerful development components and services for the .Net Framework.
ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.