Use named imports from extent
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_TileUrlFunction_ from '../TileUrlFunction.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {applyTransform, intersects} from '../extent.js';
|
||||
import _ol_net_ from '../net.js';
|
||||
import _ol_proj_ from '../proj.js';
|
||||
import _ol_source_State_ from '../source/State.js';
|
||||
@@ -185,21 +185,21 @@ _ol_source_BingMaps_.prototype.handleImageryMetadataResponse = function(response
|
||||
var attributions = [];
|
||||
var zoom = frameState.viewState.zoom;
|
||||
resource.imageryProviders.map(function(imageryProvider) {
|
||||
var intersects = false;
|
||||
var intersecting = false;
|
||||
var coverageAreas = imageryProvider.coverageAreas;
|
||||
for (var i = 0, ii = coverageAreas.length; i < ii; ++i) {
|
||||
var coverageArea = coverageAreas[i];
|
||||
if (zoom >= coverageArea.zoomMin && zoom <= coverageArea.zoomMax) {
|
||||
var bbox = coverageArea.bbox;
|
||||
var epsg4326Extent = [bbox[1], bbox[0], bbox[3], bbox[2]];
|
||||
var extent = _ol_extent_.applyTransform(epsg4326Extent, transform);
|
||||
if (_ol_extent_.intersects(extent, frameState.extent)) {
|
||||
intersects = true;
|
||||
var extent = applyTransform(epsg4326Extent, transform);
|
||||
if (intersects(extent, frameState.extent)) {
|
||||
intersecting = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (intersects) {
|
||||
if (intersecting) {
|
||||
attributions.push(imageryProvider.attribution);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_asserts_ from '../asserts.js';
|
||||
import _ol_Feature_ from '../Feature.js';
|
||||
import _ol_coordinate_ from '../coordinate.js';
|
||||
import _ol_events_EventType_ from '../events/EventType.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {buffer, createEmpty, createOrUpdateFromCoordinate} from '../extent.js';
|
||||
import _ol_geom_Point_ from '../geom/Point.js';
|
||||
import _ol_source_Vector_ from '../source/Vector.js';
|
||||
|
||||
@@ -140,7 +140,7 @@ _ol_source_Cluster_.prototype.cluster = function() {
|
||||
return;
|
||||
}
|
||||
this.features.length = 0;
|
||||
var extent = _ol_extent_.createEmpty();
|
||||
var extent = createEmpty();
|
||||
var mapDistance = this.distance * this.resolution;
|
||||
var features = this.source.getFeatures();
|
||||
|
||||
@@ -155,8 +155,8 @@ _ol_source_Cluster_.prototype.cluster = function() {
|
||||
var geometry = this.geometryFunction(feature);
|
||||
if (geometry) {
|
||||
var coordinates = geometry.getCoordinates();
|
||||
_ol_extent_.createOrUpdateFromCoordinate(coordinates, extent);
|
||||
_ol_extent_.buffer(extent, mapDistance, extent);
|
||||
createOrUpdateFromCoordinate(coordinates, extent);
|
||||
buffer(extent, mapDistance, extent);
|
||||
|
||||
var neighbors = this.source.getFeaturesInExtent(extent);
|
||||
neighbors = neighbors.filter(function(neighbor) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import {inherits} from '../index.js';
|
||||
import _ol_ImageState_ from '../ImageState.js';
|
||||
import _ol_array_ from '../array.js';
|
||||
import _ol_events_Event_ from '../events/Event.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {equals} from '../extent.js';
|
||||
import _ol_proj_ from '../proj.js';
|
||||
import _ol_reproj_Image_ from '../reproj/Image.js';
|
||||
import _ol_source_Source_ from '../source/Source.js';
|
||||
@@ -103,7 +103,7 @@ _ol_source_Image_.prototype.getImage = function(extent, resolution, pixelRatio,
|
||||
_ol_proj_.equivalent(
|
||||
this.reprojectedImage_.getProjection(), projection) &&
|
||||
this.reprojectedImage_.getResolution() == resolution &&
|
||||
_ol_extent_.equals(this.reprojectedImage_.getExtent(), extent)) {
|
||||
equals(this.reprojectedImage_.getExtent(), extent)) {
|
||||
return this.reprojectedImage_;
|
||||
}
|
||||
this.reprojectedImage_.dispose();
|
||||
|
||||
@@ -6,7 +6,7 @@ import _ol_Image_ from '../Image.js';
|
||||
import _ol_asserts_ from '../asserts.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import _ol_events_EventType_ from '../events/EventType.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {containsExtent, getHeight, getWidth} from '../extent.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import _ol_source_Image_ from '../source/Image.js';
|
||||
import _ol_uri_ from '../uri.js';
|
||||
@@ -128,7 +128,7 @@ _ol_source_ImageArcGISRest_.prototype.getImageInternal = function(extent, resolu
|
||||
this.renderedRevision_ == this.getRevision() &&
|
||||
image.getResolution() == resolution &&
|
||||
image.getPixelRatio() == pixelRatio &&
|
||||
_ol_extent_.containsExtent(image.getExtent(), extent)) {
|
||||
containsExtent(image.getExtent(), extent)) {
|
||||
return image;
|
||||
}
|
||||
|
||||
@@ -143,8 +143,8 @@ _ol_source_ImageArcGISRest_.prototype.getImageInternal = function(extent, resolu
|
||||
var centerX = (extent[0] + extent[2]) / 2;
|
||||
var centerY = (extent[1] + extent[3]) / 2;
|
||||
if (this.ratio_ != 1) {
|
||||
var halfWidth = this.ratio_ * _ol_extent_.getWidth(extent) / 2;
|
||||
var halfHeight = this.ratio_ * _ol_extent_.getHeight(extent) / 2;
|
||||
var halfWidth = this.ratio_ * getWidth(extent) / 2;
|
||||
var halfHeight = this.ratio_ * getHeight(extent) / 2;
|
||||
extent[0] = centerX - halfWidth;
|
||||
extent[1] = centerY - halfHeight;
|
||||
extent[2] = centerX + halfWidth;
|
||||
@@ -154,8 +154,8 @@ _ol_source_ImageArcGISRest_.prototype.getImageInternal = function(extent, resolu
|
||||
var imageResolution = resolution / pixelRatio;
|
||||
|
||||
// Compute an integer width and height.
|
||||
var width = Math.ceil(_ol_extent_.getWidth(extent) / imageResolution);
|
||||
var height = Math.ceil(_ol_extent_.getHeight(extent) / imageResolution);
|
||||
var width = Math.ceil(getWidth(extent) / imageResolution);
|
||||
var height = Math.ceil(getHeight(extent) / imageResolution);
|
||||
|
||||
// Modify the extent to match the integer width and height.
|
||||
extent[0] = centerX - imageResolution * width / 2;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_ImageCanvas_ from '../ImageCanvas.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {containsExtent, getHeight, getWidth, scaleFromCenter} from '../extent.js';
|
||||
import _ol_source_Image_ from '../source/Image.js';
|
||||
|
||||
/**
|
||||
@@ -66,14 +66,14 @@ _ol_source_ImageCanvas_.prototype.getImageInternal = function(extent, resolution
|
||||
this.renderedRevision_ == this.getRevision() &&
|
||||
canvas.getResolution() == resolution &&
|
||||
canvas.getPixelRatio() == pixelRatio &&
|
||||
_ol_extent_.containsExtent(canvas.getExtent(), extent)) {
|
||||
containsExtent(canvas.getExtent(), extent)) {
|
||||
return canvas;
|
||||
}
|
||||
|
||||
extent = extent.slice();
|
||||
_ol_extent_.scaleFromCenter(extent, this.ratio_);
|
||||
var width = _ol_extent_.getWidth(extent) / resolution;
|
||||
var height = _ol_extent_.getHeight(extent) / resolution;
|
||||
scaleFromCenter(extent, this.ratio_);
|
||||
var width = getWidth(extent) / resolution;
|
||||
var height = getHeight(extent) / resolution;
|
||||
var size = [width * pixelRatio, height * pixelRatio];
|
||||
|
||||
var canvasElement = this.canvasFunction_(
|
||||
|
||||
@@ -5,7 +5,7 @@ import {inherits} from '../index.js';
|
||||
import _ol_Image_ from '../Image.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import _ol_events_EventType_ from '../events/EventType.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {containsExtent, getCenter, getHeight, getWidth, scaleFromCenter} from '../extent.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import _ol_source_Image_ from '../source/Image.js';
|
||||
import _ol_uri_ from '../uri.js';
|
||||
@@ -126,16 +126,16 @@ _ol_source_ImageMapGuide_.prototype.getImageInternal = function(extent, resoluti
|
||||
this.renderedRevision_ == this.getRevision() &&
|
||||
image.getResolution() == resolution &&
|
||||
image.getPixelRatio() == pixelRatio &&
|
||||
_ol_extent_.containsExtent(image.getExtent(), extent)) {
|
||||
containsExtent(image.getExtent(), extent)) {
|
||||
return image;
|
||||
}
|
||||
|
||||
if (this.ratio_ != 1) {
|
||||
extent = extent.slice();
|
||||
_ol_extent_.scaleFromCenter(extent, this.ratio_);
|
||||
scaleFromCenter(extent, this.ratio_);
|
||||
}
|
||||
var width = _ol_extent_.getWidth(extent) / resolution;
|
||||
var height = _ol_extent_.getHeight(extent) / resolution;
|
||||
var width = getWidth(extent) / resolution;
|
||||
var height = getHeight(extent) / resolution;
|
||||
var size = [width * pixelRatio, height * pixelRatio];
|
||||
|
||||
if (this.url_ !== undefined) {
|
||||
@@ -174,8 +174,8 @@ _ol_source_ImageMapGuide_.prototype.getImageLoadFunction = function() {
|
||||
* @return {number} The computed map scale.
|
||||
*/
|
||||
_ol_source_ImageMapGuide_.getScale = function(extent, size, metersPerUnit, dpi) {
|
||||
var mcsW = _ol_extent_.getWidth(extent);
|
||||
var mcsH = _ol_extent_.getHeight(extent);
|
||||
var mcsW = getWidth(extent);
|
||||
var mcsH = getHeight(extent);
|
||||
var devW = size[0];
|
||||
var devH = size[1];
|
||||
var mpp = 0.0254 / dpi;
|
||||
@@ -209,7 +209,7 @@ _ol_source_ImageMapGuide_.prototype.updateParams = function(params) {
|
||||
_ol_source_ImageMapGuide_.prototype.getUrl = function(baseUrl, params, extent, size, projection) {
|
||||
var scale = _ol_source_ImageMapGuide_.getScale(extent, size,
|
||||
this.metersPerUnit_, this.displayDpi_);
|
||||
var center = _ol_extent_.getCenter(extent);
|
||||
var center = getCenter(extent);
|
||||
var baseParams = {
|
||||
'OPERATION': this.useOverlay_ ? 'GETDYNAMICMAPOVERLAYIMAGE' : 'GETMAPIMAGE',
|
||||
'VERSION': '2.0.0',
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_ImageState_ from '../ImageState.js';
|
||||
import _ol_dom_ from '../dom.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import _ol_events_EventType_ from '../events/EventType.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {intersects, getHeight, getWidth} from '../extent.js';
|
||||
import _ol_proj_ from '../proj.js';
|
||||
import _ol_source_Image_ from '../source/Image.js';
|
||||
|
||||
@@ -60,7 +60,7 @@ inherits(_ol_source_ImageStatic_, _ol_source_Image_);
|
||||
* @inheritDoc
|
||||
*/
|
||||
_ol_source_ImageStatic_.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
|
||||
if (_ol_extent_.intersects(extent, this.image_.getExtent())) {
|
||||
if (intersects(extent, this.image_.getExtent())) {
|
||||
return this.image_;
|
||||
}
|
||||
return null;
|
||||
@@ -82,8 +82,8 @@ _ol_source_ImageStatic_.prototype.handleImageChange = function(evt) {
|
||||
imageWidth = image.width;
|
||||
imageHeight = image.height;
|
||||
}
|
||||
var resolution = _ol_extent_.getHeight(imageExtent) / imageHeight;
|
||||
var targetWidth = Math.ceil(_ol_extent_.getWidth(imageExtent) / resolution);
|
||||
var resolution = getHeight(imageExtent) / imageHeight;
|
||||
var targetWidth = Math.ceil(getWidth(imageExtent) / resolution);
|
||||
if (targetWidth != imageWidth) {
|
||||
var context = _ol_dom_.createCanvasContext2D(targetWidth, imageHeight);
|
||||
var canvas = context.canvas;
|
||||
|
||||
+12
-13
@@ -8,7 +8,7 @@ import _ol_Image_ from '../Image.js';
|
||||
import _ol_asserts_ from '../asserts.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import _ol_events_EventType_ from '../events/EventType.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {containsExtent, getCenter, getForViewAndSize, getHeight, getWidth} from '../extent.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import _ol_proj_ from '../proj.js';
|
||||
import _ol_reproj_ from '../reproj.js';
|
||||
@@ -146,8 +146,7 @@ _ol_source_ImageWMS_.prototype.getGetFeatureInfoUrl = function(coordinate, resol
|
||||
coordinate = _ol_proj_.transform(coordinate, projectionObj, sourceProjectionObj);
|
||||
}
|
||||
|
||||
var extent = _ol_extent_.getForViewAndSize(
|
||||
coordinate, resolution, 0,
|
||||
var extent = getForViewAndSize(coordinate, resolution, 0,
|
||||
_ol_source_ImageWMS_.GETFEATUREINFO_IMAGE_SIZE_);
|
||||
|
||||
var baseParams = {
|
||||
@@ -199,14 +198,14 @@ _ol_source_ImageWMS_.prototype.getImageInternal = function(extent, resolution, p
|
||||
|
||||
var imageResolution = resolution / pixelRatio;
|
||||
|
||||
var center = _ol_extent_.getCenter(extent);
|
||||
var viewWidth = Math.ceil(_ol_extent_.getWidth(extent) / imageResolution);
|
||||
var viewHeight = Math.ceil(_ol_extent_.getHeight(extent) / imageResolution);
|
||||
var viewExtent = _ol_extent_.getForViewAndSize(center, imageResolution, 0,
|
||||
var center = getCenter(extent);
|
||||
var viewWidth = Math.ceil(getWidth(extent) / imageResolution);
|
||||
var viewHeight = Math.ceil(getHeight(extent) / imageResolution);
|
||||
var viewExtent = getForViewAndSize(center, imageResolution, 0,
|
||||
[viewWidth, viewHeight]);
|
||||
var requestWidth = Math.ceil(this.ratio_ * _ol_extent_.getWidth(extent) / imageResolution);
|
||||
var requestHeight = Math.ceil(this.ratio_ * _ol_extent_.getHeight(extent) / imageResolution);
|
||||
var requestExtent = _ol_extent_.getForViewAndSize(center, imageResolution, 0,
|
||||
var requestWidth = Math.ceil(this.ratio_ * getWidth(extent) / imageResolution);
|
||||
var requestHeight = Math.ceil(this.ratio_ * getHeight(extent) / imageResolution);
|
||||
var requestExtent = getForViewAndSize(center, imageResolution, 0,
|
||||
[requestWidth, requestHeight]);
|
||||
|
||||
var image = this.image_;
|
||||
@@ -214,7 +213,7 @@ _ol_source_ImageWMS_.prototype.getImageInternal = function(extent, resolution, p
|
||||
this.renderedRevision_ == this.getRevision() &&
|
||||
image.getResolution() == resolution &&
|
||||
image.getPixelRatio() == pixelRatio &&
|
||||
_ol_extent_.containsExtent(image.getExtent(), viewExtent)) {
|
||||
containsExtent(image.getExtent(), viewExtent)) {
|
||||
return image;
|
||||
}
|
||||
|
||||
@@ -227,8 +226,8 @@ _ol_source_ImageWMS_.prototype.getImageInternal = function(extent, resolution, p
|
||||
};
|
||||
_ol_obj_.assign(params, this.params_);
|
||||
|
||||
this.imageSize_[0] = Math.round(_ol_extent_.getWidth(requestExtent) / imageResolution);
|
||||
this.imageSize_[1] = Math.round(_ol_extent_.getHeight(requestExtent) / imageResolution);
|
||||
this.imageSize_[0] = Math.round(getWidth(requestExtent) / imageResolution);
|
||||
this.imageSize_[1] = Math.round(getHeight(requestExtent) / imageResolution);
|
||||
|
||||
var url = this.getRequestUrl_(requestExtent, this.imageSize_, pixelRatio,
|
||||
projection, params);
|
||||
|
||||
@@ -9,7 +9,7 @@ import _ol_events_ from '../events.js';
|
||||
import _ol_events_Event_ from '../events/Event.js';
|
||||
import _ol_events_EventType_ from '../events/EventType.js';
|
||||
import {Processor as _ol_ext_pixelworks_Processor_} from 'pixelworks';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {equals, getCenter, getHeight, getWidth} from '../extent.js';
|
||||
import _ol_layer_Image_ from '../layer/Image.js';
|
||||
import _ol_layer_Tile_ from '../layer/Tile.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
@@ -175,12 +175,12 @@ _ol_source_Raster_.prototype.updateFrameState_ = function(extent, resolution, pr
|
||||
frameState.viewState = /** @type {olx.ViewState} */ (
|
||||
_ol_obj_.assign({}, frameState.viewState));
|
||||
|
||||
var center = _ol_extent_.getCenter(extent);
|
||||
var center = getCenter(extent);
|
||||
|
||||
frameState.extent = extent.slice();
|
||||
frameState.focus = center;
|
||||
frameState.size[0] = Math.round(_ol_extent_.getWidth(extent) / resolution);
|
||||
frameState.size[1] = Math.round(_ol_extent_.getHeight(extent) / resolution);
|
||||
frameState.size[0] = Math.round(getWidth(extent) / resolution);
|
||||
frameState.size[1] = Math.round(getHeight(extent) / resolution);
|
||||
frameState.time = Date.now();
|
||||
frameState.animate = false;
|
||||
|
||||
@@ -226,7 +226,7 @@ _ol_source_Raster_.prototype.getImage = function(extent, resolution, pixelRatio,
|
||||
if (this.renderedImageCanvas_) {
|
||||
var renderedResolution = this.renderedImageCanvas_.getResolution();
|
||||
var renderedExtent = this.renderedImageCanvas_.getExtent();
|
||||
if (resolution !== renderedResolution || !_ol_extent_.equals(extent, renderedExtent)) {
|
||||
if (resolution !== renderedResolution || !equals(extent, renderedExtent)) {
|
||||
this.renderedImageCanvas_ = null;
|
||||
}
|
||||
}
|
||||
@@ -288,7 +288,7 @@ _ol_source_Raster_.prototype.onWorkerComplete_ = function(frameState, err, outpu
|
||||
var extent = frameState.extent;
|
||||
var resolution = frameState.viewState.resolution;
|
||||
if (resolution !== this.requestedFrameState_.viewState.resolution ||
|
||||
!_ol_extent_.equals(extent, this.requestedFrameState_.extent)) {
|
||||
!equals(extent, this.requestedFrameState_.extent)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -296,8 +296,8 @@ _ol_source_Raster_.prototype.onWorkerComplete_ = function(frameState, err, outpu
|
||||
if (this.renderedImageCanvas_) {
|
||||
context = this.renderedImageCanvas_.getImage().getContext('2d');
|
||||
} else {
|
||||
var width = Math.round(_ol_extent_.getWidth(extent) / resolution);
|
||||
var height = Math.round(_ol_extent_.getHeight(extent) / resolution);
|
||||
var width = Math.round(getWidth(extent) / resolution);
|
||||
var height = Math.round(getHeight(extent) / resolution);
|
||||
context = _ol_dom_.createCanvasContext2D(width, height);
|
||||
this.renderedImageCanvas_ = new _ol_ImageCanvas_(extent, resolution, 1, context.canvas);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/source/TileArcGISRest
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {createEmpty} from '../extent.js';
|
||||
import _ol_math_ from '../math.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import _ol_size_ from '../size.js';
|
||||
@@ -53,7 +53,7 @@ var _ol_source_TileArcGISRest_ = function(opt_options) {
|
||||
* @private
|
||||
* @type {ol.Extent}
|
||||
*/
|
||||
this.tmpExtent_ = _ol_extent_.createEmpty();
|
||||
this.tmpExtent_ = createEmpty();
|
||||
|
||||
this.setKey(this.getKeyForParams_());
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_TileUrlFunction_ from '../TileUrlFunction.js';
|
||||
import _ol_asserts_ from '../asserts.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {applyTransform, intersects} from '../extent.js';
|
||||
import _ol_net_ from '../net.js';
|
||||
import _ol_proj_ from '../proj.js';
|
||||
import _ol_source_State_ from '../source/State.js';
|
||||
@@ -121,7 +121,7 @@ _ol_source_TileJSON_.prototype.handleTileJSONResponse = function(tileJSON) {
|
||||
if (tileJSON.bounds !== undefined) {
|
||||
var transform = _ol_proj_.getTransformFromProjections(
|
||||
epsg4326Projection, sourceProjection);
|
||||
extent = _ol_extent_.applyTransform(tileJSON.bounds, transform);
|
||||
extent = applyTransform(tileJSON.bounds, transform);
|
||||
}
|
||||
|
||||
var minZoom = tileJSON.minzoom || 0;
|
||||
@@ -141,7 +141,7 @@ _ol_source_TileJSON_.prototype.handleTileJSONResponse = function(tileJSON) {
|
||||
extent : epsg4326Projection.getExtent();
|
||||
|
||||
this.setAttributions(function(frameState) {
|
||||
if (_ol_extent_.intersects(attributionExtent, frameState.extent)) {
|
||||
if (intersects(attributionExtent, frameState.extent)) {
|
||||
return [tileJSON.attribution];
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -8,7 +8,7 @@ import _ol_TileUrlFunction_ from '../TileUrlFunction.js';
|
||||
import _ol_asserts_ from '../asserts.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import _ol_events_EventType_ from '../events/EventType.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {applyTransform, intersects} from '../extent.js';
|
||||
import _ol_net_ from '../net.js';
|
||||
import _ol_proj_ from '../proj.js';
|
||||
import _ol_source_State_ from '../source/State.js';
|
||||
@@ -173,7 +173,7 @@ _ol_source_TileUTFGrid_.prototype.handleTileJSONResponse = function(tileJSON) {
|
||||
if (tileJSON.bounds !== undefined) {
|
||||
var transform = _ol_proj_.getTransformFromProjections(
|
||||
epsg4326Projection, sourceProjection);
|
||||
extent = _ol_extent_.applyTransform(tileJSON.bounds, transform);
|
||||
extent = applyTransform(tileJSON.bounds, transform);
|
||||
}
|
||||
|
||||
var minZoom = tileJSON.minzoom || 0;
|
||||
@@ -201,7 +201,7 @@ _ol_source_TileUTFGrid_.prototype.handleTileJSONResponse = function(tileJSON) {
|
||||
extent : epsg4326Projection.getExtent();
|
||||
|
||||
this.setAttributions(function(frameState) {
|
||||
if (_ol_extent_.intersects(attributionExtent, frameState.extent)) {
|
||||
if (intersects(attributionExtent, frameState.extent)) {
|
||||
return [tileJSON.attribution];
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import {DEFAULT_WMS_VERSION} from './common.js';
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_asserts_ from '../asserts.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {buffer, createEmpty} from '../extent.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import _ol_math_ from '../math.js';
|
||||
import _ol_proj_ from '../proj.js';
|
||||
@@ -85,7 +85,7 @@ var _ol_source_TileWMS_ = function(opt_options) {
|
||||
* @private
|
||||
* @type {ol.Extent}
|
||||
*/
|
||||
this.tmpExtent_ = _ol_extent_.createEmpty();
|
||||
this.tmpExtent_ = createEmpty();
|
||||
|
||||
this.updateV13_();
|
||||
this.setKey(this.getKeyForParams_());
|
||||
@@ -132,7 +132,7 @@ _ol_source_TileWMS_.prototype.getGetFeatureInfoUrl = function(coordinate, resolu
|
||||
var gutter = this.gutter_;
|
||||
if (gutter !== 0) {
|
||||
tileSize = _ol_size_.buffer(tileSize, gutter, this.tmpSize);
|
||||
tileExtent = _ol_extent_.buffer(tileExtent, tileResolution * gutter, tileExtent);
|
||||
tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);
|
||||
}
|
||||
|
||||
if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {
|
||||
@@ -304,8 +304,7 @@ _ol_source_TileWMS_.prototype.fixedTileUrlFunction = function(tileCoord, pixelRa
|
||||
var gutter = this.gutter_;
|
||||
if (gutter !== 0) {
|
||||
tileSize = _ol_size_.buffer(tileSize, gutter, this.tmpSize);
|
||||
tileExtent = _ol_extent_.buffer(tileExtent,
|
||||
tileResolution * gutter, tileExtent);
|
||||
tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);
|
||||
}
|
||||
|
||||
if (pixelRatio != 1) {
|
||||
|
||||
@@ -11,7 +11,7 @@ import _ol_asserts_ from '../asserts.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import _ol_events_Event_ from '../events/Event.js';
|
||||
import _ol_events_EventType_ from '../events/EventType.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {containsExtent, equals} from '../extent.js';
|
||||
import _ol_featureloader_ from '../featureloader.js';
|
||||
import _ol_functions_ from '../functions.js';
|
||||
import _ol_loadingstrategy_ from '../loadingstrategy.js';
|
||||
@@ -751,7 +751,7 @@ _ol_source_Vector_.prototype.loadFeatures = function(
|
||||
* @return {boolean} Contains.
|
||||
*/
|
||||
function(object) {
|
||||
return _ol_extent_.containsExtent(object.extent, extentToLoad);
|
||||
return containsExtent(object.extent, extentToLoad);
|
||||
});
|
||||
if (!alreadyLoaded) {
|
||||
this.loader_.call(this, extentToLoad, resolution, projection);
|
||||
@@ -770,7 +770,7 @@ _ol_source_Vector_.prototype.removeLoadedExtent = function(extent) {
|
||||
var loadedExtentsRtree = this.loadedExtentsRtree_;
|
||||
var obj;
|
||||
loadedExtentsRtree.forEachInExtent(extent, function(object) {
|
||||
if (_ol_extent_.equals(object.extent, extent)) {
|
||||
if (equals(object.extent, extent)) {
|
||||
obj = object;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_TileUrlFunction_ from '../TileUrlFunction.js';
|
||||
import _ol_array_ from '../array.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {containsExtent} from '../extent.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import _ol_proj_ from '../proj.js';
|
||||
import _ol_source_TileImage_ from '../source/TileImage.js';
|
||||
@@ -416,7 +416,7 @@ _ol_source_WMTS_.optionsFromCapabilities = function(wmtsCap, config) {
|
||||
if (projectionExtent) {
|
||||
// If possible, do a sanity check on the extent - it should never be
|
||||
// bigger than the validity extent of the projection of a matrix set.
|
||||
if (!_ol_extent_.containsExtent(projectionExtent, extent)) {
|
||||
if (!containsExtent(projectionExtent, extent)) {
|
||||
extent = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import _ol_TileState_ from '../TileState.js';
|
||||
import _ol_TileUrlFunction_ from '../TileUrlFunction.js';
|
||||
import _ol_asserts_ from '../asserts.js';
|
||||
import _ol_dom_ from '../dom.js';
|
||||
import _ol_extent_ from '../extent.js';
|
||||
import {getTopLeft} from '../extent.js';
|
||||
import _ol_size_ from '../size.js';
|
||||
import _ol_source_TileImage_ from '../source/TileImage.js';
|
||||
import _ol_tilegrid_TileGrid_ from '../tilegrid/TileGrid.js';
|
||||
@@ -84,7 +84,7 @@ var _ol_source_Zoomify_ = function(opt_options) {
|
||||
var tileGrid = new _ol_tilegrid_TileGrid_({
|
||||
tileSize: tileSize,
|
||||
extent: extent,
|
||||
origin: _ol_extent_.getTopLeft(extent),
|
||||
origin: getTopLeft(extent),
|
||||
resolutions: resolutions
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user