Skip to content

v3.16.0

Compare
Choose a tag to compare
@ahocevar ahocevar released this 23 May 19:11

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 for ol.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 for ol.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 for ol.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.requires for typedefs should not be necessary.
Users compiling their code with the library should note that the following API @typedefs have been renamed; your code may need changing if you use these:

  • ol.format.WFS.FeatureCollectionMetadata to ol.WFSFeatureCollectionMetadata
  • ol.format.WFS.TransactionResponse to ol.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