Merge pull request #1029 from tschaub/tilejson-extent
Use proper extent structure for TileJSON.
This commit is contained in:
@@ -75,12 +75,9 @@ ol.source.TileJSON.prototype.handleTileJSONResponse = function() {
|
||||
|
||||
var extent;
|
||||
if (goog.isDef(tileJSON.bounds)) {
|
||||
var epsg4326Extent = [
|
||||
tileJSON.bounds.slice(0, 2), tileJSON.bounds.slice(2)
|
||||
];
|
||||
var transform = ol.proj.getTransformFromProjections(
|
||||
epsg4326Projection, this.getProjection());
|
||||
extent = ol.extent.transform(epsg4326Extent, transform);
|
||||
extent = ol.extent.transform(tileJSON.bounds, transform);
|
||||
this.setExtent(extent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user