Build your own Sensr Apps using the Javascript Client

Sensr.net is committed to making your image data available to you for building your own apps and browser-based mash-ups.  To further this goal, we’ve released our first version of the Javascript client for Sensr.net.  This package makes it easy to call Sensr.net functions from your own webpages.

 

The iframe below is running a Javascript program that illustrates two different operations.  The first paragraph, labeled “Cameras” shows a list of the first ten cameras from Sensr.  For each camera, we’re showing the latest image, and printing the camera’s name and title. These images are constantly updated!  If you update the page, you’ll view more recent images.

The second paragraph, labeled “Hours of the Day” is listing the 24-hours of the current day for “Camera 6.”  Here, you’ll notice that the times are printed in UTC (a.k.a. Greenwich Mean Time).  You can also notice that the list of hours shows a nice progression from night to day and back to night.

<p>Your browser does not support iframes.<br /> </p>

The Javascript client provides complete access to all of the public cameras on Sensr.net. There are functions for exploring images by day, by hour or by month. If you want to get fancy, you can use Facebook authentication to view images on your own private cameras, or protected images on your friends’ cameras.

 

Reading More:
If you’re a programmer, we hope this article has picqued your interest. The Javascript API client is simple, but is complete enough that Sensr has built its entire Sensr Touch Web-app on it using HTML5. The best way to get started is to look at the source of the demo page and then look at the source of our Web-app. Then copy the demo page and start hacking!

 

Our API documentation is the next place to read some more of the details of our Javascript client here: file.JAVASCRIPT.html. That page describes some of the nitty-gritty details and we work pretty hard to keep it up to date. 

Have fun with our images! Think about using a Sensr.net image any time you need to display some dates or times. It’s likely that Sensr.net has a corresponding image for any timestamp you’ve got. We can help liven up calendars with imagery from stationary cameras around the world. Mash it up!