[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: HTTPAPI - Retreiving Geography Inforamtion



Looking at the google api, address doesn't have any conditioning
parameters. This address gives me good results:
http://maps.googleapis.com/maps/api/geocode/xml?address=carolina,+al&sen
sor=false

If you set FullAddr to 'carolina,+al' what do you get back. Show the
debug log for that request.

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Patrick
Schooley
Sent: Thursday, October 31, 2013 2:01 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: HTTPAPI - Retreiving Geography Inforamtion

This is the code before:
NameData = CFICtyFulN(CityCode:StateCode:County4);
         // Build full address, city, county, state
         FullAddr = %Trim(Address) + ', ' + %Trim(RtnCityName) + ', ' +
                    %Trim(RtnCntyName) + ', ' + %Trim(RtnStateAbrv); //
Create a URL encoded query string for the API
       Enc = http_url_encoder_new();
       http_url_encoder_addvar(Enc: 'sensor': %Addr(sensor):
%Len(sensor));
       http_url_encoder_addvar(Enc: 'address': %addr(FullAddr)+2 :
                                             %Len(FullAddr));
       LINK = XMLHELPER_getLink('GEOCODE');
       URL = %Trim(LINK) + '?' +
              http_url_encoder_getstr(Enc);
       // Free up the encoder storage
       http_url_encoder_free(Enc);

       // Send the XML request to Google
 
http_get_xml(%Trim(URL):%paddr(StartOfElement):%paddr(EndOfElement):
                    *Null:Timeout);

       RETURN Result#;



Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550
 
------------------------------------------------------------------------
---------------------------
We are trying to find the correct county name for the ones that are
missing county name. I changed the values in FullAddr to only contain
our City and State. I'm thinking that the hard coded 'address' on the
2nd http_url_endcoder_addvar statement might need a value telling the
API that the value is 'City and State' not 'address'.
Internet Broswer Google map search result as an attachment.



-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mike Krebs
Sent: Thursday, October 31, 2013 1:25 PM
To: HTTPAPI and FTPAPI Projects
Subject: RE: HTTPAPI - Retreiving Geography Inforamtion

> My problem is I never get a result even when I can get a result using
a browser for the same location.

Pat, it is really hard to advise you when we don't know what you are
trying to do (some google thing you type in a browser that returns
county?). We still don't know what part of the program you are having
problems with.

Show us what works in the browser. Show us how you are doing it in your
program. Then we can give you some suggestions.

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This e-mail and any files transmitted with it are confidential and
solely for the use of the individual or entity to which they are
addressed and intended. If you have received this e-mail in error,
please notify the sender by return e-mail. If you are not the intended
recipient, you may not read, copy, retain, print, disclose, or
distribute this message or its contents to any other individual, for
such actions may be unlawful. WARNING: We take certain precautions to
prevent viruses, but we are not responsible for loss or damage arising
from the use of this e-mail or attachments.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------