I used the new technique of REST interfaces to create a new geocoding add-in. At its core is the call to the respective REST interface of MapQuest, a company providing lots of routing services and applications. Each one of these services has its own URL, its own format to specify the request and its own format to return the result. This call is encapsulated in the JMP function that I have named MapQuest_rest.jsl. It is available in the JSL Cookbook. If you want to use it, save it somewhere on your computer and “Include” it in your JSL program (Include(“<path>/filename”)). To apply it, use a statement like:
GeoList = queryrest();
You, or any user of your program needs a vlid API-key from MapQuest.
The file itself contains the definition of the function and at the end, a call of the function with an empty parameter list. An empty parameter list always opens this information window:
This function is very general and transparent about the content that you want to use it for. It is only helpful if you are interested in the offerings of MapQuest and the details of the respective interfaces. You need to build or interpret the JSON structures yourself.
I used this function for two different interface calls, one for routing and one for geocoding. Both are made as functions and both are available in the JSL cookbook. Using them does not require any knowledge of HTTP, REST or JSON, since the standard JSL structures like variables and lists are sufficient. The description of the geocoding function is more straightforward than the routing function. Both can be found in the blogs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.