//***************************************************************************************** //*** *** //*** Mapquest_geocode, version 1 *** //*** intended as a demo script, it can be used to transform lists into *** //*** JSON elements for Mapquest REST calls *** //*** The results of the calls will be translated back into lists *** //*** *** //*** Author: Bernd Heinen, SAS Institute, June 2020 *** //*** *** //*** Please read the disclaimer at the bottom of this code. *** //*** *** //***************************************************************************************** Mapquest_geocode = Function( {acckey = "", sf = 0, adl = {}, ctl = {}, stl = {}, cil = {}, pcl = {}, srl = {}, rowstl = {}, debug = 0, progrtotalr = 0}, {urlep, boundb, thumbmap, maxres, addrmode, ctry, street, pc, city, state, gcres, parmmat, parsemsg, httpcode, httpmsg, captxt, resplst = {}, msglst = {}, latlst = {}, longlst = {}, qlst = {}, ctrycdlst = {}, statelst = {}, districtlst = {}, postalclst = {}, citylst = {}, streetlst = {}, position, actstate, errorflag = 0}, parmmat = Matrix( Eval List( {N Items( adl ), N Items( ctl ), N Items( stl ), N Items( cil ), N Items( pcl ), N Items( srl )} ) ); If( debug, Show( parmmat, V Sum( parmmat ) ) ); If( V Sum( parmmat ) == 0, id = New Window( "Interface Declaration Geo Coding", <=1 indicates that each complete address is in one single text string. A value of 0 (default) indicates that each address is composed of several fields, e.g. Country, City, Street.", <