Git Product home page Git Product logo

distancequeryonwrapdatelinemodesample-forwpf's Introduction

Distance Query On Wrap Dateline Mode Sample for Wpf

Description

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.

Screenshot

Requirements

This sample makes use of the following NuGet Packages

MapSuite 10.0.0

About the Code

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;
    }
}

Getting Help

Map Suite Desktop for Wpf Wiki Resources

Map Suite Desktop for Wpf Product Description

ThinkGeo Community Site

ThinkGeo Web Site

Key APIs

This example makes use of the following APIs:

About Map Suite

Map Suite is a set of powerful development components and services for the .Net Framework.

About ThinkGeo

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.

distancequeryonwrapdatelinemodesample-forwpf's People

Contributors

casper-thinkgeo avatar cloudesky avatar githubadmin-thinkgeo avatar mike-thinkgeo avatar rex-thinkgeo avatar scottzhouthinkgeo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.