Add missing goog.require's

This commit is contained in:
Éric Lemoine
2013-02-20 11:53:54 +01:00
parent 689f8c9d9d
commit 68844007b8
2 changed files with 2 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
goog.provide('ol.ImageUrlFunction');
goog.provide('ol.ImageUrlFunctionType');
goog.require('goog.uri.utils');
goog.require('ol.Extent');
goog.require('ol.Size');
/**
* @typedef {function(ol.Extent, ol.Size): (string|undefined)}
*/
ol.ImageUrlFunctionType;
/**
* @param {string} baseUrl Base URL (may have query data).
* @return {ol.ImageUrlFunctionType} Image URL function.
*/
ol.ImageUrlFunction.createBboxParam = function(baseUrl) {
return function(extent, size) {
// FIXME Projection dependant axis order.
var bboxValue = [
extent.minX, extent.minY, extent.maxX, extent.maxY
].join(',');
return goog.uri.utils.appendParams(baseUrl,
'BBOX', bboxValue,
'HEIGHT', size.height,
'WIDTH', size.width);
};
};
/**
* @param {ol.Extent} extent Extent.
* @param {ol.Size} size Size.
* @return {string|undefined} Image URL.
*/
ol.ImageUrlFunction.nullImageUrlFunction =
function(extent, size) {
return undefined;
};

View File

@@ -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');