YouTube fun with custom tools

Aug 26, 2011   //   by Dan V   //   Other  //  3 Comments
Not UsefulUseful (No Ratings Yet)
Loading ... Loading ...

I’ve always liked the InfoSymbols with states sample provided by the Esri ArcGIS API for Flex site and have wanted to use it in Dekho for a while. Then while I was searching for some videos on YouTube I realized combining the InfoSymbol with states sample and a graphical search for YouTube videos in Dekho would be a nice combination.

YouTube search results.

The tool is available for download on the Dekho Resource Center download page and works out of the box with Dekho 3.2.1. However, if you are running an earlier version of Dekho and just can’t live without the tool, get in touch with support and they can help set it up.

 

How to use the tool

The tool is simple enough to use. Once it’s launched and the form has displayed you can enter optional keywords to include in the search for videos. Multiple keywords separated by a space can be used in addition to the Not (-) and OR (|) symbols to further filter the results. YouTube’s search functionality finds videos by matching the keywords to a video’s metadata (title, keywords, description, authors’ usernames and categories).

Keyword example: “emergency –fire” This will find all videos with metadata containing the word emergency while also exclude videos with the word fire.

The tool allows the user to set how many results are returned by setting a slider value. The tool is limited to a maximum number of 50 results per page and only displays the first page of results. This area of the tool can be expanded in many ways as a request for YouTube videos can return a large number of pages.

The last option provided by the form is a time based filter. It allows the user to request videos uploaded within a certain time frame.

Once all the non-graphical filters have been entered the last step is to filter the videos with a graphic search area. To do that simply click on the forms Find button, next define an area on the map by pressing down on the mouse button while over the map, drag the mouse to a new area and then release the mouse button.

YouTube search request.

A request is then sent to YouTube and the results plotted on the map using an InfoSymbol. The InfoSymbol is interactive and if you mouse over it the symbol it will stretch to show the video’s title. If the mouse pointer is left over the video’s title a tooltip displays the video’s description. Clicking on the expand button at the end of the title area shows the video. The video is set to play automatically once it has loaded. The bottom of the InfoSymbol, when expanded, contains a few buttons to pause, stop and play the video.

 

How the tool works

When uploading a video to YouTube there is an option to add the location of where the video was filmed. The coordinates must be in WGS-1984 which means all requests for videos based on their location must also be in WGS-1984.

Dekho has the ability to display maps in many Coordinate Systems so the tool needs to project the users defined search area to WGS-1984. Needless to say the results from YouTube are returned in WGS-1984 so they also need to be projected to the same coordinate system as the map.

Once the resulting points are projected it’s a simple matter of adding the InfoSymbol to the points which are then added to the map.

 

Final notes

Warning: This tool can be very addictive. If you deploy this custom tool in your Dekho environment try not to waste too much corporate time and stick to work related videos.

Of course the source for this tool is provided on the Dekho Resource Center download page. It can be modified to work with any location aware videos or other social media. This tool would be a great way for organizations to find and review their media data.

The tool was created by combining existing Dekho sample custom tools, the Esri InfoSymbols with states sample and YouTube API documentation.

 

3 Comments

  • nice tool Dan
    Works really well – both the tag search and the geo search

    I’ve noticed that I am unable to close the modal window. I get an Info message;

    custom tool
    http://myserver:8080/dekhotools/youtube/YouTube.swf not found.

  • Sounds like a configuration issue as we have the tool installed on a few different machines at this end with no issue. Although custom tools are not supported, I would give support a try and see if they can point out where you have gone wrong. Possibly a browser issue or a compatibility issue.

  • I find it helps to use the fully qualified url instead of the /folder/file.swf in the parameters field in the tool properties.

    Works ok on version 3.2.3!

Leave a comment