Files
openlayers/changelog/v3.13.0.md
2017-01-02 23:03:03 +01:00

12 KiB

v3.13.0

Summary

The v3.13.0 release includes features and fixes from 68 pull requests since the v3.12.1 release. New features and improvements include:

  • Improved tiles rendering for the canvas renderer
  • Improved MapQuest rendering
  • Add color option to ol.style.Icon
  • Load TileJSON sources via XMLHttpRequest by default
  • Add new ol.geom.LineString#getCoordinateAt function
  • Simplify meters per unit handling
  • Use ESLint as a replacement for gjslint.py and jshint

Upgrade notes

proj4js integration

Before 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 changes

The 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.

Full list of changes