hongjli
2025-01-13 ce0d8664c91f8522c95a960b55c2d29cfeb4cab7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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;
  *]
}