Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Query google maps

Participant ,
May 12, 2009 May 12, 2009

I am trying to get a response from google's maps api with code.  I get the result I want when I paste something like http://maps.google.com/maps/geo?q=40.714224,-73.961452&output=xml&oe=utf8&sensor=false&key=mykey123 into a browser.

But I want to do it with cf code.

The result is returned in xml format.

TOPICS
Advanced techniques
486
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 12, 2009 May 12, 2009
LATEST

Figured it out

<!--- Set the query path --->
<cfset qmap=http://maps.google.com/maps/geo?q=40.714224,-73.961452&output=js&oe=utf8&sensor=false&key=123>
<!--- Use cfhttp to get the info from google maps --->
<cfhttp method="get"
url="#qmap#"
resolveurl="no">
</cfhttp>

<cfset string=#cfhttp.filecontent#>

<cfdump var="#string#">

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources