v3.20.1

@tschaub tschaub released this Dec 21, 2016 · 187 commits to master since this release

Summary

The v3.20.1 release is a patch release that addresses two regressions in the v3.20.0 release. See the v3.20.0 release notes for details on upgrading from v3.19.x.

Fixes

  • #6280 - Continue loading tiles when image is not ready yet (@ahocevar)
  • #6283 - Avoid modifying coordinate in forEachLayerAtCoordinate (@tschaub)

Downloads

v3.20.0

@tschaub tschaub released this Dec 10, 2016 · 189 commits to master since this release

Summary

The v3.20.0 release includes enhancements and fixes from 89 pull requests since the previous release.

Among the changes, take a look at the new view.animate() function. This replaces the previous map.beforeRender() and ol.animation functions with more intuitive view animations that allow for chaining together multiple transitions and support a callback on animation end. In addition, two or more maps that share a view will be animated together. See the upgrade notes and the animation example for more detail.

On the subject of view transitions, scrolling with a trackpad or magic mouse now transitions the view resolution smoothly. Instead of jumping to the next integer zoom level, trackpad or magic mouse scrolling can leave the view at a fractional zoom level. In line with this trackpad behavior, pinch zooming on touch devices also now leaves the view at a fractional zoom level (see the upgrade notes for an option to restore the old behavior).

On the rendering front, the Canvas renderer got another overhaul. This release brings back the strategy of rendering to a dedicated Canvas element per layer. If you were experiencing issues with gaps between tiles on rotated views or when zooming, this change should bring rendering improvements.

Also on the rendering front, @GaborFarkas completed a nearly 5 month effort to bring line and polygon support to the WebGL renderer. If you're interested in experimenting with WebGL for vector rendering, use renderer: 'webgl' in your map constructor.

See the full list of changes below. There are some other gems down there.

Upgrade notes

Use view.animate() instead of map.beforeRender() and ol.animation functions

The map.beforeRender() and ol.animation functions have been deprecated in favor of a new view.animate() function. Use of the deprecated functions will result in a warning during development. These functions are subject to removal in an upcoming release.

For details on the view.animate() method, see the API docs and the view animation example. Upgrading should be relatively straightforward. For example, if you wanted to have an animated pan, zoom, and rotation previously, you might have done this:

var zoom = ol.animation.zoom({
  resolution: view.getResolution()
});
var pan = ol.animation.pan({
  source: view.getCenter()
});
var rotate = ol.animation.rotate({
  rotation: view.getRotation()
});

map.beforeRender(zoom, pan, rotate);

map.setZoom(1);
map.setCenter([0, 0]);
map.setRotation(Math.PI);

Now, the same can be accomplished with this:

view.animate({
  zoom: 1,
  center: [0, 0],
  rotation: Math.PI
});

ol.Map#forEachFeatureAtPixel and ol.Map#hasFeatureAtPixel parameters have changed

If you are using the layer filter of one of these methods, please note that you now have to pass in the layer filter via an ol.AtPixelOptions object. If you are not using the layer filter the usage has not changed.

Old syntax:

map.forEachFeatureAtPixel(pixel, callback, callbackThis, layerFilterFn, layerFilterThis);

map.hasFeatureAtPixel(pixel, layerFilterFn, layerFilterThis);

New syntax:

map.forEachFeatureAtPixel(pixel, callback.bind(callbackThis), {
  layerFilter: layerFilterFn.bind(layerFilterThis)
});

map.hasFeatureAtPixel(pixel, {
  layerFilter: layerFilterFn.bind(layerFilterThis)
});

This change is due to the introduction of the hitTolerance parameter which can be passed in via this ol.AtPixelOptions object, too.

Use ol.proj.getPointResolution() instead of projection.getPointResolution()

The experimental getPointResolution method has been removed from ol.Projection instances. Since the implementation of this method required an inverse transform (function for transforming projected coordinates to geographic coordinates) and ol.Projection instances are not constructed with forward or inverse transforms, it does not make sense that a projection instance can always calculate the point resolution.

As a substitute for the projection.getPointResolution() function, a ol.proj.getPointResolution() function has been added. To upgrade, you will need to change things like this:

projection.getPointResolution(resolution, point);

into this:

ol.proj.getPointResolution(projection, resolution, point);

Note that if you were previously creating a projection with a getPointResolution function in the constructor (or calling projection.setGetPointResolution() after construction), this function will be used by ol.proj.getPointResolution().

ol.interaction.PinchZoom no longer zooms to a whole-number zoom level after the gesture ends

The old behavior of ol.interaction.PinchZoom was to zoom to the next integer zoom level after the user ends the gesture.

Now the pinch zoom keeps the user selected zoom level even if it is a fractional zoom.

To get the old behavior set the new constrainResolution parameter to true like this:

new ol.interaction.PinchZoom({constrainResolution: true})

See the pinch zoom example for a complete implementation.

Detailed changes

