From 68844007b88dfc2c8ff6a2cf531c2533f2cda4c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 20 Feb 2013 11:53:54 +0100 Subject: [PATCH 1/3] Add missing goog.require's --- src/{ => ol}/imageurlfunction.js | 1 + src/ol/source/singleimagewmssource.js | 1 + 2 files changed, 2 insertions(+) rename src/{ => ol}/imageurlfunction.js (96%) diff --git a/src/imageurlfunction.js b/src/ol/imageurlfunction.js similarity index 96% rename from src/imageurlfunction.js rename to src/ol/imageurlfunction.js index bb328819eb..ebaec5c427 100644 --- a/src/imageurlfunction.js +++ b/src/ol/imageurlfunction.js @@ -1,6 +1,7 @@ goog.provide('ol.ImageUrlFunction'); goog.provide('ol.ImageUrlFunctionType'); +goog.require('goog.uri.utils'); goog.require('ol.Extent'); goog.require('ol.Size'); diff --git a/src/ol/source/singleimagewmssource.js b/src/ol/source/singleimagewmssource.js index 3529678443..84e66db61f 100644 --- a/src/ol/source/singleimagewmssource.js +++ b/src/ol/source/singleimagewmssource.js @@ -1,5 +1,6 @@ goog.provide('ol.source.SingleImageWMS'); +goog.require('goog.uri.utils'); goog.require('ol.Extent'); goog.require('ol.Image'); goog.require('ol.ImageUrlFunction'); From cf6a27fca39c2c0720f0f6dc999ab8632d55f76f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 20 Feb 2013 11:54:35 +0100 Subject: [PATCH 2/3] Export ol.Extent.prototype.getHeight and getWidth --- src/ol/extent.exports | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ol/extent.exports b/src/ol/extent.exports index 23e1785d4f..b52ee8007a 100644 --- a/src/ol/extent.exports +++ b/src/ol/extent.exports @@ -1,2 +1,3 @@ @exportSymbol ol.Extent - +@exportProperty ol.Extent.prototype.getHeight +@exportProperty ol.Extent.prototype.getWidth From 2bc8e1a5709c9d179ab89a358e7723cb9143a817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 20 Feb 2013 11:55:28 +0100 Subject: [PATCH 3/3] Example uses exported properties --- examples/wms-custom-proj.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/wms-custom-proj.js b/examples/wms-custom-proj.js index fea7b563dd..20b2b90072 100644 --- a/examples/wms-custom-proj.js +++ b/examples/wms-custom-proj.js @@ -29,9 +29,8 @@ ol.Projection.addProjection(epsg21781); // We give the single image source a set of resolutions. This prevents the // source from requesting images of arbitrary resolutions. var projectionExtent = epsg21781.getExtent(); -var maxResolution = Math.max( - projectionExtent.maxX - projectionExtent.minX, - projectionExtent.maxY - projectionExtent.minY) / 256; +var maxResolution = Math.max(projectionExtent.getWidth(), + projectionExtent.getHeight()) / 256; var resolutions = new Array(10); for (var i = 0; i < 10; ++i) { resolutions[i] = maxResolution / Math.pow(2.0, i);