Skip to content

Releases: openlayers/openlayers

v3.13.0

20 Jan 14:41
Compare
Choose a tag to compare

v3.13.0

Summary

The v3.13.0 release includes features and fixes from 68 pull requests since the v3.12.1 release. New features and improvements include:

  • Improved tiles rendering for the canvas renderer
  • Improved MapQuest rendering
  • Add color option to ol.style.Icon
  • Load TileJSON sources via XMLHttpRequest by default
  • Add new ol.geom.LineString#getCoordinateAt function
  • Simplify meters per unit handling
  • Use ESLint as a replacement for gjslint.py and jshint

Upgrade notes

proj4js integration

Before this release, OpenLayers depended on the global proj4 namespace. When using a module loader like Browserify, you might not want to depend on the global proj4 namespace. You can use the ol.proj.setProj4 function to set the proj4 function object. For example in a browserify ES6 environment:

import ol from 'openlayers';
import proj4 from 'proj4';
ol.proj.setProj4(proj4);

ol.source.TileJSON changes

The ol.source.TileJSON now uses XMLHttpRequest to load the TileJSON instead of JSONP with callback.
When using server without proper CORS support, jsonp: true option can be passed to the constructor to get the same behavior as before:

new ol.source.TileJSON({
  url: 'http://serverwithoutcors.com/tilejson.json',
  jsonp: true
})

Also for Mapbox v3, make sure you use urls ending with .json (which are able to handle both XMLHttpRequest and JSONP) instead of .jsonp.

Full list of changes

Read more

v3.12.1

17 Dec 15:38
Compare
Choose a tag to compare

v3.12.1

Summary

The v3.12.1 release is a patch release that addresses a few regressions in the v3.12.0 release. See the v3.12.0 release notes for details on upgrading from v3.11.

Fixes

v3.12.0

15 Dec 10:59
Compare
Choose a tag to compare

v3.12.0

Summary

The v3.12.0 release includes features and fixes from 71 pull requests since the v3.11.2 release. New features and improvements include:

  • Tile coordinate wrapping for raster reprojection.
  • Support for multi-line labels.
  • Allow rendering geometries to an arbitrary canvas (useful for vector legends).

Upgrade notes

ol.Map#forEachFeatureAtPixel changes

The optional layerFilter function is now also called for unmanaged layers. To get the same behaviour as before, wrap your layer filter code in an if block like this:

function layerFilter(layer) {
  if (map.getLayers().getArray().indexOf(layer) !== -1) {
    // existing layer filter code
  }
}

Full list of changes

Read more

v3.11.2

19 Nov 20:07
Compare
Choose a tag to compare

Summary

The v3.11.2 release is a patch release that addresses a few regressions in the v3.11.1 release. See the v3.11.0 release notes for details on upgrading from v3.10.

Fixes

v3.11.1

12 Nov 23:52
Compare
Choose a tag to compare

Summary

The v3.11.1 release is a patch release that addresses a few regressions in the v3.11.0 release. See the v3.11.0 release notes for details on upgrading from v3.10.

Fixes

v3.11.0

11 Nov 22:34
Compare
Choose a tag to compare

Summary

The v3.11.0 release includes features and fixes from 73 pull requests since the v3.10.1 release. New features and improvements include:

  • Support for raster reprojection - load raster sources in one projection and view them in another.
  • Support for Mapbox Vector Tiles!
  • Improved KML support, GeoJSON & TopoJSON fixes, and much more. See below for the full list.

Upgrade notes

ol.format.KML changes

KML icons are scaled 50% so that the rendering better matches Google Earth rendering.

If a KML placemark has a name and is a point, an ol.style.Text is created with the name displayed to the right of the icon (if there is an icon).
This can be controlled with the showPointNames option which defaults to true.

To disable rendering of the point names for placemarks, use the option:
new ol.format.KML({ showPointNames: false });

