Merge pull request #4412 from ahocevar/revert-4344
Revert "Merge pull request #4344 from bartvde/issue-2844"
This commit is contained in:
@@ -150,7 +150,7 @@ ol.source.ImageMapGuide.prototype.getImageInternal =
|
||||
|
||||
var imageUrl = this.imageUrlFunction_(extent, size, projection);
|
||||
if (imageUrl !== undefined) {
|
||||
image = new ol.Image(extent, [resolution, resolution], pixelRatio,
|
||||
image = new ol.Image(extent, resolution, pixelRatio,
|
||||
this.getAttributions(), imageUrl, this.crossOrigin_,
|
||||
this.imageLoadFunction_);
|
||||
goog.events.listen(image, goog.events.EventType.CHANGE,
|
||||
|
||||
@@ -26,12 +26,10 @@ ol.source.ImageStatic = function(options) {
|
||||
|
||||
var imageExtent = options.imageExtent;
|
||||
|
||||
var xResolution, yResolution, resolutions, imgResolution;
|
||||
var resolution, resolutions;
|
||||
if (options.imageSize !== undefined) {
|
||||
xResolution = ol.extent.getWidth(imageExtent) / options.imageSize[0];
|
||||
yResolution = ol.extent.getHeight(imageExtent) / options.imageSize[1];
|
||||
imgResolution = [xResolution, yResolution];
|
||||
resolutions = [yResolution];
|
||||
resolution = ol.extent.getHeight(imageExtent) / options.imageSize[1];
|
||||
resolutions = [resolution];
|
||||
}
|
||||
|
||||
var crossOrigin = options.crossOrigin !== undefined ?
|
||||
@@ -52,8 +50,8 @@ ol.source.ImageStatic = function(options) {
|
||||
* @private
|
||||
* @type {ol.Image}
|
||||
*/
|
||||
this.image_ = new ol.Image(imageExtent, imgResolution, 1,
|
||||
attributions, options.url, crossOrigin, imageLoadFunction);
|
||||
this.image_ = new ol.Image(imageExtent, resolution, 1, attributions,
|
||||
options.url, crossOrigin, imageLoadFunction);
|
||||
goog.events.listen(this.image_, goog.events.EventType.CHANGE,
|
||||
this.handleImageChange, false, this);
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ ol.source.ImageWMS.prototype.getImageInternal =
|
||||
var image = this.image_;
|
||||
if (image &&
|
||||
this.renderedRevision_ == this.getRevision() &&
|
||||
image.getResolution()[0] == resolution &&
|
||||
image.getResolution() == resolution &&
|
||||
image.getPixelRatio() == pixelRatio &&
|
||||
ol.extent.containsExtent(image.getExtent(), extent)) {
|
||||
return image;
|
||||
@@ -239,7 +239,7 @@ ol.source.ImageWMS.prototype.getImageInternal =
|
||||
var url = this.getRequestUrl_(extent, this.imageSize_, pixelRatio,
|
||||
projection, params);
|
||||
|
||||
this.image_ = new ol.Image(extent, [resolution, resolution], pixelRatio,
|
||||
this.image_ = new ol.Image(extent, resolution, pixelRatio,
|
||||
this.getAttributions(), url, this.crossOrigin_, this.imageLoadFunction_);
|
||||
|
||||
this.renderedRevision_ = this.getRevision();
|
||||
|
||||
Reference in New Issue
Block a user