Flickr Google Maps example code now available

Some time ago I promised to release the code for the Flickr Google Maps example. I’m pleased to say that now you can import this code into any solution and see how I built this app.

The app was rather simple to build. Part of the delay in delivery was that I was updating the code to use the new RESTUtil to make it even simpler. It takes only one line of code to get pictures from Flickr. All you need to do is pass in the URL, the type that is returned and a collection to hold all the picture results. I left a few function calls using the other method so you can compare the two ways of calling a REST service, look at the notes on the “main” class for the specific functions.

Something I learned in creating this app is how to have controls show/hide based on the state of any field. I used this to hide the photo/map tabs when a photo didn’t have any geodata. Basically, there is a boolean in the Photo type which is true if there is geodata. Then, on the field which the tab list was bound to I set the “State” property to point to that bool. I did the same for info/comments tabs. This simple change saved me from creating a bunch of different forms for each case.

To import this app all you need is:

1. A Bungee Connect account

2. Import the Flickr Google Maps code from the Example code section of the Home Tab of the Builder.

3. Enter your Flickr API key as the default value of the apikey field in the Identity class (flickr project).

4. Open and simulate the form MainForm in the Main class (inside the FlickrGoogleMaps project).

There are more details available through the notes on the Main class. To view the notes right-click on the Main class and select “View Notes”.

Send me an email (brad AT bungeelabs DOT com) if you have any questions or if you want to share something that you have built.


Leave a Comment