Quintiq file version 2.0
|
#parent: #root
|
StaticMethod GenerateGeocodeURL_MapQuest (String street, String city, String state,
|
String postalcode, String country) as String
|
{
|
#keys: '1[103546.0.182071447]'
|
Description: 'Generate MapQuest specific geocode request URL based on the supplied address'
|
TextBody:
|
[*
|
// boon kiat Nov-20-2013 (created)
|
url := "/geocoding/v1/address?" +
|
"key=" + LibOSM_GeocodingServer::MapQuestDeveloperKey() +
|
"&callback=renderOptions&outFormat=xml&inFormat=xml" +
|
"&xml=<address><location>";
|
|
// Eliminate the case where both house number and street are not specified
|
if( street.TrimBoth() <> '' )
|
{
|
url := url + "<street>" + street + "</street>";
|
}
|
|
if( city <> '' )
|
{
|
url := url + "<city>" + city + "</city>";
|
}
|
|
if( state <> '' )
|
{
|
url := url + "<state>" + state + "</state>";
|
}
|
|
if( postalcode <> '' )
|
{
|
url := url + "<postalCode>" + postalcode + "</postalCode>";
|
}
|
|
if( country <> '' )
|
{
|
url := url + "<country>" + country + "</country>";
|
}
|
|
url := url + "</location><options><thumbMaps>false</thumbMaps></options></address>";
|
|
return url;
|
*]
|
}
|