Wednesday, June 29, 2011

HTML5 and maps

For the unwary it may come as a big surprise - HTML5 is here! More and more online mapping applications are implemented in HTML5 standard, taking advantage of <canvas> element to extend the functionality and presentational capabilities in a browser environment. All modern browsers now support the standard.

The canvas element allows for dynamic, scriptable rendering of 2D shapes and bitmap images. Below is an example that illustrates the benefit of using <canvas> element in browser based mapping applications. This map allows users to specify a minimum terrain height parameter at which to display the layer and the layer is redrawn dynamically to display the information on the map.

With the support for SVG just implemented in Internet Explorer 9, there are now two complementary approaches to drawing objects in all modern browsers: <canvas> and SVG. It is best to think about <canvas> as akin to “raster” and SVG as “vectors”. This way it is easier to decide which approach is more suitable for a specific purpose.

First spotted on: Google Maps Mania

Related post: Is SVG ready for comeback?

Tuesday, June 14, 2011

Weather widget take 3

This week I released another version of a free weather widget with information on current temperatures and weather forecast for close to 200 locations around Australia (as in the right navigation panel of this blog). It is powered by the same database as the second version of the widget but information is presented differently to make the widget more suited for blogs and blog-like websites. For detailed instructions on how to set it up on your site please visit

The latest weather information is from a local database that is updated twice an hour from official data and web services provided by the Bureau of Meteorology. Unfortunately, it is not possible to match all localities for which the Bureau releases forecasts with locations of weather stations hence not all selections display current temperature. Similarly, not all localities have a weather forecast for more than just a single day.

The widget displays weather information for a single location at a time and the default location is Sydney. Webmasters can easily set the preferred location by adding a reference code of that location at the end of the widget’s URL address. End users can change the displayed location by clicking on the location name and selecting an alternative location from a drop-down list. One to seven day weather forecast information for a specific location can be accessed by clicking on “This week” link in the top right corner of the widget. Weather description for individual days of the week can be obtained by moving a mouse over the weather icons.

Version 2 of the weather widget became quite popular. It now has over 200,000 displays/loads a month (and close to 1M page views, by 38,000 unique visitors) and brings a steady flow of traffic to home page. I hope this version becomes equally popular and widely used. Any feedback greatly appreciated.