^

A more user-friendly OpenLayers 3 – Report from the CodeSprint in Schladming, Austria

Last week (March 29 – April 5), ten developers from various companies met for a CodeSprint in Schladming, Austria, under the motto “Making OpenLayers 3 more user-friendly.”

Group photo of the participating developers
Group photo of the participating developers
A. Hocevar, B. Harrtell, P. Pridal, V. Malaret, G. Beraudo, É. Lemoine (top, from left to right), M. Jansen, T. Schaub, B. van den Eijnden, T. Sauerwein (bottom, from left to right)

At this point, we would like to present the work done during this CodeSprint:

  • For about half of all methods available in OpenLayers, an introductory sentence will now appear in the API documentation, explaining the meaning and purpose of the respective method. Until the release of the next version (end of April/beginning of May), we will strive to document all methods with more prose text.
  • As part of a comprehensive discussion on the external interface (API), we have marked many methods as ‘stable’ and, where it seemed appropriate, the API has also been supplemented with auxiliary methods (e.g. to simplify working with different projections: e.g. ol.proj.fromLonLat()).
    In the aftermath of the sprint, profound changes to the API could also be implemented. Here, for example, is the simplified Vector-API and the removal of unspecific code (such as two-way-binding and binary formats) to name a few.
  • Further prose documents have been contributed to the project: A FAQ document as well as tutorials explaining how to compile OpenLayers with your own code or create your own Standalone OpenLayers builds. A migration document for users of version 2.x has been started, but is not yet complete. To create your own OpenLayers builds, we have also started to develop a web service that conveniently provides your own build at the touch of a button. A publication is also expected here in parallel with the next release.
  • Screenshot of the build tool
    Screenshot of the build tool
  • In the future, the homepage and the API documentation will appear in a uniform look and the contents of the homepage and the README document have also been revised to make it easier to find your way around.
  • The examples have been fundamentally revised. All are now generated via a template, so that the examples are consistent in layout and structure. Furthermore, a formatted block appears below the example, listing the source code of the example. This can be copied to the clipboard at the touch of a button or alternatively (also via) button to a jsFiddle. This enormously simplifies the editing of the example.
  • Examples have been supplemented with useful functions
    Examples have been supplemented with useful functions
  • If necessary conditions for methods to function as expected (so-called assertions) are not met, OpenLayers will now in any case output a hopefully helpful error message. This should simplify the narrowing down of the original error. Still in OpenLayers v3.4.0, in such a case, only a partially unspecific error was thrown here, which contained no further information.
  • In addition to the automated test suite, there are now also automated test coverage values (istanbul-js and coveralls). Test coverage describes in a simplified way how high the coverage of the source code of the library (functions, conditions, etc.) is through tests. So we now know not only (for example, for pull requests via Github) that our tests of the library have been successfully completed, but also which areas of the library are already well covered with tests and where there is still room for improvement.
    HTML TestCoverage-Report
    HTML TestCoverage-Report
    Evaluation of coverage information for pull requests
    Evaluation of coverage information for pull requests

    Even before we had concrete figures on actual test coverage, we knew, for example, that the various renderers of the library have too few tests. Here we now have the possibility since the sprint to compare actual rendering results (i.e. graphical representations of geographical features) with reference images.

  • The work regarding the drawing of lines and polygons using WebGL has not yet flowed back into the main development branch. Presumably, more work needs to be invested here before these changes can flow back. However, the results are already remarkable!
  • Lines and polygons rendered via WebGL
    Via WebGL rendered lines and polygons
  • We have also reviewed, commented on and, if necessary, let some longer-standing pull requests from other contributors flow back into the main development branch.
  • For further and detailed information, all changes/changesets of the CodeSprint can be found at this link and the official report of the event can be read on the OpenLayers Blog.

Conclusion: A lot has been achieved at the CodeSprint and the project was able to carry over some of the drive into the time after Schladming, as numerous subsequent changes in the repository prove.

We would like to express our sincere thanks to the sponsors of the event, who either sent developers or contributed to the success through financial support: Boundless, Camptocamp, FOSSGIS e.V., Klokan Technologies, Planet Labs, Sweco and also terrestris.

A more user-friendly OpenLayers 3 – Report from the CodeSprint in Schladming, Austria