changelog/v3.13.0.md
The v3.13.0 release includes features and fixes from 68 pull requests since the v3.12.1 release. New features and improvements include:
proj4js integrationBefore 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 changesThe 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.