This WPF sample shows how to take advantage of the projection class WrapDatelineProjection for doing spatial queries when on a “virtual map”. From this spatial query example, the developer should understand how the same principle using the same projection class can be applied for other operations such as Spatial Queries, Identify, etc.
Please refer to Wiki for the details.
This sample makes use of the following NuGet Packages
class WrapDatelineProjection : Projection, IDisposable
{
protected override Vertex[] ConvertToExternalProjectionCore(double[] x, double[] y)
{
Vertex[] vertices = new Vertex[x.Length];
for (int i = 0; i < vertices.Length; i++)
{
if ((x[i] > HalfExtentWidth)|| (x[i] < (-HalfExtentWidth)))
{
double realx = GetAp(x[i]);
vertices[i] = new Vertex(realx, y[i]);
}
else
{
vertices[i] = new Vertex(x[i], y[i]);
}
}
return vertices;
}
}
Map Suite Desktop for Wpf Wiki Resources
Map Suite Desktop for Wpf Product Description
This example makes use of the following APIs:
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.