My latest contribution to the Share, our BCDN shared code repository, is a library that wraps the Yahoo Geocoding API.
Yahoo provides an excellent API for getting the latitudes and longitudes of US-based addresses, which is an extremely helpful service for anyone working with the GoogleMap control in Bungee Connect. With the library now available, you can include the code in your own Bungee Connect solutions and use a single, simple function to get lats and longs for an address.
If you import the library into a new solution, you can simulate the example application in it to test the library. Since importing provides you with my complete source code, this also makes a good resource for understanding how to call a RESTful web service and convert its response into objects using our restUtility helper class.
In order to use the library, follow these steps in Bungee Connect:
- Either create a new solution, or open an existing solution.
- Select the solution in the Solution Explorer. (It’s the top-level container.)
- Click the Modify Dependencies button.
- In the Modify Dependencies dialog, click the Share tab.
- Locate YahooGeocodingAPI and add it to you list of imports.
- Select Import so that you can to look through the source code and run the sample app.
Once you have done that, the project notes will come up and explain how to use the library further.