Downloads

v3.19.1

@ahocevar ahocevar released this Oct 28, 2016 · 562 commits to master since this release

Summary

The v3.19.1 release is a patch release that addresses four regressions in the v3.19.0 release. See the v3.19.0 release notes for details on upgrading from v3.18.x.

Upgrade notes

ol.style.Fill with CanvasGradient or CanvasPattern

The origin for gradients and patterns has changed from [0, 0] to the top-left corner of the extent of the geometry being filled.

Fixes

Downloads

v3.19.0

@marcjansen marcjansen released this Oct 21, 2016 · 599 commits to master since this release

Summary

The v3.19.0 release includes features and fixes from a little more than 120 pull requests with more than 380 commits. Most of the changes are bug fixes, documentation enhancements or target the continuing removal of the dependency on Closure Library. Some notable new or enhanced features are:

  • Vector fills with CanvasGradient or CanvasPattern now move and rotate with the map which is far more intuitive (#5950)
  • Drawing in freehand-mode also became more intuitive (#5970, #5973, #5975)
  • When tiles of different resolutions are combined for a layer (which is the case before all tiles of the best resolution have been loaded), lower resolution tiles now align with higher resolution tiles resulting in a map without gaps (#5890)
  • Styles can now easily be cloned (#5832)

Additionally the openlayers.org homepage is now available via the https-protocol.

Upgrade notes

ol.style.Fill with CanvasGradient or CanvasPattern

Previously, gradients and patterns were aligned with the canvas, so they did not
move and rotate with the map. This was changed to a more expected behavior by anchoring the fill to the map origin (usually at map coordinate [0, 0]).

goog.DEBUG define was renamed to ol.DEBUG

As last step in the removal of the dependency on Google Closure Library, the goog.DEBUG compiler define was renamed to ol.DEBUG. Please change accordingly in your custom build configuration json files.

ol.format.ogc.filter namespace was renamed to ol.format.filter

ol.format.ogc.filter was simplified to ol.format.filter; to upgrade your code, simply remove the ogc string from the name.
For example: ol.format.ogc.filter.and to ol.format.filter.and.

Changes only relevant to those who compile their applications together with the Closure Compiler

A number of internal types have been renamed. This will not affect those who use the API provided by the library, but if you are compiling your application together with OpenLayers and using type names, you'll need to do the following:

  • rename ol.CollectionProperty to ol.Collection.Property
  • rename ol.DeviceOrientationProperty to ol.DeviceOrientation.Property
  • rename ol.DragBoxEvent to ol.interaction.DragBox.Event
  • rename ol.DragBoxEventType to ol.interaction.DragBox.EventType
  • rename ol.GeolocationProperty to ol.Geolocation.Property
  • rename ol.OverlayPositioning to ol.Overlay.Positioning
  • rename ol.OverlayProperty to ol.Overlay.Property
  • rename ol.control.MousePositionProperty to ol.control.MousePosition.Property
  • rename ol.format.IGCZ to ol.format.IGC.Z
  • rename ol.interaction.InteractionProperty to ol.interaction.Interaction.Property
  • rename ol.interaction.DrawMode to ol.interaction.Draw.Mode
  • rename ol.interaction.DrawEvent to ol.interaction.Draw.Event
  • rename ol.interaction.DrawEventType to ol.interaction.Draw.EventType
  • rename ol.interaction.ExtentEvent to ol.interaction.Extent.Event
  • rename ol.interaction.ExtentEventType to ol.interaction.Extent.EventType
  • rename ol.interaction.DragAndDropEvent to ol.interaction.DragAndDrop.Event
  • rename ol.interaction.DragAndDropEventType to ol.interaction.DragAndDrop.EventType
  • rename ol.interaction.ModifyEvent to ol.interaction.Modify.Event
  • rename ol.interaction.SelectEvent to ol.interaction.Select.Event
  • rename ol.interaction.SelectEventType to ol.interaction.Select.EventType
  • rename ol.interaction.TranslateEvent to ol.interaction.Translate.Event
  • rename ol.interaction.TranslateEventType to ol.interaction.Translate.EventType
  • rename ol.layer.GroupProperty to ol.layer.Group.Property
  • rename ol.layer.HeatmapLayerProperty to ol.layer.Heatmap.Property
  • rename ol.layer.TileProperty to ol.layer.Tile.Property
  • rename ol.layer.VectorTileRenderType to ol.layer.VectorTile.RenderType
  • rename ol.MapEventType to ol.MapEvent.Type
  • rename ol.MapProperty to ol.Map.Property
  • rename ol.ModifyEventType to ol.interaction.Modify.EventType
  • rename ol.RendererType to ol.renderer.Type
  • rename ol.render.EventType to ol.render.Event.Type
  • rename ol.source.ImageEvent to ol.source.Image.Event
  • rename ol.source.ImageEventType to ol.source.Image.EventType
  • rename ol.source.RasterEvent to ol.source.Raster.Event
  • rename ol.source.RasterEventType to ol.source.Raster.EventType
  • rename ol.source.TileEvent to ol.source.Tile.Event
  • rename ol.source.TileEventType to ol.source.Tile.EventType
  • rename ol.source.VectorEvent to ol.source.Vector.Event
  • rename ol.source.VectorEventType to ol.source.Vector.EventType
  • rename ol.source.wms.ServerType to ol.source.WMSServerType
  • rename ol.source.WMTSRequestEncoding to ol.source.WMTS.RequestEncoding
  • rename ol.style.IconAnchorUnits to ol.style.Icon.AnchorUnits
  • rename ol.style.IconOrigin to ol.style.Icon.Origin

Full list of changes

Downloads

v3.18.2

@ahocevar ahocevar released this Sep 1, 2016 · 984 commits to master since this release

Summary

The v3.18.2 release is a patch release that addresses a regression in the v3.18.1 release. See the v3.18.0 release notes for details on upgrading from v3.17.x.

Fixes

Downloads

v3.18.1

@ahocevar ahocevar released this Aug 29, 2016 · 987 commits to master since this release

Summary

The v3.18.1 release is a patch release that addresses two regressions in the v3.18.0 release. See the v3.18.0 release notes for details on upgrading from v3.17.x.

Fixes

Downloads

v3.18.0

@ahocevar ahocevar released this Aug 26, 2016 · 991 commits to master since this release

Summary

The v3.18.0 release includes features and fixes from almost 120 pull requests since the v3.17.1 release. Most of the changes are bug fixes and continuing removal of the dependency on Closure Library. New features include:

  • Addition of Intersects and Within filters to ol.format.ogc.filter #5668
  • New overlaps option for ol.source.Vector and ol.source.VectorTile to improve rendering performance for polygon topologies #5196
  • New rotateWithView option for ol.style.Text to control appearance of text on rotated views #5050
  • Add a #scale() method to ol.geom.Geometry and subclasses #5685
  • Parse id of features in ol.format.MVT #5613

Upgrade notes

Changes in the way assertions are handled

Previously, minified builds of the library did not have any assertions. This caused applications to fail silently or with cryptic stack traces. Starting with this release, developers get notified of many runtime errors through the new ol.AssertionError. This error has a code property. The meaning of the code can be found on http://openlayers.org/en/latest/doc/errors/. There are additional console assertion checks in debug mode when the goog.DEBUG compiler flag is true. As this is true by default, it is recommended that those creating custom builds set this to false so these assertions are stripped.'

Removal of ol.ENABLE_NAMED_COLORS

This option was previously needed to use named colors with the WebGL renderer but is no longer needed.

KML format now uses URL()

The URL constructor is supported by all modern browsers, but not by older ones, such as IE. To use the KML format in such older browsers, a URL polyfill will have to be loaded before use.

Changes only relevant to those who compile their applications together with the Closure Compiler

A number of internal types have been renamed. This will not affect those who use the API provided by the library, but if you are compiling your application together with OpenLayers and using type names, you'll need to do the following:

  • rename ol.CollectionEventType to ol.Collection.EventType
  • rename ol.CollectionEvent to ol.Collection.Event
  • rename ol.ViewHint to ol.View.Hint
  • rename ol.ViewProperty to ol.View.Property
  • rename ol.render.webgl.imagereplay.shader.Default.Locations to ol.render.webgl.imagereplay.defaultshader.Locations
  • rename ol.render.webgl.imagereplay.shader.DefaultFragment to ol.render.webgl.imagereplay.defaultshader.Fragment
  • rename ol.render.webgl.imagereplay.shader.DefaultVertex to ol.render.webgl.imagereplay.defaultshader.Vertex
  • rename ol.renderer.webgl.map.shader.Default.Locations to ol.renderer.webgl.defaultmapshader.Locations
  • rename ol.renderer.webgl.map.shader.Default.Locations to ol.renderer.webgl.defaultmapshader.Locations
  • rename ol.renderer.webgl.map.shader.DefaultFragment to ol.renderer.webgl.defaultmapshader.Fragment
  • rename ol.renderer.webgl.map.shader.DefaultVertex to ol.renderer.webgl.defaultmapshader.Vertex
  • rename ol.renderer.webgl.tilelayer.shader.Fragment to ol.renderer.webgl.tilelayershader.Fragment
  • rename ol.renderer.webgl.tilelayer.shader.Locations to ol.renderer.webgl.tilelayershader.Locations
  • rename ol.renderer.webgl.tilelayer.shader.Vertex to ol.renderer.webgl.tilelayershader.Vertex
  • rename ol.webgl.WebGLContextEventType to ol.webgl.ContextEventType
  • rename ol.webgl.shader.Fragment to ol.webgl.Fragment
  • rename ol.webgl.shader.Vertex to ol.webgl.Vertex

Full list of changes

Downloads