Skip to content

Find what’s nearby by using Distance Queries

In addition to spatial querying GIS developers should also consider adding distance querying functionality to allow users to make spatial decisions. In mapping applications it can be useful to find features within a certain distance. For example, let’s say you want to find the number of gas stations that are within a given distance from your location. Distance querying can help you answer such questions.

Map Suite offers a couple different Distance Query APIs to help you build your application including:

• GetFeaturesNearestTo – finds the nearest feature from your location.
• GetFeaturesWithinDistanceOf – finds all the features within a certain distance of your location.

Note: You can use any unit of measurement with these APIs (Feet, Miles, Kilometers, Inches, etc.)

Try the Map Suite WebAPI Edition live demo by checking out the Query Tools Sample and choosing the Query Features by Distance option. Or dive straight into the code by downloading the the sample directly from GitHub to start your free 60-day trial.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *