Merge pull request #16 from elemoine/tilejson
use setExtent to set extent of TileJSON tile store
This commit is contained in:
@@ -110,8 +110,9 @@ ol.tilestore.TileJSON.prototype.handleTileJSONResponse = function() {
|
|||||||
var bounds = tileJSON.bounds;
|
var bounds = tileJSON.bounds;
|
||||||
epsg4326Extent = new ol.Extent(
|
epsg4326Extent = new ol.Extent(
|
||||||
bounds[0], bounds[1], bounds[2], bounds[3]);
|
bounds[0], bounds[1], bounds[2], bounds[3]);
|
||||||
this.extent = epsg4326Extent.transform(
|
var transformedExtent = epsg4326Extent.transform(
|
||||||
ol.Projection.getTransform(epsg4326Projection, this.getProjection()));
|
ol.Projection.getTransform(epsg4326Projection, this.getProjection()));
|
||||||
|
this.setExtent(transformedExtent);
|
||||||
} else {
|
} else {
|
||||||
epsg4326Extent = null;
|
epsg4326Extent = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user