ol.interaction.DragBox and ol.interaction.DragZoom changes

Styling is no longer done with ol.Style, but with pure CSS. The style constructor option is no longer required, and no longer available. Instead, there is a className option for the CSS selector. The default for ol.interaction.DragBox is ol-dragbox, and ol.interaction.DragZoom uses ol-dragzoom. If you previously had

new ol.interaction.DragZoom({
  style: new ol.style.Style({
    stroke: new ol.style.Stroke({
      color: 'red',
      width: 3
    }),
    fill: new ol.style.Fill({
      color: [255, 255, 255, 0.4]
    })
  })
});

you'll now just need

new ol.interaction.DragZoom();

but with additional css:

.ol-dragzoom {
  border-color: red;
  border-width: 3px;
  background-color: rgba(255,255,255,0.4);
}

Removal of ol.source.TileVector

With the introduction of true vector tile support, ol.source.TileVector becomes obsolete. Change your code to use ol.layer.VectorTile and ol.source.VectorTile instead of ol.layer.Vector and ol.source.TileVector.

ol.Map#forEachFeatureAtPixel changes for unmanaged layers

ol.Map#forEachFeatureAtPixel will still be called for unmanaged layers, but the 2nd argument to the callback function will be null instead of a reference to the unmanaged layer. This brings back the behavior of the abandoned ol.FeatureOverlay that was replaced by unmanaged layers.

If you are affected by this change, please change your unmanaged layer to a regular layer by using e.g. ol.Map#addLayer instead of ol.layer.Layer#setMap.

Full list of changes

Read more

v3.10.1

09 Oct 16:02
Compare
Choose a tag to compare

v3.10.1

Summary

This is a patch release that fixes a regression causing text styles with a fill but no stroke to not be rendered.

v3.10.0

08 Oct 17:44
Compare
Choose a tag to compare

v3.10.0

Summary

The v3.10.0 release includes features and fixes from 66 pull requests since the v3.9.0 release. New features and improvements include:

  • Full touch gesture support for the Microsoft Edge browser.
  • Improved API docs - required constructor options are now marked as such.
  • Text styles (vector labels) now work with defaults instead of failing when only a label text is set.
  • Write support for GML3 features with multiple geometries

See the complete list below for details. And see the following notes to know how to upgrade from v3.9.0 to v3.10.0.

Upgrade notes

ol.layer.Layer changes

The experimental setHue, setContrast, setBrightness, setSaturation, and the corresponding getter methods have been removed. These properties only worked with the WebGL renderer. If you are interested in applying color transforms, look for the postcompose event in the API docs. In addition, the ol.source.Raster source provides a way to create new raster data based on arbitrary transforms run on any number of input sources.

Removal of legacy Internet Explorer support

If you are building an appliction that supports Internet Explorer 8 or older, you'll need to use ES5 shims to make OpenLayers work. As before, support for such old browsers is very basic, and we recommend to not support them.

New features and fixes

Read more

v3.9.0

10 Sep 09:23
Compare
Choose a tag to compare

v3.9.0

Summary

The v3.9.0 release includes features and fixes from 62 pull requests since the v3.8.2 release. New features include:

See the complete list below for details. And see the following notes to know how to upgrade from v3.8.x to v3.9.0.

Upgrade notes

ol.style.Circle changes

The experimental getAnchor, getOrigin, and getSize methods have been removed. The anchor and origin of a circle symbolizer are not modifiable, so these properties should not need to be accessed. The radius and stroke width can be used to calculate the rendered size of a circle symbolizer if needed:

// calculate rendered size of a circle symbolizer
var width = 2 * circle.getRadius();
if (circle.getStroke()) {
  width += circle.getStroke().getWidth() + 1;
}

New features and fixes

v3.8.2

07 Aug 16:48
Compare
Choose a tag to compare

Summary

This is yet another patch release that corrects the URL for builds shown in the examples. Details below.