Signed in as:
filler@godaddy.com
Signed in as:
filler@godaddy.com
We are pleased to offer our Milepost Locator API that will allow you to incorporate real-time mile markers into your own applications. Milepost Locator converts a geographic coordinate to a highway mile marker. With a simple input of latitude and longitude, this API will output the milepost to the nearest 0.01 miles, highway number or name, highway classification, state, and county.
Mile markers function like an address along a highway. This API performs a reverse geocode for highway mile markers.
Most dispatch software has reverse geocode capability for addresses, converting a callers gps location into a local address that be used to help communicate their location to other parties.
Milepost Locator API works similarly, but for mile markers. Fast, convenient, automatic display of precise mile markers can be added to the user interface without having to guess or pan around in the map view when time is of the essence. This is a common means of communication for incidents or issues along a highway and useful for record keeping.
Call the /milepost endpoint. This endpoint makes an HTTP GET request to retrieve information related to a specific geographical location. The request is required to include the "latitude" and "longitude" as query parameters. Upon a successful request, the server will respond with a status code of 200 and a JSON object containing the result data in an array format.
You may also add "state" as an optional query parameter. If you do not know which state the coordinate is in, omit this parameter. If you do know which state the coordinate is located in, including this parameter will greatly improve response latency. Use the 2 letter state abbreviations only.
Postman Sample GET call
The API will respond with the mile marker on all routes within 1 mile of the location sent. The order of routes will be sorted by the closest marker. Most often the closest marker (listed first) is on the route you are interested in. However, if the location is off of the roadway or is near the intersection of 2 or more routes, you will need to incorporate your own logic to determine which route(s) you desire or display all of the available choices to the end user (recommended). The API only evaluates a single location with each call. It is not tracking the movement of multiple locations.
The location call will receive a mile marker response up to 1 mile from the nearest roadway. The response will be blank if the location is more than 1 mile away. The mile marker response will be measured along the roadway and perpendicular to the alignment if the location is off of the roadway. The API is not just a basic interpolation of whole miles, it is mapped to the roadway for better precision.
The mile marker will not show a negative number. If the location is within 1 mile prior to the start of a roadway, the mile marker will simply be 0.00 or whichever is the lowest value of mile markers on that roadway.
Very few mile markers are precisely 1.00 miles apart. Mile markers are references and not survey monuments. Most, however, are within 0.9 and 1.1 miles apart, but there are many outliers greater than this distance. The intermediate distance shown between markers is prorated base upon the actual distance between the physical markers. For example, if mile marker 1 and mile marker 2 are 0.80 miles apart, halfway between these markers will show as mile marker 1.50. It does not count up from 1.00 to 1.80 and jump to 2.00.
The response classifications are as follows:
I = Interstate Highway
US = US Highway
S = State Highway
PT = Parkway or Turnpike
L = Local Road
If a Parkway or Turnpike also has an Interstate designation, the response will only show the Interstate designation. There are a handful of exceptions to this, such as NJ Turnpike is shown instead of the portions of I-95 that overlap the turnpike.
The response includes the route number or route name.
A direction response of N, S, E, or W may be included with the result. These direction values are only to differentiate the mile marker sets on a divided highway where available. It is NOT intended to indicate which direction of the highway the user is traveling on. Do not use this as the direction for dispatch on a divided highway. In most cases, the mile markers of opposing directions on a divided highway will be within a few hundredths of each other. Not every divided highway has dual direction data available in the API at this time and the direction value may be blank.
The response includes a 2 letter designation for all 50 states and the District of Columbia.
The response includes the county of the location. At this time, county boundaries are accurate to the nearest whole mile. We will continue to update and improve these to the nearest 0.01 mile marker over time. For example, if mile marker 5 is in County A and mile marker 6 is in County B, marker 5.00 to 5.50 will show County A and markers 5.51 to 6.00 will show County B. The actual boundary may be mile marker 5.34. Some highways have been updated with 0.01 mile county boundary accuracy, but it is not included for all highways yet. For more detailed information on which routes have higher accuracy, please feel free to contact us.
There are 100's of thousands of miles in the system. We do our best to maintain accuracy, but markers get moved or often knocked down. If you encounter differences, please let us know and we'll get it updated as soon as possible.
We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.