Yahoo! Weather API Flex Mashup
Integrating Yahoo Weather results with local live camera stream
Categories: FlexHere's a neat little Flex app I created that combines a live local camera stream with Yahoo! weather results. The need for this came about as a result of a previous weather.com Cold Fusion module not functioning anymore, and I wanted to see if it could be done in Flash to give it a bit more pizzazz.
As before, Yahoo! comes through with a Flash API that can deliver local weather results. I used the ASTRA Actionscript 3 API which contains the Weather and Weather Results class. In this mashup, I combined the results from the Yahoo! Weather Results class and a local live stream from a web camera. The only drawback is that the webcam is a network IP camera which does not contain a crossdomain.xml file, so Flash gives me a security sandbox error and will not pull the image feed. My workaround for this was to have a local server go out and fetch the current image and save it locally, then Flex just grabs the latest image on the server. Not the most elegant solution, but it works for this project. Ultimately, it would be nice to have the IP camera stream right into Flash Media Server, and pull the live stream into Flex. This would give you full motion live video, and not look like the old webcam sites from 1998. On a side note, I also incorporated Degrafa into this project to make some easy overlays on top of the live image, and used my own forecast weather icons instead Yahoo's default ones.
Live project here.
Source code here.
-Christopher C. Keeler
Yahoo! Maps Flex/AS3 API
Flash mapping made easy
Categories: Flex
Recently, I got involved in a project to create a dynamic mapping application, and found a great little Actionscript 3 API from Yahoo! Maps. Written by Zach Graves, this API allows you to create dynamic Flash based mapping applications, and when coupled with Yahoo! Local search requests, it becomes a sort-of digital concierge for the local area. The Flex app I created marks a specific location on the map via a geocoded address, and then does a Yahoo! Local search for nearby Hotels, Restaurants and Other Points of Interest within a 25 mile radius. I also added a custom search text box (thanks Doug McCune for the prompting textInput in flexlib!) on the legend to find specific business by name. i.e. Best Buy, Wal-Mart . There are still a few more things I am planning to add, but this will give you an idea on how to integrate the Yahoo! Maps API into your next Flex project.
The live app is here.
Souce Code here.
-Christopher C. Keeler