Releases: openlayers/openlayers
v3.18.0
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
andWithin
filters tool.format.ogc.filter
#5668 - New
overlaps
option forol.source.Vector
andol.source.VectorTile
to improve rendering performance for polygon topologies #5196 - New
rotateWithView
option forol.style.Text
to control appearance of text on rotated views #5050 - Add a
#scale()
method tool.geom.Geometry
and subclasses #5685 - Parse
id
of features inol.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
tool.Collection.EventType
- rename
ol.CollectionEvent
tool.Collection.Event
- rename
ol.ViewHint
tool.View.Hint
- rename
ol.ViewProperty
tool.View.Property
- rename
ol.render.webgl.imagereplay.shader.Default.Locations
tool.render.webgl.imagereplay.defaultshader.Locations
- rename
ol.render.webgl.imagereplay.shader.DefaultFragment
tool.render.webgl.imagereplay.defaultshader.Fragment
- rename
ol.render.webgl.imagereplay.shader.DefaultVertex
tool.render.webgl.imagereplay.defaultshader.Vertex
- rename
ol.renderer.webgl.map.shader.Default.Locations
tool.renderer.webgl.defaultmapshader.Locations
- rename
ol.renderer.webgl.map.shader.Default.Locations
tool.renderer.webgl.defaultmapshader.Locations
- rename
ol.renderer.webgl.map.shader.DefaultFragment
tool.renderer.webgl.defaultmapshader.Fragment
- rename
ol.renderer.webgl.map.shader.DefaultVertex
tool.renderer.webgl.defaultmapshader.Vertex
- rename
ol.renderer.webgl.tilelayer.shader.Fragment
tool.renderer.webgl.tilelayershader.Fragment
- rename
ol.renderer.webgl.tilelayer.shader.Locations
tool.renderer.webgl.tilelayershader.Locations
- rename
ol.renderer.webgl.tilelayer.shader.Vertex
tool.renderer.webgl.tilelayershader.Vertex
- rename
ol.webgl.WebGLContextEventType
tool.webgl.ContextEventType
- rename
ol.webgl.shader.Fragment
tool.webgl.Fragment
- rename
ol.webgl.shader.Vertex
tool.webgl.Vertex
Full list of changes
- #5782 - Compare URLs in an IE compatible way (@ahocevar)
- #5778 - Use Mapzen instead of openstreetmap.us tiles (@ahocevar)
- #5774 - Update glob to version 7.0.6 π (@openlayers)
- #5708 - Remove unnecessary closePath() instructions (@ahocevar)
- #5196 - Batch polygon and circle fills and strokes (@ahocevar)
- #5768 - Enable extent clipping for vector layers (@ahocevar)
- #4753 - Export ol.geom.Geometry#containsCoordinate function (@fredj)
- #5050 - Add rotateWithView option to ol.style.Text (@fredj)
- #5767 - Accept feature without geometry in ol.interaction.Modify (@fredj)
- #5334 - Load the examples resources with HTTPS (@fredj)
- #5766 - Use HTTPS to access tiles at tileserver.maptiler.com in examples (@klokantech)
- #5765 - Force a map render when the view is not updated (@fredj)
- #5724 - Fix clipping of the tile layer extent on HiDPI devices (@ahocevar)
- #5764 - Remove unnecessary map.render() calls (@bartvde)
- #5763 - Fix assert namespace (@ahocevar)
- #5616 - Fix event type and documentation of ol.events.condition.mouseOnly (@ahocevar)
- #5755 - Increase the size of the map in ol.layer.Tile rendering tests (@fredj)
- #5757 - Add ol.source.Cluster#setDistance function (@fredj)
- #5752 - Set proper replay canvas size and offset for rotated view (@ahocevar)
- #5754 - Update istanbul to version 0.4.5 π (@openlayers)
- #5727 - Add missing goog require (@fredj)
- #5273 - Take the pixelRatio into account when computing the gutter (@fredj)
- #5753 - Update proj4 to version 2.3.15 π (@openlayers)
- #5741 - Point to the English workshop (@bartvde)
- #5721 - Update metalsmith to version 2.2.0 π (@openlayers)
- #5733 - Fix #5730 - Ignore null/undef. values in uri.appendParams (@adube)
- #5736 - Show
resultType
attribute in docs (@tsauerwein) - #5735 - Update eslint to version 3.3.1 π (@openlayers)
- #5731 - Added a pixelRatio adjust to the canvasTileLayer 'forEachLayerAtPixel⦠(@Benjaki2)
- #5732 - Add missing curly braces in type annotations (@fredj)
- #5728 - Update closure-util to version 1.15.1 π (@openlayers)
- #5717 - Update phantomjs-prebuilt to version 2.1.12 π (@openlayers)
- #5725 - Remove tilerange assert from tilegrid/wmts (@probins)
- #5723 - Update eslint to version 3.3.0 π (@openlayers)
- #5702 - Add rule to identify missing requires (@tschaub)
- #5670 - Added image data value to 'forEachLayerAtPixel' method callback (@Benjaki2)
- #5720 - Fix typo in tilegrid/wmts (@probins)
- #5715 - Create a check-example task for smarter example checking with PhantomJS (@ahocevar)
- #5714 - Add FAQ entry about renderBuffer (@tsauerwein)
- #5713 - Check examples with http protocol instead of file (@ahocevar)
- #5689 - Fix cursor change in translate interaction (@pgiraud)
- #5165 - Remove goog.addSingletonGetter function (@fredj)
- #5701 - Update phantomjs-prebuilt to version 2.1.11 π (@openlayers)
- [#56...
v3.17.1
Summary
The v3.17.1 release is a patch release that addresses a regression in the v3.17.0 release. See the v3.17.0 release notes for details on upgrading from v3.16.
Fixes
- #5548 - Fix CHANGETYPE in ol.control.FullScreen (@GaborFarkas)
v3.17.0
Summary
The v3.17.0 release includes features and fixes from 60 pull requests since the v3.16.0 release. Most of the changes are bug fixes and continuing removal of the dependency on Closure Library.
Upgrade notes
ol.source.MapQuest
removal
Because of changes at MapQuest (see: https://lists.openstreetmap.org/pipermail/talk/2016-June/076106.html) we had to remove the MapQuest source for now (see #5484 for details).
ol.interaction.ModifyEvent
changes
The event object previously had a mapBrowserPointerEvent
property, which has been renamed to mapBrowserEvent
.
Removal of ol.raster namespace
Users compiling their code with the library and using types in the ol.raster
namespace should note that this has now been removed. ol.raster.Pixel
has been deleted, and the other types have been renamed as follows, and your code may need changing if you use these:
ol.raster.Operation
tool.RasterOperation
ol.raster.OperationType
tool.RasterOperationType
All typedefs now in ol namespace
Users compiling their code with the library should note that the following typedefs have been renamed; your code may need changing if you use these:
- ol.events.ConditionType to ol.EventsConditionType
- ol.events.EventTargetLike to ol.EventTargetLike
- ol.events.Key to ol.EventsKey
- ol.events.ListenerFunctionType to ol.EventsListenerFunctionType
- ol.interaction.DragBoxEndConditionType to ol.DragBoxEndConditionType
- ol.interaction.DrawGeometryFunctionType to ol.DrawGeometryFunctionType
- ol.interaction.SegmentDataType to ol.ModifySegmentDataType
- ol.interaction.SelectFilterFunction to ol.SelectFilterFunction
- ol.interaction.SnapResultType to ol.SnapResultType
- ol.interaction.SnapSegmentDataType to ol.SnapSegmentDataType
- ol.proj.ProjectionLike to ol.ProjectionLike
- ol.style.AtlasBlock to ol.AtlasBlock
- ol.style.AtlasInfo to ol.AtlasInfo
- ol.style.AtlasManagerInfo to ol.AtlasManagerInfo
- ol.style.CircleRenderOptions to ol.CircleRenderOptions
- ol.style.ImageOptions to ol.StyleImageOptions
- ol.style.GeometryFunction to ol.StyleGeometryFunction
- ol.style.RegularShapeRenderOptions to ol.RegularShapeRenderOptions
- ol.style.StyleFunction to ol.StyleFunction
Full list of changes
- #5539 - Remove outdated comments re goog.dom (@probins)
- #5543 - Update rbush to 2.0.1 (@tsauerwein)
- #5540 - Remove MapQuest source (@bartvde)
- #5538 - Replace remaining goog.inherits (@probins)
- #5536 - Update to layer-extent example (@tschaub)
- #5482 - Fix for regression in tile layer extent (@ischneider)
- #5475 - Remove goog.provide from enums only used internally or in olx.js (@probins)
- #5424 - Don't dispatch select event if no feature is selected or deselected (@fredj)
- #5522 - Add 'condition' option to ol.interaction.DragPanOptions in olx.js (@SamuelBerger)
- #5443 - Remove olx.source.WMTSOptions#maxZoom option (@fredj)
- #5497 - Update istanbul to version 0.4.4 π (@openlayers)
- #5523 - Update closure-util to version 1.15.0 π (@openlayers)
- #5508 - Fix problems with ol.format.WFS in compiled mode (@tsauerwein)
- #5512 - Use forEachTileCoord name instead of forEachTileCoordInExtentAndZ (@ahocevar)
- #5513 - Add getters for min and max resolution of the view (@bartvde)
- #5471 - Fix GPX write of xsi ns (@probins)
- #5134 - Remove goog.dom (@nicholas-l)
- #5511 - Do not optimize lines away entirely (@ahocevar)
- #5509 - Make it easier to work with tile ranges in custom source implementations (@ahocevar)
- #5498 - Update eslint to version 2.13.1 π (@openlayers)
- #5495 - Get rid of goog.isFunction (@fredj)
- #5499 - Update glob to version 7.0.5 π (@openlayers)
- #5125 - Remove goog style (@nicholas-l)
- #5494 - Remove goog.global (@probins)
- #5492 - Update eslint to version 2.13.0 π (@openlayers)
- #5490 - Update glob to version 7.0.4 π (@openlayers)
- #5460 - Update eslint to version 2.12.0 π (@openlayers)
- #5479 - Update slimerjs to version 0.906.2 π (@openlayers)
- #5474 - Update clean-css to version 3.4.18 π (@openlayers)
- #5450 - Remove sub-namespaces from all remaining typedefs (@probins)
- #5465 - Fix custom icon positions and rotation (@ahocevar)
- #5469 - Fix typo (@gberaudo)
- #5453 - Reference ol.MapBrowserEvent instead of ol.MapBrowserPointerEvent (@ahocevar)
- #5208 - Stop GPX writing rtept properties (@probins)
- #5452 - Update eslint-config-openlayers to version 5.0.0 π (@openlayers)
- #5432 - Remove use of goog.uri (@bjornharrtell)
- #5449 - Make example data/ paths absolute for source view and JSFiddle (@ahocevar)
- #5399 - Remove ol.raster namespace (@probins)
- #5270 - Load erroneous image in ol.Image#load and ol.ImageTile#load (@fredj)
- #5194 - Get rid of goog.inherits and goog.base (@fredj)
- #5427 - Document typedefs and enums used by API symbols (@ahocevar)
- #5438 - Don't make ol.format.ogc.filter.Filter inherit from ol.Object (@fredj)
- #5433 - Update clean-css to version 3.4.17 π (@openlayers)
- #5434 - Fix externs in closure compiler tutorial (@tsauerwein)
- #5426 - Fix icon example to anchor popup to feature location (@frankrowe)
- #5421 - Correct typo in config/jsdoc/api/readme.md (@probins)
- #5417 - Update clean-css to version 3.4.16 π (@openlayers)
- #5413 - Update clean-css to version 3.4.15 π (@openlayers)
- #5410 - Update eslint to version 2.11.1 π (@openlayers)
- #5408 - Update pbf to version 2.0.1 π (@openlayers)
- #5404 - Update eslint to version 2.11.0 π (@openlayers)
- #5402 - Pass in srsName option to writeTransaction (@anzhihun)
- #5393 - Update mocha to version 2.5.3 π (@openlayers)
- #5394 - Update resemblejs to version 2.2.1 π (@openlayers)
- #5390 - Fix the requestEncoding automatic selectio...
v3.16.0
Summary
The v3.16.0 release includes features and fixes from 95 pull requests since the v3.15.1 release. New features and improvements include:
- Add
ol.source.ImageArcGISRest
for ArcGIS REST image layer support (#3880) - New
finishCondition
option forol.interaction.Draw
to control which action should finish a geometry when drawing (#5261) - New filter API for
ol.format.WFS#writeGetFeature
for WFS queries with OGC filters (#5252) - New
renderMode
option forol.layer.VectorTile
to balance between rendering performance and rendering quality (#5177) - More flexibility for configuring attribution logos by allowing HTML elements (#5274)
- UTFGrid updates, now supporting Mapbox API v4 (#5329)
- New
condition
option forol.interaction.Modify
for better reliability when combining with other interactions (#5320)
In addition to these new features, the code base has been simplified and refactored in the process of removing the dependency on Closure Library and Compiler.
Upgrade notes
Rendering change for tile sources
Previously, if you called source.setUrl()
on a tile source, all currently rendered tiles would be cleared before new tiles were loaded and rendered. This clearing of the map is undesirable if you are trying to smoothly update the tiles used by a source. This behavior has now changed, and calling source.setUrl()
(or source.setUrls()
) will not clear currently rendered tiles before loading and rendering new tiles. Instead, previously rendered tiles remain rendered until new tiles have loaded and can replace them. If you want to achieve the old behavior (render a blank map before loading new tiles), you can call source.refresh()
or you can replace the old source with a new one (using layer.setSource()
).
Move of typedefs out of code and into separate file
This change should not affect the great majority of application developers, but it's possible there are edge cases when compiling application code together with the library which cause compiler errors or warnings. In this case, please raise a GitHub issue. goog.require
s for typedefs should not be necessary.
Users compiling their code with the library should note that the following API @typedef
s have been renamed; your code may need changing if you use these:
ol.format.WFS.FeatureCollectionMetadata
tool.WFSFeatureCollectionMetadata
ol.format.WFS.TransactionResponse
tool.WFSTransactionResponse
Removal of opaque
option for ol.source.VectorTile
This option is no longer needed, so it was removed from the API.
XHR loading for ol.source.TileUTFGrid
The ol.source.TileUTFGrid
now uses XMLHttpRequest to load UTFGrid tiles by default. This works out of the box with the v4 Mapbox API. To work with the v3 API, you must use the new jsonp
option on the source. See the examples below for detail.
// To work with the v4 API
var v4source = new ol.source.TileUTFGrid({
url: 'https://api.tiles.mapbox.com/v4/example.json?access_token=' + YOUR_KEY_HERE
});
// To work with the v3 API
var v3source = new ol.source.TileUTFGrid({
jsonp: true, // <--- this is required for v3
url: 'http://api.tiles.mapbox.com/v3/example.json'
});
Full list of changes
- #5377 - Fix link to jspdf.min.js in export-pdf example (@fredj)
- #5372 - Update jquery to version 2.2.4 π (@openlayers)
- #5364 - Make it so things don't flash so much when you change the tile source URL. (@tschaub)
- #5368 - Move WFS typedefs to typedefs.js (@probins)
- #5369 - format/igc: Remove duplicate regex exec() call (@Turbo87)
- #5363 - Convert all typedefs to CamelCase (@probins)
- #5362 - Update vector-tile to version 1.2.1 π (@openlayers)
- #5352 - Add getResolutions() to ol.View (@marlowp)
- #5359 - Move upgrade notes to correct place (@probins)
- #5343 - Rename non-api sub-namespace typedefs (@probins)
- #5361 - Fix url to maki icons (@fredj)
- #5358 - Handle multiple featureMember elements for different types (WFS format) (@tsauerwein)
- #5355 - Fix navigation-controls example description (@fredj)
- #5353 - Add API definition to docs landing page (@probins)
- #5356 - Update rbush to version 1.4.3 π (@openlayers)
- #5354 - Update eslint to version 2.10.2 π (@openlayers)
- #5347 - Update eslint to version 2.10.1 π (@openlayers)
- #5344 - Remove raster enum from test (@probins)
- #5329 - UTFGrid updates. (@tschaub)
- #5335 - Move typedefs to separate file (@probins)
- #5332 - Warn when viewing an outdated example, and offer a redirect to latest (@ahocevar)
- #5342 - Fix incorrect source links (@ahocevar)
- #5339 - Use a div instead of alert for version warning (@ahocevar)
- #5320 - Add a 'condition' option to ol.interaction.Modify (@fredj)
- #5333 - Improve code readability with better comments (@openlayers)
- #5330 - Fix source links, display version and warn about outdated docs (@ahocevar)
- #5324 - Remove unneeded goog.provides/requires for typedefs (@probins)
- #5328 - Use Node 6 on Travis. (@tschaub)
- #5313 - Rastersource framestate extent (@ahocevar)
- #5326 - Fix wording in tile-load-event example (@tsauerwein)
- #5327 - Update closure-util to version 1.13.1 π (@openlayers)
- #5289 - Update fs-extra to version 0.30.0 π (@openlayers)
- #5319 - Remove outdated fixme from framestate.js. (@probins)
- #5274 - Allow using elements in logo attribution options (@samuellapointe)
- #5162 - Improve docs/examples for loadingstrategy (@probins)
- #5314 - Update browserify to version 13.0.1 π (@openlayers)
- #5315 - Remove unused ol.TileCoordTransformType (@probins)
- #5310 - Get raster sources working again. (@tschaub)
- #5291 - Allow once listeners to dispatch events of same type (@ahocevar)
- #5309 - Update metalsmith-layouts to version 1.6.5 π (@openlayers)
- #5052 - Update fs-extra to version 0.26.7 π (@openlayers)
- #5306 - Make olx.view.FitOptions.padding optional (@gberaudo)
- #5302 - Remove use of goog.partial (@fredj)
- #5304 - Update sinon to version 1.17.4 π (@openlayers)
- #4644 - Remove check-requires script (@fredj)
- #5298 - Update eslint to version 2.9.0 π (@openlayers)
- #5296 - Document handling of KML MultiGeometries (@probins)
- #5293 - Block removePoint while dragging (@giohappy)
- [#5285](https://github.com/openlayers...
v3.15.1
v3.15.0
Summary
The v3.15.0 release includes features and fixes from 136 pull requests since the v3.14.2 release. New features and improvements include:
- Make ol.source.Cluster more flexible by adding a geometryFunction option (#4917).
- Add new CartoDB tile source (#4926).
- Improved rendering performance for vector layers by batching polygon fill and stroke instructions (#5149).
- Make the tile cache size configurable (#4805).
- Add new ol.geom.Geometry#rotate function (#4984).
- Accept simpler forms of specifying attribution(s) for sources (#5007).
- Support zooming out for ol.interaction.DragZoom (#5031).
Upgrade notes
Internet Explorer 9 support
As of this release, OpenLayers requires a classList
polyfill for IE 9 support. See http://cdn.polyfill.io/v2/docs/features#Element_prototype_classList.
Immediate rendering API
Listeners for precompose
, render
, and postcompose
receive an event with a vectorContext
property with methods for immediate vector rendering. The previous geometry drawing methods have been replaced with a single vectorContext.drawGeometry(geometry)
method. If you were using any of the following experimental methods on the vector context, replace them with drawGeometry
:
- Removed experimental geometry drawing methods:
drawPointGeometry
,drawLineStringGeometry
,drawPolygonGeometry
,drawMultiPointGeometry
,drawMultiLineStringGeometry
,drawMultiPolygonGeometry
, anddrawCircleGeometry
(all have been replaced withdrawGeometry
).
In addition, the previous methods for setting style parts have been replaced with a single vectorContext.setStyle(style)
method. If you were using any of the following experimental methods on the vector context, replace them with setStyle
:
- Removed experimental style setting methods:
setFillStrokeStyle
,setImageStyle
,setTextStyle
(all have been replaced withsetStyle
).
Below is an example of how the vector context might have been used in the past:
// OLD WAY, NO LONGER SUPPORTED
map.on('postcompose', function(event) {
event.vectorContext.setFillStrokeStyle(style.getFill(), style.getStroke());
event.vectorContext.drawPointGeometry(geometry);
});
Here is an example of how you could accomplish the same with the new methods:
// NEW WAY, USE THIS INSTEAD OF THE CODE ABOVE
map.on('postcompose', function(event) {
event.vectorContext.setStyle(style);
event.vectorContext.drawGeometry(geometry);
});
A final change to the immediate rendering API is that vectorContext.drawFeature()
calls are now "immediate" as well. The drawing now occurs synchronously. This means that any zIndex
in a style passed to drawFeature()
will be ignored. To achieve zIndex
ordering, order your calls to drawFeature()
instead.
Removal of ol.DEFAULT_TILE_CACHE_HIGH_WATER_MARK
The ol.DEFAULT_TILE_CACHE_HIGH_WATER_MARK
define has been removed. The size of the cache can now be defined on every tile based ol.source
:
new ol.layer.Tile({
source: new ol.source.OSM({
cacheSize: 128
})
})
The default cache size is 2048
.
Full list of changes
- #4775 - Remove goog.math.modulo and goog.math.lerp (@nicholas-l)
- #5152 - Cartodb cleanup (@fredj)
- #4804 - Use Array.isArray instead of goog.isArray (@fredj)
- #5149 - Batch polygon fill and stroke instructions (@ahocevar)
- #5159 - Update eslint to version 2.6.0 π (@openlayers)
- #5160 - Update clean-css to version 3.4.11 π (@openlayers)
- #5157 - Improve docs for measure example (@probins)
- #5155 - Fix ol.source.Zoomify tests on firefox (@fredj)
- #5086 - Get rid of goog.functions (@bjornharrtell)
- #5105 - Support minZoom in ol.source.Stamen (@fredj)
- #4926 - Add CartoDB tile source. (@aisaacs)
- #5151 - Use fs-extra as fs, remove usage of graceful-fs (@marcjansen)
- #5124 - Removed goog.dom.classlist (@nicholas-l)
- #5150 - Use fs-extra instead of wrench (@fredj)
- #5109 - Add some tests for ol.source.TileUTFGrid (@marcjansen)
- #5139 - Update closure-util to version 1.13.0 π (@openlayers)
- #5141 - Reuse dragListenerKeys_ variable in ol.control.ZoomSlider (@fredj)
- #5118 - Remove goog.dom.classlist usage (@fredj)
- #5115 - Clarify that lineDash has no effect in IE 10 and below (@marcjansen)
- #5136 - Update eslint to version 2.5.3 π (@openlayers)
- #5123 - Update coveralls to version 2.11.9 π (@openlayers)
- #5131 - Update phantomjs-prebuilt to version 2.1.7 π (@openlayers)
- #5122 - Update browser support info in intro tutorial (@probins)
- #5112 - Add decimals option to format write (@probins)
- #5120 - Add tileJSON option to ol.source.TileUTFGrid (@ahocevar)
- #5119 - Add ol.source.Raster events on API docs page (@drnextgis)
- #5116 - Improve examples pages on mobile devices a bit (@ahocevar)
- #5113 - Memory leak in ol.control.FullScreen (@AvatharDG)
- #5111 - Remove CSS filter in examples (@fredj)
- #5108 - Remove unused ol.xml.getAttributeNodeNS function (@fredj)
- #5106 - Get rid of goog.math.Vec2 (@fredj)
- #5096 - Add tests for ol.source.Zoomify (@marcjansen)
- #5102 - Fix typo in API docs (@openlayers)
- #5098 - Reintroduce log messages for relevant WebGL assertions (@bjornharrtell)
- #5094 - FAQ: answer question 4 (@probins)
- #5092 - add raster.jsdoc (@drnextgis)
- #5081 - Snap to vertices or edges (@drnextgis)
- #5090 - Update custom-builds.md (@probins)
- #5089 - Test for both transform coords should use roughlyEqual (@probins)
- #5080 - Fix geojson write GeometryCollection (@probins)
- #5088 - DEVELOPING.md: remove section on running Travis on fork (@probins)
- #5087 - assertion to check that there's a DOM node for target element (@drnextgis)
- #5069 - Update jquery to version 2.2.2 π (@openlayers)
- #5083 - Remove unnecessary lineTo calls in immediate polygon rendering (@tschaub)
- #5082 - Get rid of goog.log. (@bjornharrtell)
- #5079 - Correcting a typo in the upgrade notes (@tschaub)
- #5076 - Update phantomjs-prebuilt to version 2.1.6 π (@openlayers)
- #5077 - Make immediate API uniformly synchronous. (@tschaub)
- #5072 - Add setStyle() and drawGeometry() to the immediate rendering API. (@tschaub)
- [#5074](https://github.com/openlayers/ol3/pull...
v3.14.2
Summary
The v3.14.2 release is a patch release that addresses a few regressions in the v3.14.1 release. See the v3.14.0 release notes for details on upgrading from v3.13.x.
Fixes
v3.14.1
Summary
The v3.14.1 release is a patch release that addresses a few regressions in the v3.14.0 release. See the v3.14.0 release notes for details on upgrading from v3.13.x.
Fixes
v3.14.0
Summary
The v3.14.0 release includes features and fixes from 93 pull requests since the v3.13.1 release. New features and improvements include:
- New
source
option for theol.control.FullScreen
, to allow including other elements besides the map in a full screen view (#4679). - New
target
property for the Drag&Drop interaction allows using a different drop target than the map viewport (#4876). ol.style.RegularShape
has a newrotateWithView
option, for controlling how regular shape symbols are rendered on rotated views (#4698).- New
layers
option forol.format.WMSGetFeatureInfo
format, to selectively only read features from specific layers (#4700). - New
precision
parameter for formatting coordinates withol.coordinate.toStringHDMS
(#4787). - Smarter tile queue for improved tile loading user experience when more than one tile layer is used (#4794).
- Improved rendering performance for tile layers by rendering tiles directly to the map canvas (#4597).
- The
goog.events
event system was replaced with our own lightweight event system. This significally reduces the build size (#4711). Replacement of othergoog.*
components with ES5 features or custom code marks a huge step towards the complete removal of the Closure Library dependency.
Upgrade notes
Internet Explorer 9 support
As of this release, OpenLayers requires a requestAnimationFrame
/cancelAnimationFrame
polyfill for IE 9 support. See http://cdn.polyfill.io/v2/docs/features/#requestAnimationFrame.
Layer pre-/postcompose event changes
It is the responsibility of the application to undo any canvas transform changes at the end of a layer 'precompose' or 'postcompose' handler. Previously, it was ok to set a null transform. The API now guarantees a device pixel coordinate system on the canvas with its origin in the top left corner of the map. However, applications should not rely on the underlying canvas being the same size as the visible viewport.
Old code:
layer.on('precompose', function(e) {
// rely on canvas dimensions to move coordinate origin to center
e.context.translate(e.context.canvas.width / 2, e.context.canvas.height / 2);
e.context.scale(3, 3);
// draw an x in the center of the viewport
e.context.moveTo(-20, -20);
e.context.lineTo(20, 20);
e.context.moveTo(-20, 20);
e.context.lineTo(20, -20);
// rely on the canvas having a null transform
e.context.setTransform(1, 0, 0, 1, 0, 0);
});
New code:
layer.on('precompose', function(e) {
// use map size and pixel ratio to move coordinate origin to center
var size = map.getSize();
var pixelRatio = e.frameState.pixelRatio;
e.context.translate(size[0] / 2 * pixelRatio, size[1] / 2 * pixelRatio);
e.context.scale(3, 3);
// draw an x in the center of the viewport
e.context.moveTo(-20, -20);
e.context.lineTo(20, 20);
e.context.moveTo(-20, 20);
e.context.lineTo(20, -20);
// undo all transforms
e.context.scale(1 / 3, 1 / 3);
e.context.translate(-size[0] / 2 * pixelRatio, -size[1] / 2 * pixelRatio);
});
Full list of changes
- #4896 - Ignore XML sequence when comparing GML (@ahocevar)
- #4890 - ol.format.KML cleanup (@fredj)
- #4894 - Only run raster operations after image sources have loaded. (@tschaub)
- #4892 - Stricter check for ImageData constructor (@ahocevar)
- #4891 - Fix tests so they all pass in IE9 (@ahocevar)
- #4889 - Use requestAnimation polyfill for examples and update release notes (@ahocevar)
- #4887 - Use less aggressive DOM function overrides (@ahocevar)
- #4885 - Mark overlayContainer and overlayContainerStopEvent as non-nullable (@fredj)
- #4884 - Remove use of goog.math.isFiniteNumber() (@fredj)
- #4881 - Update jquery to version 2.2.1 π (@openlayers)
- #4780 - Adapt the code for the new closure-compiler version (@fredj)
- #3453 - Consider multi in add/remove/toggle select logic (@bjornharrtell)
- #4876 - Add
target
property to Drag&Drop interaction (@tsauerwein) - #4854 - Always report skipped feature hits for the original layer (@ahocevar)
- #4877 - Update eslint to version 2.2.0 π (@openlayers)
- #4870 - Reuse dragListenerKeys_ local variable (@fredj)
- #4721 - Fix reprojection of raster sources with gutter (@klokantech)
- #4874 - Assert we have a feature id (@bartvde)
- #4869 - Improve precision of ol.reproj.render (@klokantech)
- #4866 - Use requestAnimationFrame polyfill (for IE9) (@ahocevar)
- #4863 - Remove use of goog.dom.createElement (@fredj)
- #4864 - Use querySelectorAll instead of goog.dom.getElementsByClass (@fredj)
- #4597 - Render tiles directly to the map canvas (@ahocevar)
- #4862 - Add OSGeo badge (@ahocevar)
- #4845 - Fix geolocation error cast (@gberaudo)
- #4851 - Don't use goog.isBoolean() (@marcjansen)
- #4852 - Don't use goog.isString() (@marcjansen)
- #4849 - Fix docs of LogoOptions.prototype.src (@openlayers)
- #4794 - Make tile loading count no longer depend on source count (@ahocevar)
- #4843 - Remove use of goog.dom.getParentElement (@fredj)
- #4839 - Add template type to ol.Collection (@fredj)
- #4847 - Update eslint to version 2.1.0 π (@openlayers)
- #4632 - Overloading fill color (polygon or text) with CanvasPattern and CanvasGradient (@bjnsn)
- #4842 - Remove use of goog.dom.createDom (@fredj)
- #4808 - Type cleanup (@fredj)
- #4737 - Use olx.format.ReadOptions in ol.interaction.DragAndDrop (@fredj)
- #4830 - Make sure window.proj4 is always restored in tests (@ahocevar)
- #4838 - Use regular expression instead of String#endsWith() check (@ahocevar)
- #4837 - Update metalsmith-layouts to version 1.5.4 π (@openlayers)
- #4836 - Use lowercase for all user agent checks (@ahocevar)
- #4833 - Upgrade linter and config. (@tschaub)
- #4831 - Add navigation header to examples page (@jonataswalker)
- #4824 - Don't use goog.string.newlines.* (@marcjansen)
- #4825 - Don't use goog.string.isEmpty (@marcjansen)
- #4823 - Fix type for layers option on ol.interaction.Select (@ahocevar)
- #4815 - wrapX false in synthetic examples (@fredj)
- #4810 - Add checks for undefined in controls (@gberaudo)
- #4787 - Add precision parameter for HDMS coordinate (@pfanguin)
- #4811 - Make ol.style.Style a @struct (@fredj)
- [#4...
v3.13.1
Summary
The v3.13.1 release is a patch release that addresses a few regressions in the v3.13.0 release. See the v3.13.0 release notes for details on upgrading from v3.12.