UNPKG

21.9 kBMarkdownView Raw
1# v3.18.0
2
3## Summary
4
5The 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:
6
7 * Addition of `Intersects` and `Within` filters to `ol.format.ogc.filter` [#5668](https://github.com/openlayers/openlayers/pull/5668)
8 * New `overlaps` option for `ol.source.Vector` and `ol.source.VectorTile` to improve rendering performance for polygon topologies [#5196](https://github.com/openlayers/openlayers/pull/5196)
9 * New `rotateWithView` option for `ol.style.Text` to control appearance of text on rotated views [#5050](https://github.com/openlayers/openlayers/pull/5050)
10 * Add a `#scale()` method to `ol.geom.Geometry` and subclasses [#5685](https://github.com/openlayers/openlayers/pull/5685)
11 * Parse `id` of features in `ol.format.MVT` [#5613](https://github.com/openlayers/openlayers/pull/5613)
12
13## Upgrade notes
14
15#### Changes in the way assertions are handled
16
17Previously, 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 https://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.'
18
19#### Removal of `ol.ENABLE_NAMED_COLORS`
20
21This option was previously needed to use named colors with the WebGL renderer but is no longer needed.
22
23#### KML format now uses URL()
24
25The 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.
26
27#### Changes only relevant to those who compile their applications together with the Closure Compiler
28
29A 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:
30
31 * rename `ol.CollectionEventType` to `ol.Collection.EventType`
32 * rename `ol.CollectionEvent` to `ol.Collection.Event`
33 * rename `ol.ViewHint` to `ol.View.Hint`
34 * rename `ol.ViewProperty` to `ol.View.Property`
35 * rename `ol.render.webgl.imagereplay.shader.Default.Locations` to `ol.render.webgl.imagereplay.defaultshader.Locations`
36 * rename `ol.render.webgl.imagereplay.shader.DefaultFragment` to `ol.render.webgl.imagereplay.defaultshader.Fragment`
37 * rename `ol.render.webgl.imagereplay.shader.DefaultVertex` to `ol.render.webgl.imagereplay.defaultshader.Vertex`
38 * rename `ol.renderer.webgl.map.shader.Default.Locations` to `ol.renderer.webgl.defaultmapshader.Locations`
39 * rename `ol.renderer.webgl.map.shader.Default.Locations` to `ol.renderer.webgl.defaultmapshader.Locations`
40 * rename `ol.renderer.webgl.map.shader.DefaultFragment` to `ol.renderer.webgl.defaultmapshader.Fragment`
41 * rename `ol.renderer.webgl.map.shader.DefaultVertex` to `ol.renderer.webgl.defaultmapshader.Vertex`
42 * rename `ol.renderer.webgl.tilelayer.shader.Fragment` to `ol.renderer.webgl.tilelayershader.Fragment`
43 * rename `ol.renderer.webgl.tilelayer.shader.Locations` to `ol.renderer.webgl.tilelayershader.Locations`
44 * rename `ol.renderer.webgl.tilelayer.shader.Vertex` to `ol.renderer.webgl.tilelayershader.Vertex`
45 * rename `ol.webgl.WebGLContextEventType` to `ol.webgl.ContextEventType`
46 * rename `ol.webgl.shader.Fragment` to `ol.webgl.Fragment`
47 * rename `ol.webgl.shader.Vertex` to `ol.webgl.Vertex`
48
49## Full list of changes
50
51 * [#5782](https://github.com/openlayers/openlayers/pull/5782) - Compare URLs in an IE compatible way ([@ahocevar](https://github.com/ahocevar))
52 * [#5778](https://github.com/openlayers/openlayers/pull/5778) - Use Mapzen instead of openstreetmap.us tiles ([@ahocevar](https://github.com/ahocevar))
53 * [#5774](https://github.com/openlayers/openlayers/pull/5774) - Update glob to version 7.0.6 🚀 ([@openlayers](https://github.com/openlayers))
54 * [#5708](https://github.com/openlayers/openlayers/pull/5708) - Remove unnecessary closePath() instructions ([@ahocevar](https://github.com/ahocevar))
55 * [#5196](https://github.com/openlayers/openlayers/pull/5196) - Batch polygon and circle fills and strokes ([@ahocevar](https://github.com/ahocevar))
56 * [#5768](https://github.com/openlayers/openlayers/pull/5768) - Enable extent clipping for vector layers ([@ahocevar](https://github.com/ahocevar))
57 * [#4753](https://github.com/openlayers/openlayers/pull/4753) - Export ol.geom.Geometry#containsCoordinate function ([@fredj](https://github.com/fredj))
58 * [#5050](https://github.com/openlayers/openlayers/pull/5050) - Add rotateWithView option to ol.style.Text ([@fredj](https://github.com/fredj))
59 * [#5767](https://github.com/openlayers/openlayers/pull/5767) - Accept feature without geometry in ol.interaction.Modify ([@fredj](https://github.com/fredj))
60 * [#5334](https://github.com/openlayers/openlayers/pull/5334) - Load the examples resources with HTTPS ([@fredj](https://github.com/fredj))
61 * [#5766](https://github.com/openlayers/openlayers/pull/5766) - Use HTTPS to access tiles at tileserver.maptiler.com in examples ([@klokantech](https://github.com/klokantech))
62 * [#5765](https://github.com/openlayers/openlayers/pull/5765) - Force a map render when the view is not updated ([@fredj](https://github.com/fredj))
63 * [#5724](https://github.com/openlayers/openlayers/pull/5724) - Fix clipping of the tile layer extent on HiDPI devices ([@ahocevar](https://github.com/ahocevar))
64 * [#5764](https://github.com/openlayers/openlayers/pull/5764) - Remove unnecessary map.render() calls ([@bartvde](https://github.com/bartvde))
65 * [#5763](https://github.com/openlayers/openlayers/pull/5763) - Fix assert namespace ([@ahocevar](https://github.com/ahocevar))
66 * [#5616](https://github.com/openlayers/openlayers/pull/5616) - Fix event type and documentation of ol.events.condition.mouseOnly ([@ahocevar](https://github.com/ahocevar))
67 * [#5755](https://github.com/openlayers/openlayers/pull/5755) - Increase the size of the map in ol.layer.Tile rendering tests ([@fredj](https://github.com/fredj))
68 * [#5757](https://github.com/openlayers/openlayers/pull/5757) - Add ol.source.Cluster#setDistance function ([@fredj](https://github.com/fredj))
69 * [#5752](https://github.com/openlayers/openlayers/pull/5752) - Set proper replay canvas size and offset for rotated view ([@ahocevar](https://github.com/ahocevar))
70 * [#5754](https://github.com/openlayers/openlayers/pull/5754) - Update istanbul to version 0.4.5 🚀 ([@openlayers](https://github.com/openlayers))
71 * [#5727](https://github.com/openlayers/openlayers/pull/5727) - Add missing goog require ([@fredj](https://github.com/fredj))
72 * [#5273](https://github.com/openlayers/openlayers/pull/5273) - Take the pixelRatio into account when computing the gutter ([@fredj](https://github.com/fredj))
73 * [#5753](https://github.com/openlayers/openlayers/pull/5753) - Update proj4 to version 2.3.15 🚀 ([@openlayers](https://github.com/openlayers))
74 * [#5741](https://github.com/openlayers/openlayers/pull/5741) - Point to the English workshop ([@bartvde](https://github.com/bartvde))
75 * [#5721](https://github.com/openlayers/openlayers/pull/5721) - Update metalsmith to version 2.2.0 🚀 ([@openlayers](https://github.com/openlayers))
76 * [#5733](https://github.com/openlayers/openlayers/pull/5733) - Fix #5730 - Ignore null/undef. values in uri.appendParams ([@adube](https://github.com/adube))
77 * [#5736](https://github.com/openlayers/openlayers/pull/5736) - Show `resultType` attribute in docs ([@tsauerwein](https://github.com/tsauerwein))
78 * [#5735](https://github.com/openlayers/openlayers/pull/5735) - Update eslint to version 3.3.1 🚀 ([@openlayers](https://github.com/openlayers))
79 * [#5731](https://github.com/openlayers/openlayers/pull/5731) - Added a pixelRatio adjust to the canvasTileLayer 'forEachLayerAtPixel… ([@Benjaki2](https://github.com/Benjaki2))
80 * [#5732](https://github.com/openlayers/openlayers/pull/5732) - Add missing curly braces in type annotations ([@fredj](https://github.com/fredj))
81 * [#5728](https://github.com/openlayers/openlayers/pull/5728) - Update closure-util to version 1.15.1 🚀 ([@openlayers](https://github.com/openlayers))
82 * [#5717](https://github.com/openlayers/openlayers/pull/5717) - Update phantomjs-prebuilt to version 2.1.12 🚀 ([@openlayers](https://github.com/openlayers))
83 * [#5725](https://github.com/openlayers/openlayers/pull/5725) - Remove tilerange assert from tilegrid/wmts ([@probins](https://github.com/probins))
84 * [#5723](https://github.com/openlayers/openlayers/pull/5723) - Update eslint to version 3.3.0 🚀 ([@openlayers](https://github.com/openlayers))
85 * [#5702](https://github.com/openlayers/openlayers/pull/5702) - Add rule to identify missing requires ([@tschaub](https://github.com/tschaub))
86 * [#5670](https://github.com/openlayers/openlayers/pull/5670) - Added image data value to 'forEachLayerAtPixel' method callback ([@Benjaki2](https://github.com/Benjaki2))
87 * [#5720](https://github.com/openlayers/openlayers/pull/5720) - Fix typo in tilegrid/wmts ([@probins](https://github.com/probins))
88 * [#5715](https://github.com/openlayers/openlayers/pull/5715) - Create a check-example task for smarter example checking with PhantomJS ([@ahocevar](https://github.com/ahocevar))
89 * [#5714](https://github.com/openlayers/openlayers/pull/5714) - Add FAQ entry about renderBuffer ([@tsauerwein](https://github.com/tsauerwein))
90 * [#5713](https://github.com/openlayers/openlayers/pull/5713) - Check examples with http protocol instead of file ([@ahocevar](https://github.com/ahocevar))
91 * [#5689](https://github.com/openlayers/openlayers/pull/5689) - Fix cursor change in translate interaction ([@pgiraud](https://github.com/pgiraud))
92 * [#5165](https://github.com/openlayers/openlayers/pull/5165) - Remove goog.addSingletonGetter function ([@fredj](https://github.com/fredj))
93 * [#5701](https://github.com/openlayers/openlayers/pull/5701) - Update phantomjs-prebuilt to version 2.1.11 🚀 ([@openlayers](https://github.com/openlayers))
94 * [#5698](https://github.com/openlayers/openlayers/pull/5698) - Custom rule to identify unused goog.require() calls ([@tschaub](https://github.com/tschaub))
95 * [#5699](https://github.com/openlayers/openlayers/pull/5699) - Update mocha to version 3.0.2 🚀 ([@openlayers](https://github.com/openlayers))
96 * [#5697](https://github.com/openlayers/openlayers/pull/5697) - Re-enable ESLint config ([@tschaub](https://github.com/tschaub))
97 * [#5693](https://github.com/openlayers/openlayers/pull/5693) - Reorganize files so they are named like their default export ([@tschaub](https://github.com/tschaub))
98 * [#5694](https://github.com/openlayers/openlayers/pull/5694) - layer.Base in Map not required ([@probins](https://github.com/probins))
99 * [#5695](https://github.com/openlayers/openlayers/pull/5695) - Remove unneeded requires in renderers ([@probins](https://github.com/probins))
100 * [#5692](https://github.com/openlayers/openlayers/pull/5692) - Small text fix ([@bngsudheer](https://github.com/bngsudheer))
101 * [#5682](https://github.com/openlayers/openlayers/pull/5682) - Update mocha to version 3.0.1 🚀 ([@openlayers](https://github.com/openlayers))
102 * [#5619](https://github.com/openlayers/openlayers/pull/5619) - Remove goog.asserts.* ([@ahocevar](https://github.com/ahocevar))
103 * [#5685](https://github.com/openlayers/openlayers/pull/5685) - Add a method to scale geometries ([@tschaub](https://github.com/tschaub))
104 * [#5674](https://github.com/openlayers/openlayers/pull/5674) - Support fractional zoom levels in ol.View#getZoom and #setZoom ([@ahocevar](https://github.com/ahocevar))
105 * [#5681](https://github.com/openlayers/openlayers/pull/5681) - Remove extra goog.require ([@fredj](https://github.com/fredj))
106 * [#5680](https://github.com/openlayers/openlayers/pull/5680) - Update phantomjs-prebuilt to version 2.1.10 🚀 ([@openlayers](https://github.com/openlayers))
107 * [#5668](https://github.com/openlayers/openlayers/pull/5668) - Added Intersects and Within filters into ol.format.wfs ([@cpsTinK](https://github.com/cpsTinK))
108 * [#5675](https://github.com/openlayers/openlayers/pull/5675) - Remove unused goog.provide ([@fredj](https://github.com/fredj))
109 * [#5673](https://github.com/openlayers/openlayers/pull/5673) - Add missing semicolon ([@ahocevar](https://github.com/ahocevar))
110 * [#5587](https://github.com/openlayers/openlayers/pull/5587) - Lazily create KML style defaults ([@ahocevar](https://github.com/ahocevar))
111 * [#5599](https://github.com/openlayers/openlayers/pull/5599) - Allow subpixel center on view ([@ahocevar](https://github.com/ahocevar))
112 * [#5630](https://github.com/openlayers/openlayers/pull/5630) - chore(build): guard against unterminated scripts ([@tlvince](https://github.com/tlvince))
113 * [#5669](https://github.com/openlayers/openlayers/pull/5669) - Fix Github links to specific lines on jsdoc pages ([@dtreiter](https://github.com/dtreiter))
114 * [#5667](https://github.com/openlayers/openlayers/pull/5667) - Do not return undefined from ol.proj.get ([@ahocevar](https://github.com/ahocevar))
115 * [#5665](https://github.com/openlayers/openlayers/pull/5665) - Update eslint to version 3.2.2 🚀 ([@openlayers](https://github.com/openlayers))
116 * [#5632](https://github.com/openlayers/openlayers/pull/5632) - Improve docs for the ol.LoadingStrategy type ([@ahocevar](https://github.com/ahocevar))
117 * [#5641](https://github.com/openlayers/openlayers/pull/5641) - De-randomize the listener map property ([@ahocevar](https://github.com/ahocevar))
118 * [#5664](https://github.com/openlayers/openlayers/pull/5664) - Update eslint to version 3.2.1 🚀 ([@openlayers](https://github.com/openlayers))
119 * [#5658](https://github.com/openlayers/openlayers/pull/5658) - Update marked to version 0.3.6 🚀 ([@openlayers](https://github.com/openlayers))
120 * [#5657](https://github.com/openlayers/openlayers/pull/5657) - Update phantomjs-prebuilt to version 2.1.9 🚀 ([@openlayers](https://github.com/openlayers))
121 * [#5652](https://github.com/openlayers/openlayers/pull/5652) - Make XHR work for file:// urls ([@ahocevar](https://github.com/ahocevar))
122 * [#5653](https://github.com/openlayers/openlayers/pull/5653) - Fix namespace in filter docs ([@ahocevar](https://github.com/ahocevar))
123 * [#5651](https://github.com/openlayers/openlayers/pull/5651) - Update coveralls to version 2.11.12 🚀 ([@openlayers](https://github.com/openlayers))
124 * [#5649](https://github.com/openlayers/openlayers/pull/5649) - Fix DateTime parsing with non-Zulu times ([@ahocevar](https://github.com/ahocevar))
125 * [#5648](https://github.com/openlayers/openlayers/pull/5648) - Update sinon to version 1.17.5 🚀 ([@openlayers](https://github.com/openlayers))
126 * [#5646](https://github.com/openlayers/openlayers/pull/5646) - Update phantomjs-prebuilt to version 2.1.8 🚀 ([@openlayers](https://github.com/openlayers))
127 * [#5644](https://github.com/openlayers/openlayers/pull/5644) - Update browserify to version 13.1.0 🚀 ([@openlayers](https://github.com/openlayers))
128 * [#5640](https://github.com/openlayers/openlayers/pull/5640) - Add example for usage of HERE Map Tile API ([@chrismayer](https://github.com/chrismayer))
129 * [#5579](https://github.com/openlayers/openlayers/pull/5579) - Update jquery to version 3.1.0 🚀 ([@openlayers](https://github.com/openlayers))
130 * [#5636](https://github.com/openlayers/openlayers/pull/5636) - Update clean-css to version 3.4.19 🚀 ([@openlayers](https://github.com/openlayers))
131 * [#5634](https://github.com/openlayers/openlayers/pull/5634) - Update async to version 2.0.1 🚀 ([@openlayers](https://github.com/openlayers))
132 * [#5622](https://github.com/openlayers/openlayers/pull/5622) - Update TileWMS.coordKeyPrefix_ on setUrls ([@rrutkows](https://github.com/rrutkows))
133 * [#5611](https://github.com/openlayers/openlayers/pull/5611) - Fix broken link to Google JavaScript Style Guide ([@ischas](https://github.com/ischas))
134 * [#5620](https://github.com/openlayers/openlayers/pull/5620) - Replace goog.getUid with ol.getUid ([@probins](https://github.com/probins))
135 * [#5614](https://github.com/openlayers/openlayers/pull/5614) - Replace goog.abstractMethod ([@probins](https://github.com/probins))
136 * [#5613](https://github.com/openlayers/openlayers/pull/5613) - Parse MVT id property ([@drnextgis](https://github.com/drnextgis))
137 * [#5612](https://github.com/openlayers/openlayers/pull/5612) - Update vector-tile to version 1.3.0 🚀 ([@openlayers](https://github.com/openlayers))
138 * [#5609](https://github.com/openlayers/openlayers/pull/5609) - Update eslint to version 3.1.1 🚀 ([@openlayers](https://github.com/openlayers))
139 * [#5605](https://github.com/openlayers/openlayers/pull/5605) - Remove goog.isObject not in assertions ([@probins](https://github.com/probins))
140 * [#5603](https://github.com/openlayers/openlayers/pull/5603) - Update eslint to version 3.1.0 🚀 ([@openlayers](https://github.com/openlayers))
141 * [#5597](https://github.com/openlayers/openlayers/pull/5597) - Avoid unnecessary getImageData calls in hit detection ([@schmidtk](https://github.com/schmidtk))
142 * [#5429](https://github.com/openlayers/openlayers/pull/5429) - Remove enums from tests ([@probins](https://github.com/probins))
143 * [#5516](https://github.com/openlayers/openlayers/pull/5516) - Remove goog.Uri from KML format ([@probins](https://github.com/probins))
144 * [#5598](https://github.com/openlayers/openlayers/pull/5598) - Clarify that default source.Vector loader only handles features ([@probins](https://github.com/probins))
145 * [#5595](https://github.com/openlayers/openlayers/pull/5595) - Use tile keys instead of coord keys ([@ahocevar](https://github.com/ahocevar))
146 * [#5594](https://github.com/openlayers/openlayers/pull/5594) - Add renderBuffer option for ol.source.ImageVector ([@ahocevar](https://github.com/ahocevar))
147 * [#5592](https://github.com/openlayers/openlayers/pull/5592) - Update coveralls to version 2.11.11 🚀 ([@openlayers](https://github.com/openlayers))
148 * [#5593](https://github.com/openlayers/openlayers/pull/5593) - Update async to version 2.0.0 🚀 ([@openlayers](https://github.com/openlayers))
149 * [#4194](https://github.com/openlayers/openlayers/pull/4194) - Remove usage of goog.color and closure named colors ([@bjornharrtell](https://github.com/bjornharrtell))
150 * [#5583](https://github.com/openlayers/openlayers/pull/5583) - Fix dead link for change event in API docs ([@ahocevar](https://github.com/ahocevar))
151 * [#5560](https://github.com/openlayers/openlayers/pull/5560) - Get rid of goog.isArrayLike ([@fredj](https://github.com/fredj))
152 * [#5573](https://github.com/openlayers/openlayers/pull/5573) - Determine ol.global in a way that works in more environments ([@ahocevar](https://github.com/ahocevar))
153 * [#5558](https://github.com/openlayers/openlayers/pull/5558) - Remove goog.Uri from tests ([@probins](https://github.com/probins))
154 * [#5578](https://github.com/openlayers/openlayers/pull/5578) - Add polyfills to copy/paste code ([@ahocevar](https://github.com/ahocevar))
155 * [#5577](https://github.com/openlayers/openlayers/pull/5577) - Fix olx.source.OSMOptions#url default value documentation ([@fredj](https://github.com/fredj))
156 * [#5576](https://github.com/openlayers/openlayers/pull/5576) - Use the word "documentation" ([@ahocevar](https://github.com/ahocevar))
157 * [#5575](https://github.com/openlayers/openlayers/pull/5575) - Add a bit more info about the library to the README ([@ahocevar](https://github.com/ahocevar))
158 * [#5574](https://github.com/openlayers/openlayers/pull/5574) - Add paragraph about supported browsers and polyfills ([@ahocevar](https://github.com/ahocevar))
159 * [#5570](https://github.com/openlayers/openlayers/pull/5570) - Upgrade JSTS in example to 1.2.0 ([@bjornharrtell](https://github.com/bjornharrtell))
160 * [#5566](https://github.com/openlayers/openlayers/pull/5566) - Fix ol.style.Image#getAnchor documentation ([@fredj](https://github.com/fredj))
161 * [#5546](https://github.com/openlayers/openlayers/pull/5546) - Remove useless target argument from ol.Event and subclass constructors ([@ahocevar](https://github.com/ahocevar))
162 * [#5565](https://github.com/openlayers/openlayers/pull/5565) - Reinsert goog.provide for enums in olx.js ([@probins](https://github.com/probins))
163 * [#5561](https://github.com/openlayers/openlayers/pull/5561) - Add unit tests for ol.View.createCenterConstraint ([@fredj](https://github.com/fredj))
164 * [#5563](https://github.com/openlayers/openlayers/pull/5563) - Return if a vertex was removed in ol.interaction.Modify#removeVertex_ ([@fredj](https://github.com/fredj))
165 * [#5533](https://github.com/openlayers/openlayers/pull/5533) - Make sure reprojected tiles are recreated on updateParams ([@ahocevar](https://github.com/ahocevar))
166 * [#5534](https://github.com/openlayers/openlayers/pull/5534) - Fix ScaleLine control documentation ([@ahocevar](https://github.com/ahocevar))
167 * [#5541](https://github.com/openlayers/openlayers/pull/5541) - Replace goog.isNumber ([@probins](https://github.com/probins))
168 * [#5552](https://github.com/openlayers/openlayers/pull/5552) - Replace goog.webgl. ([@probins](https://github.com/probins))
169 * [#5550](https://github.com/openlayers/openlayers/pull/5550) - Remove use of ol.vec.Mat4 calls remaining after #5482 ([@ahocevar](https://github.com/ahocevar))
170 * [#5507](https://github.com/openlayers/openlayers/pull/5507) - Remove use of goog.vec.* ([@ahocevar](https://github.com/ahocevar))