Version 0.6.0
Release Notes
New features and API additions
- Completely new tile layer class that moves formally GL specific code into core
- Maps no longer require GL or even a base layer
- Support for SVG and HTML rendering for tile layers
- Support for arbitrary PROJ4 projection strings
- Support wrapping tiles both horizontally and vertically for periodic images
- Tiles can be an arbitrarily sized rectangle
- Hooks for dynamically generated tiles rather than just static images
- The definition of "zoom level" is now consistent with the use in other libraries
- New camera class used to keep track of the visible area and world to image space conversions
- General support for image pyramids through the tile layer (including medical imaging)
- Choropleth feature type
- New API for widgets
- New example showing off the features available for tile layers
- GeoJSON reader now supports Polygon and Multipolygon geometries
- Layers can now be reordered dynamically
- Added a new mouse event (
click
) that detects mouse clicks on the map canvas - The map interactor can be disabled temporarily to cede control of the mouse and keyboard events to external handlers
- Support for subdomains in tile url template strings
- Opacity controls are now supported by all layer types
- Map "origin" parameter provides a fixed offset for world coordinates to support higher precision at high zoom levels
- New map option (
clampZoom
) to limit zoom levels to a given range - New
osmLayer
option (tileRounding
) to control which tiles are loaded at non-integer zoom levels
API changes
- Web mercator (
EPSG:3857
) coordinates are now in units of meters rather than degrees - Lower resolution tiles are loaded before high resolution tiles
- Creates the perception of faster load times
- Greatly reduces the occurrence of background visibility while tiles load
- Removed the per-layer geographic projection attribute (
layer.gcs
) that was never fully implemented- Every layer is now expected to render in the map's world coordinate system
- Feature layers can define a "local" coordinate system that is used internally
- Tile layers have an additional coordinate system defined for each displayable zoom level
- Removed
geo.mercator
in favor of a generic projection class based on PROJ4 - Tile URL template strings now use the more common curly brackets (
{x}
) rather than angle brackets (<x>
) - Nearly all of the internals of the
osmLayer
Performance
- A tile fetch queue now prioritizes downloaded tiles by what is currently in view
- Mouse event handlers are now throttled to fire at most every 30 ms
- Compiled GL shaders are now cached and shared between features
- Configurable tile cache size
Testing
- A new library of "mocked" classes has been started to mock interfaces between the classes inside unit tests.
- All new core classes have unittest coverage over 80% and many more classes now have coverage over 50%
File | Cov | File | Cov | File | Cov |
---|---|---|---|---|---|
event.js | 100.0% | tileLayer.js | 96.2% | mapInteractor.js | 79.7% |
osmLayer.js | 100.0% | tile.js | 96.1% | renderer.js | 71.4% |
tileCache.js | 100.0% | object.js | 90.4% | layer.js | 70.8% |
timestamp.js | 100.0% | sceneObject.js | 87.3% | featureLayer.js | 69.0% |
version.js | 100.0% | planeFeature.js | 87.0% | init.js | 66.3% |
fetchQueue.js | 100.0% | imageTile.js | 81.8% | map.js | 55.7% |
camera.js | 97.7% |
Infrastructure and building
- Continuous coverage reporting of unit tests submitted to CDash
- VGL submodule removed in favor of inclusion via bower
- Support for installing as the
root
user - Data used for testing and examples are now hosted at data.kitware.com
- The library is no longer built automatically after
npm install
to fix downstream build problems.
Bug fixes
- Setting camera bounds now uses the correct coordinate system
- GeoJSON polygon features no longer rendered as lines
- Discrete zoom now works with touch-like devices
- The
planeFeature
now handles coordinate transformations - Rendering operations (such as loading new tiles) now occur during map navigation and transition events
Known issues
- Several performance problems have been exposed by rendering new tiles during map navigations
- Many garbage collections occur during mouse handlers due to excessive memory allocations
- Shader programs are not shared among tiles so they need to be linked for each tile
Contributors
Huge thanks to all of the contributers, and the many others who tested, created issues, and gave feedback during the development of this release.