Compare commits

...

5 Commits

Author SHA1 Message Date
Tim Schaub
eb5607544c Update package version to 3.11.2 2015-11-19 11:32:41 -07:00
Tim Schaub
4999c792f1 Changelog for v3.11.2 2015-11-19 11:28:02 -07:00
Andreas Hocevar
5af338f92b Fix select interaction regression caused by #4391 2015-11-19 10:53:57 -07:00
Frederic Junod
071aad4815 Check ol.source.UrlTile#urls property for null value
Fixes #4446
2015-11-19 10:53:12 -07:00
Andreas Hocevar
a43cca7720 Allow '' for crossOrigin (as Anonymous alias)
This fixes a regression introduced by the goog.isDef removal.

From the HTML 5 spec: "The empty string is also a valid keyword, and
maps to the Anonymous state"
2015-11-19 10:48:35 -07:00
10 changed files with 34 additions and 11 deletions

11
changelog/v3.11.2.md Normal file
View File

@@ -0,0 +1,11 @@
# v3.11.2
## Summary
The v3.11.2 release is a patch release that addresses a few regressions in the v3.11.1 release. See the [v3.11.0 release notes](https://github.com/openlayers/ol3/releases/tag/v3.11.0) for details on upgrading from v3.10.
## Fixes
* [#4450](https://github.com/openlayers/ol3/pull/4450) - Fix select interaction regression caused by #4391 ([@ahocevar](https://github.com/ahocevar))
* [#4448](https://github.com/openlayers/ol3/pull/4448) - Check ol.source.UrlTile#urls property for null value ([@fredj](https://github.com/fredj))
* [#4439](https://github.com/openlayers/ol3/pull/4439) - Allow '' for crossOrigin (as Anonymous alias) ([@ahocevar](https://github.com/ahocevar))

View File

@@ -1,6 +1,6 @@
{
"name": "openlayers",
"version": "3.11.1",
"version": "3.11.2",
"description": "Build tools and sources for developing OpenLayers based mapping applications",
"keywords": [
"map",

View File

@@ -38,7 +38,7 @@ ol.Image = function(extent, resolution, pixelRatio, attributions, src,
* @type {Image}
*/
this.image_ = new Image();
if (crossOrigin) {
if (crossOrigin !== null) {
this.image_.crossOrigin = crossOrigin;
}

View File

@@ -37,7 +37,7 @@ ol.ImageTile = function(tileCoord, state, src, crossOrigin, tileLoadFunction) {
* @type {Image}
*/
this.image_ = new Image();
if (crossOrigin) {
if (crossOrigin !== null) {
this.image_.crossOrigin = crossOrigin;
}

View File

@@ -283,7 +283,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
* @param {ol.layer.Layer} layer Layer.
*/
function(feature, layer) {
if (layer && this.filter_(feature, layer)) {
if (!layer || this.filter_(feature, layer)) {
selected.push(feature);
this.addFeatureLayerAssociation_(feature, layer);
return !this.multi_;

View File

@@ -91,7 +91,7 @@ ol.source.TileArcGISRest.prototype.getRequestUrl_ =
pixelRatio, projection, params) {
var urls = this.urls;
if (urls.length === 0) {
if (!urls) {
return undefined;
}

View File

@@ -212,7 +212,7 @@ ol.source.TileWMS.prototype.getRequestUrl_ =
pixelRatio, projection, params) {
var urls = this.urls;
if (urls.length === 0) {
if (!urls) {
return undefined;
}
@@ -298,9 +298,11 @@ ol.source.TileWMS.prototype.resetCoordKeyPrefix_ = function() {
var i = 0;
var res = [];
var j, jj;
for (j = 0, jj = this.urls.length; j < jj; ++j) {
res[i++] = this.urls[j];
if (this.urls) {
var j, jj;
for (j = 0, jj = this.urls.length; j < jj; ++j) {
res[i++] = this.urls[j];
}
}
var key;

View File

@@ -392,7 +392,7 @@ ol.style.IconImage_ = function(image, src, size, crossOrigin, imageState) {
*/
this.image_ = !image ? new Image() : image;
if (crossOrigin) {
if (crossOrigin !== null) {
this.image_.crossOrigin = crossOrigin;
}

View File

@@ -179,7 +179,7 @@ describe('ol.interaction.Select', function() {
unmanaged.setMap(map);
map.renderSync();
simulateEvent(ol.MapBrowserEvent.EventType.SINGLECLICK, 10, -20);
expect(spy.firstCall.args[0]).to.not.equal(feature);
expect(spy.getCalls().length).to.be(0);
unmanaged.setMap(null);
});
});

View File

@@ -13,6 +13,16 @@ describe('ol.source.TileWMS', function() {
};
});
describe('constructor', function() {
it('can be constructed without url or urls params', function() {
var source = new ol.source.TileWMS({
projection: 'EPSG:3857',
tileGrid: ol.tilegrid.createXYZ({maxZoom: 6})
});
expect(source).to.be.an(ol.source.TileWMS);
});
});
describe('#getTile', function() {
it('returns a tile with the expected URL', function() {