Example Code

Reading Coordinates Information from Yahoo! Maps Web Services Using HTTP Client VIs

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
To use the GET.vi from the HTTP Client Palette to retrieve data from Google map service web service

Description:
This example shows you how to use the GET.vi from the HTTP Client Palette to retrieve data from Yahoo's map service web service.  This was done in a previous example using DataSockets, but I wanted to show how this was done using the new for 2009 HTTP Client VIs.

Steps to implement or execute code
To implement this example:

  1. Fill out the Information of the Street, City and State as needed
  2. Run the VI
  3. (Optional) Turn on the Highlight Execution to see the flow of the VI


To execute this example:

  1. Install the required software.
  2. Open the VI and refer the Implement Steps


Requirements
Software
LabVIEW 2012 or compatible

Hardware
-

 

fp.JPGbd.JPG

**This document has been updated to meet the current required format for the NI Code Exchange.**

Justin Parker
National Instruments
Product Support Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
KrisnaWisnu
Member
Member
on

Hi Justin,

I can't seem to get your example work. Is it because Yahoo has shutdown the service?

Certified LabVIEW Developer (CLD)
Certified TestStand Developer (CTD)
Using LabVIEW 8.5.1 (2008) to LabVIEW 2021
Justin_P
NI Employee (retired)
on

Hi Krisna,

You care correct, the service was shut down.  It looks like it has been down since Sept.  Too bad this was a fun example.  Maybe I'll get a chance to do the same thing with Google's.  Thanks.

Justin Parker
National Instruments
Product Support Engineer
KrisnaWisnu
Member
Member
on

I do agree, I've learnt a lot from your example. Thanks nevertheless.

Certified LabVIEW Developer (CLD)
Certified TestStand Developer (CTD)
Using LabVIEW 8.5.1 (2008) to LabVIEW 2021
Justin_P
NI Employee (retired)
on

To do the samething with Google take a look here.  They show the example url "

http://maps.googleapis.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true_or_false". From here you can query a street address and parse the results similarly.

Justin Parker
National Instruments
Product Support Engineer
Justin_P
NI Employee (retired)
on

I remade the example calling Google's web service here: https://decibel.ni.com/content/docs/DOC-20762

Justin Parker
National Instruments
Product Support Engineer
timtamslam
Active Participant
Active Participant
on

If you try to open this example in LabVIEW 2009 and 2009 SP1 the HTTP Get.vi does not actually exist because it wasn't included yet in the 2009 Library. The HTTP Client VI's weren't introduced until LabVIEW 2010. If you were to open this VI in LabVIEW 2010 or higher the VI should load without a missing dependency for the GET.vi.

Tim A.