Sponsored Links

Technical Overview: OpenScales PDF Print E-mail
Written by Richard Marsden   
Monday, 19 April 2010 06:36

OpenScales is an open source mapping framework for ActionScript 3 and Flex. Supporting a range of OGC data protocols, it has many similarities to the OpenLayers framework but uses Flash rather than JavaScript. The combination of Flash, 'tweening', and fast data providers results in a smoother, more compelling user experience - remniscent of Bing Map's new Silverlight control.

 

The similarity between OpenScales and OpenLayers is not a coincidence. OpenScales was initially created from FlexLayers, a Flex port of OpenLayers called FlexLayers. Although OpenScales does not have exactly the same interface as OpenLayers, the similarities are such that an OpenLayers developer should be able to quickly develop working applications.

OpenScales is currently at v1.1, and currently supports Adobe's ActionScript 3, Flex, and AIR platforms. It is distributed under the LGPL license.

In common with OpenLayers, the architecture is based around layers which can support a range of data layers. These include:

  • FeatureLayer - Allows individual geographic features to be 'drawn'
  • ImageLayer - Bitmaps
  • WMS - OGC Web Mapping Services
  • WFS - OGC Web Feature Services
  • KML - Keyhole Markup Language
  • Mapnik - Mapnik OpenStreetMap layers
  • CycleMap - OpenStreetMap Cycle Map layers
  • Osmarender - OpenStreetMap Osmarender layers

 

Support for OGC web services is to be expected in a modern open source web mapping client, and is served with support for both WMS and WFS. Of particular note is the strong support for a range of different OpenStreetMap web services.

OpenScales also supports a range of controls and components. These include the 'essentials' (ie. layer switching, zoom/pan, overview map, scalebar), as well as a drawing toolbox, cursor position, spinner, and traceline (log display). The drawing toolbox is a useful addition, as this is a common 'how do I?' query on the support forums for most other web mapping systems.

Planned future releases include support for WMS 1.3, GML 3, and AMF3 vector support, and 3d support. 3d could be an interesting addition, although suitable data might be scarce.

So what does it look like? Here is a demo of the WMS-C GetFeatureInfo request from the OpenScales samples:

WMS-C GetFeatureInfo demo for OpenScales

 

This map can be navigated using the standard zop & pan. Note the scalebar in the lower right, and the current mouse coordinate in the lower left. A location has been selected in Lower Manhattan (the yellow square), and a pop-up window shows information about it (it is a church).

Here is the code that produced the above map:

ERROR [include_code_listing plugin]: File Not Found (/usr/www/users/winwaed/geowebguru/img/2010/openscales_sample.xml)


Notice that the actual source code is very short. Most of the map is defined as a series of XML records. This makes it very quick and easy to develop a functioning map. Although OpenLayers is very extensible, it typically requires a lot more code to produce the same effect.

OpenScales is a powerful toolkit supporting most of the features in OpenLayers, plus a few useful ones of its own. Its success or failure is going to depend on the success or failure of the various Adobe web technologies (ActionScript, Flex, AIR), and many in the industry think ActionScript's days are numbered. Despite the simplicity and promise of 3d, I doubt many developers will adopt these technologies just to use OpenScales, but if you are already an ActionScript/Flex/AIR developer, then OpenScales has a lot to offer. Indeed, it is probably your best choice for a range of different applications (eg. ones where you are running own web map services).

Further information, downloads, documentation, and tutorials can be found on the main OpenScales website at http://openscales.org/ .


Last Updated on Monday, 19 April 2010 06:39