diff --git a/src/ol/browserfeature.js b/src/ol/browserfeature.js index b6ab5c1452..f6fadb4007 100644 --- a/src/ol/browserfeature.js +++ b/src/ol/browserfeature.js @@ -2,76 +2,11 @@ goog.provide('ol.BrowserFeature'); goog.require('goog.dom'); goog.require('goog.dom.TagName'); -goog.require('goog.userAgent'); +goog.require('ol'); goog.require('ol.dom'); goog.require('ol.webgl'); -/** - * @define {boolean} Assume touch. - */ -ol.ASSUME_TOUCH = false; - - -/** - * @define {boolean} Whether to enable canvas. - */ -ol.ENABLE_CANVAS = true; - - -/** - * @define {boolean} Whether to enable DOM. - */ -ol.ENABLE_DOM = true; - - -/** - * @define {boolean} Whether to enable rendering of image layers. - */ -ol.ENABLE_IMAGE = true; - - -/** - * @define {boolean} Whether to enable rendering of tile layers. - */ -ol.ENABLE_TILE = true; - - -/** - * @define {boolean} Whether to enable rendering of vector layers. - */ -ol.ENABLE_VECTOR = true; - - -/** - * @define {boolean} Whether to enable WebGL. - */ -ol.ENABLE_WEBGL = true; - - -/** - * @define {boolean} Whether to support legacy IE (7-8). - */ -ol.LEGACY_IE_SUPPORT = false; - - -/** - * The page is loaded using HTTPS. - * @const - * @type {boolean} - */ -ol.IS_HTTPS = goog.global.location.protocol === 'https:'; - - -/** - * Whether the current browser is legacy IE - * @const - * @type {boolean} - */ -ol.IS_LEGACY_IE = goog.userAgent.IE && - !goog.userAgent.isVersionOrHigher('9.0') && goog.userAgent.VERSION !== ''; - - /** * The ratio between physical pixels and device-independent pixels * (dips) on the device (`window.devicePixelRatio`). diff --git a/src/ol/color/color.js b/src/ol/color/color.js index b33768ca52..10775dc3ae 100644 --- a/src/ol/color/color.js +++ b/src/ol/color/color.js @@ -11,14 +11,7 @@ goog.require('goog.color'); goog.require('goog.color.names'); goog.require('goog.math'); goog.require('goog.vec.Mat4'); - - -/** - * @define {boolean} Enable named colors. - * Enabling named colors adds about 3KB uncompressed / 1.5KB compressed to the - * final build size. - */ -ol.color.ENABLE_NAMED_COLORS = true; +goog.require('ol'); /** @@ -212,7 +205,7 @@ ol.color.fromString = ( ol.color.fromStringInternal_ = function(s) { var isHex = false; - if (ol.color.ENABLE_NAMED_COLORS && goog.color.names.hasOwnProperty(s)) { + if (ol.ENABLE_NAMED_COLORS && goog.color.names.hasOwnProperty(s)) { // goog.color.names does not have a type declaration, so add a typecast s = /** @type {string} */ (goog.color.names[s]); isHex = true; diff --git a/src/ol/control/zoomslidercontrol.js b/src/ol/control/zoomslidercontrol.js index d10b8d2825..f38ff16cc1 100644 --- a/src/ol/control/zoomslidercontrol.js +++ b/src/ol/control/zoomslidercontrol.js @@ -15,18 +15,13 @@ goog.require('goog.fx.Dragger.EventType'); goog.require('goog.math'); goog.require('goog.math.Rect'); goog.require('goog.style'); +goog.require('ol'); goog.require('ol.animation'); goog.require('ol.control.Control'); goog.require('ol.css'); goog.require('ol.easing'); -/** - * @define {number} Animation duration. - */ -ol.control.ZOOMSLIDER_ANIMATION_DURATION = 200; - - /** * A slider type of control for zooming. @@ -190,7 +185,7 @@ ol.control.ZoomSlider.prototype.handleContainerClick_ = function(browserEvent) { goog.asserts.assert(goog.isDef(resolution)); map.beforeRender(ol.animation.zoom({ resolution: resolution, - duration: ol.control.ZOOMSLIDER_ANIMATION_DURATION, + duration: ol.ZOOMSLIDER_ANIMATION_DURATION, easing: ol.easing.easeOut })); resolution = view.constrainResolution(resolution); @@ -295,7 +290,7 @@ ol.control.ZoomSlider.prototype.handleSliderChange_ = function(e) { goog.asserts.assert(goog.isDef(this.currentResolution_)); map.beforeRender(ol.animation.zoom({ resolution: this.currentResolution_, - duration: ol.control.ZOOMSLIDER_ANIMATION_DURATION, + duration: ol.ZOOMSLIDER_ANIMATION_DURATION, easing: ol.easing.easeOut })); resolution = view.constrainResolution(this.currentResolution_); diff --git a/src/ol/dom/dom.js b/src/ol/dom/dom.js index 387d49dc99..32127f77d9 100644 --- a/src/ol/dom/dom.js +++ b/src/ol/dom/dom.js @@ -9,6 +9,7 @@ goog.require('goog.dom.TagName'); goog.require('goog.style'); goog.require('goog.userAgent'); goog.require('goog.vec.Mat4'); +goog.require('ol'); /** diff --git a/src/ol/interaction/dragboxinteraction.js b/src/ol/interaction/dragboxinteraction.js index 3cefb74049..d24e2bee68 100644 --- a/src/ol/interaction/dragboxinteraction.js +++ b/src/ol/interaction/dragboxinteraction.js @@ -7,18 +7,13 @@ goog.provide('ol.interaction.DragBox'); goog.require('goog.asserts'); goog.require('goog.events.Event'); goog.require('goog.functions'); +goog.require('ol'); goog.require('ol.events.ConditionType'); goog.require('ol.events.condition'); goog.require('ol.interaction.Pointer'); goog.require('ol.render.Box'); -/** - * @define {number} Hysterisis pixels. - */ -ol.DRAG_BOX_HYSTERESIS_PIXELS = 8; - - /** * @const * @type {number} diff --git a/src/ol/interaction/dragrotateandzoominteraction.js b/src/ol/interaction/dragrotateandzoominteraction.js index 658b4d99a4..9398710beb 100644 --- a/src/ol/interaction/dragrotateandzoominteraction.js +++ b/src/ol/interaction/dragrotateandzoominteraction.js @@ -5,6 +5,7 @@ goog.provide('ol.interaction.DragRotateAndZoom'); goog.require('goog.asserts'); goog.require('goog.functions'); goog.require('goog.math.Vec2'); +goog.require('ol'); goog.require('ol.ViewHint'); goog.require('ol.events.ConditionType'); goog.require('ol.events.condition'); @@ -12,12 +13,6 @@ goog.require('ol.interaction.Interaction'); goog.require('ol.interaction.Pointer'); -/** - * @define {number} Animation duration. - */ -ol.interaction.DRAGROTATEANDZOOM_ANIMATION_DURATION = 400; - - /** * Allows the user to zoom and rotate the map by clicking and dragging @@ -125,7 +120,7 @@ ol.interaction.DragRotateAndZoom.prototype.handlePointerUp = var direction = this.lastScaleDelta_ - 1; ol.interaction.Interaction.rotate(map, view2D, view2DState.rotation); ol.interaction.Interaction.zoom(map, view2D, view2DState.resolution, - undefined, ol.interaction.DRAGROTATEANDZOOM_ANIMATION_DURATION, + undefined, ol.DRAGROTATEANDZOOM_ANIMATION_DURATION, direction); this.lastScaleDelta_ = 0; return false; diff --git a/src/ol/interaction/dragrotateinteraction.js b/src/ol/interaction/dragrotateinteraction.js index 1f383c41f0..c45595040e 100644 --- a/src/ol/interaction/dragrotateinteraction.js +++ b/src/ol/interaction/dragrotateinteraction.js @@ -1,6 +1,7 @@ goog.provide('ol.interaction.DragRotate'); goog.require('goog.asserts'); +goog.require('ol'); goog.require('ol.ViewHint'); goog.require('ol.events.ConditionType'); goog.require('ol.events.condition'); @@ -8,12 +9,6 @@ goog.require('ol.interaction.Interaction'); goog.require('ol.interaction.Pointer'); -/** - * @define {number} Animation duration. - */ -ol.interaction.DRAGROTATE_ANIMATION_DURATION = 250; - - /** * Allows the user to rotate the map by clicking and dragging on the map, @@ -93,7 +88,7 @@ ol.interaction.DragRotate.prototype.handlePointerUp = var view2D = view.getView2D(); var view2DState = view2D.getView2DState(); ol.interaction.Interaction.rotate(map, view2D, view2DState.rotation, - undefined, ol.interaction.DRAGROTATE_ANIMATION_DURATION); + undefined, ol.DRAGROTATE_ANIMATION_DURATION); return false; }; diff --git a/src/ol/interaction/dragzoominteraction.js b/src/ol/interaction/dragzoominteraction.js index 5723f1e6b0..befa5d112e 100644 --- a/src/ol/interaction/dragzoominteraction.js +++ b/src/ol/interaction/dragzoominteraction.js @@ -1,6 +1,7 @@ goog.provide('ol.interaction.DragZoom'); goog.require('goog.asserts'); +goog.require('ol'); goog.require('ol.events.condition'); goog.require('ol.extent'); goog.require('ol.interaction.DragBox'); @@ -9,12 +10,6 @@ goog.require('ol.style.Stroke'); goog.require('ol.style.Style'); -/** - * @define {number} Animation duration. - */ -ol.interaction.DRAGZOOM_ANIMATION_DURATION = 200; - - /** * Allows the user to zoom the map by clicking and dragging on the map, @@ -62,5 +57,5 @@ ol.interaction.DragZoom.prototype.onBoxEnd = function() { var center = ol.extent.getCenter(extent); ol.interaction.Interaction.zoom(map, view, view.getResolutionForExtent(extent, map.getSize()), - center, ol.interaction.DRAGZOOM_ANIMATION_DURATION); + center, ol.DRAGZOOM_ANIMATION_DURATION); }; diff --git a/src/ol/interaction/keyboardpaninteraction.js b/src/ol/interaction/keyboardpaninteraction.js index 1b9125c0fb..2a2c4fac4c 100644 --- a/src/ol/interaction/keyboardpaninteraction.js +++ b/src/ol/interaction/keyboardpaninteraction.js @@ -6,6 +6,7 @@ goog.require('goog.asserts'); goog.require('goog.events.KeyCodes'); goog.require('goog.events.KeyHandler.EventType'); goog.require('goog.functions'); +goog.require('ol'); goog.require('ol.View2D'); goog.require('ol.coordinate'); goog.require('ol.events.ConditionType'); @@ -13,12 +14,6 @@ goog.require('ol.events.condition'); goog.require('ol.interaction.Interaction'); -/** - * @define {number} Pan duration. - */ -ol.interaction.KEYBOARD_PAN_DURATION = 100; - - /** * Allows the user to pan the map using keyboard arrows. @@ -93,7 +88,7 @@ ol.interaction.KeyboardPan.prototype.handleMapBrowserEvent = var delta = [deltaX, deltaY]; ol.coordinate.rotate(delta, view2DState.rotation); ol.interaction.Interaction.pan( - map, view, delta, ol.interaction.KEYBOARD_PAN_DURATION); + map, view, delta, ol.KEYBOARD_PAN_DURATION); mapBrowserEvent.preventDefault(); stopEvent = true; } diff --git a/src/ol/interaction/mousewheelzoominteraction.js b/src/ol/interaction/mousewheelzoominteraction.js index cb7db3a2ab..3ba6d97a59 100644 --- a/src/ol/interaction/mousewheelzoominteraction.js +++ b/src/ol/interaction/mousewheelzoominteraction.js @@ -6,22 +6,11 @@ goog.require('goog.asserts'); goog.require('goog.events.MouseWheelEvent'); goog.require('goog.events.MouseWheelHandler.EventType'); goog.require('goog.math'); +goog.require('ol'); goog.require('ol.Coordinate'); goog.require('ol.interaction.Interaction'); -/** - * @define {number} Maximum delta. - */ -ol.interaction.MOUSEWHEELZOOM_MAXDELTA = 1; - - -/** - * @define {number} Timeout duration. - */ -ol.interaction.MOUSEWHEELZOOM_TIMEOUT_DURATION = 80; - - /** * Allows the user to zoom the map by scrolling the mouse wheel. @@ -89,7 +78,7 @@ ol.interaction.MouseWheelZoom.prototype.handleMapBrowserEvent = this.startTime_ = goog.now(); } - var duration = ol.interaction.MOUSEWHEELZOOM_TIMEOUT_DURATION; + var duration = ol.MOUSEWHEELZOOM_TIMEOUT_DURATION; var timeLeft = Math.max(duration - (goog.now() - this.startTime_), 0); goog.global.clearTimeout(this.timeoutId_); @@ -108,7 +97,7 @@ ol.interaction.MouseWheelZoom.prototype.handleMapBrowserEvent = * @param {ol.Map} map Map. */ ol.interaction.MouseWheelZoom.prototype.doZoom_ = function(map) { - var maxDelta = ol.interaction.MOUSEWHEELZOOM_MAXDELTA; + var maxDelta = ol.MOUSEWHEELZOOM_MAXDELTA; var delta = goog.math.clamp(this.delta_, -maxDelta, maxDelta); // FIXME works for View2D only diff --git a/src/ol/interaction/pinchrotateinteraction.js b/src/ol/interaction/pinchrotateinteraction.js index 76c2d5355e..30178accb1 100644 --- a/src/ol/interaction/pinchrotateinteraction.js +++ b/src/ol/interaction/pinchrotateinteraction.js @@ -4,18 +4,13 @@ goog.provide('ol.interaction.PinchRotate'); goog.require('goog.asserts'); goog.require('goog.style'); +goog.require('ol'); goog.require('ol.Coordinate'); goog.require('ol.ViewHint'); goog.require('ol.interaction.Interaction'); goog.require('ol.interaction.Pointer'); -/** - * @define {number} Animation duration. - */ -ol.interaction.ROTATE_ANIMATION_DURATION = 250; - - /** * Allows the user to rotate the map by twisting with two fingers @@ -131,7 +126,7 @@ ol.interaction.PinchRotate.prototype.handlePointerUp = var view2DState = view2D.getView2DState(); ol.interaction.Interaction.rotate( map, view2D, view2DState.rotation, this.anchor_, - ol.interaction.ROTATE_ANIMATION_DURATION); + ol.ROTATE_ANIMATION_DURATION); } return false; } else { diff --git a/src/ol/mapbrowserevent.js b/src/ol/mapbrowserevent.js index ed2fbb4322..d381f9783c 100644 --- a/src/ol/mapbrowserevent.js +++ b/src/ol/mapbrowserevent.js @@ -10,6 +10,7 @@ goog.require('goog.events.BrowserEvent'); goog.require('goog.events.EventTarget'); goog.require('goog.events.EventType'); goog.require('goog.object'); +goog.require('ol'); goog.require('ol.Coordinate'); goog.require('ol.MapEvent'); goog.require('ol.Pixel'); diff --git a/src/ol/ol.js b/src/ol/ol.js index e22bd02a73..e2048e2c82 100644 --- a/src/ol/ol.js +++ b/src/ol/ol.js @@ -1,9 +1,180 @@ +goog.require('goog.userAgent'); + goog.provide('ol'); +/** + * @define {boolean} Assume touch. + */ +ol.ASSUME_TOUCH = false; + + +/** + * @define {boolean} Replace unused entries with NaNs. + */ +ol.BUFFER_REPLACE_UNUSED_ENTRIES_WITH_NANS = goog.DEBUG; + + +/** + * @define {number} Default maximum zoom for default tile grids. + */ +ol.DEFAULT_MAX_ZOOM = 42; + + +/** + * @define {number} Default high water mark. + */ +ol.DEFAULT_TILE_CACHE_HIGH_WATER_MARK = 2048; + + +/** + * @define {number} Default tile size. + */ +ol.DEFAULT_TILE_SIZE = 256; + + +/** + * @define {string} Default WMS version. + */ +ol.DEFAULT_WMS_VERSION = '1.3.0'; + + +/** + * @define {number} Drag-rotate-zoom animation duration. + */ +ol.DRAGROTATEANDZOOM_ANIMATION_DURATION = 400; + + +/** + * @define {number} Drag-rotate animation duration. + */ +ol.DRAGROTATE_ANIMATION_DURATION = 250; + + +/** + * @define {number} Drag-zoom animation duration. + */ +ol.DRAGZOOM_ANIMATION_DURATION = 200; + + +/** + * @define {number} Hysterisis pixels. + */ +ol.DRAG_BOX_HYSTERESIS_PIXELS = 8; + + +/** + * @define {boolean} Whether to enable canvas. + */ +ol.ENABLE_CANVAS = true; + + +/** + * @define {boolean} Whether to enable DOM. + */ +ol.ENABLE_DOM = true; + + +/** + * @define {boolean} Whether to enable rendering of image layers. + */ +ol.ENABLE_IMAGE = true; + + +/** + * @define {boolean} Enable named colors. + * Enabling named colors adds about 3KB uncompressed / 1.5KB compressed to the + * final build size. + */ +ol.ENABLE_NAMED_COLORS = true; + + +/** + * @define {boolean} Enable Proj4js. + */ +ol.ENABLE_PROJ4JS = true; + + +/** + * @define {boolean} Whether to enable rendering of tile layers. + */ +ol.ENABLE_TILE = true; + + +/** + * @define {boolean} Whether to enable rendering of vector layers. + */ +ol.ENABLE_VECTOR = true; + + +/** + * @define {boolean} Whether to enable WebGL. + */ +ol.ENABLE_WEBGL = true; + + +/** + * @define {boolean} Whether to support legacy IE (7-8). + */ +ol.LEGACY_IE_SUPPORT = false; + + +/** + * The page is loaded using HTTPS. + * @const + * @type {boolean} + */ +ol.IS_HTTPS = goog.global.location.protocol === 'https:'; + + +/** + * Whether the current browser is legacy IE + * @const + * @type {boolean} + */ +ol.IS_LEGACY_IE = goog.userAgent.IE && + !goog.userAgent.isVersionOrHigher('9.0') && goog.userAgent.VERSION !== ''; + + +/** + * @define {number} Keyboard pan duration. + */ +ol.KEYBOARD_PAN_DURATION = 100; + + +/** + * @define {number} Maximum mouse wheel delta. + */ +ol.MOUSEWHEELZOOM_MAXDELTA = 1; + + +/** + * @define {number} Mouse wheel timeout duration. + */ +ol.MOUSEWHEELZOOM_TIMEOUT_DURATION = 80; + + +/** + * @define {number} Rotate animation duration. + */ +ol.ROTATE_ANIMATION_DURATION = 250; + + +/** + * @define {number} Texture cache high water mark. + */ +ol.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024; + + +/** + * @define {number} Zoom slider animation duration. + */ +ol.ZOOMSLIDER_ANIMATION_DURATION = 200; + + /** * ol.inherits is an alias to the goog.inherits function. It is exported - * for use in non-compiled application code. See ol.exports. + * for use in non-compiled application code. * * FIXME: We use a new line to fake the linter. Without the new line the * linter complains with: diff --git a/src/ol/proj/proj.js b/src/ol/proj/proj.js index 71601e09e3..bb0fc8e124 100644 --- a/src/ol/proj/proj.js +++ b/src/ol/proj/proj.js @@ -7,17 +7,12 @@ goog.provide('ol.proj.Units'); goog.require('goog.array'); goog.require('goog.asserts'); goog.require('goog.object'); +goog.require('ol'); goog.require('ol.Extent'); goog.require('ol.TransformFunction'); goog.require('ol.sphere.NORMAL'); -/** - * @define {boolean} Enable Proj4js. - */ -ol.ENABLE_PROJ4JS = true; - - /** * Have Proj4js. * @const diff --git a/src/ol/renderer/canvas/canvasmaprenderer.js b/src/ol/renderer/canvas/canvasmaprenderer.js index e0d499a520..29686da90d 100644 --- a/src/ol/renderer/canvas/canvasmaprenderer.js +++ b/src/ol/renderer/canvas/canvasmaprenderer.js @@ -6,6 +6,7 @@ goog.require('goog.asserts'); goog.require('goog.dom'); goog.require('goog.style'); goog.require('goog.vec.Mat4'); +goog.require('ol'); goog.require('ol.css'); goog.require('ol.dom'); goog.require('ol.layer.Image'); diff --git a/src/ol/renderer/dom/dommaprenderer.js b/src/ol/renderer/dom/dommaprenderer.js index 8f5eec30ca..c055d038e1 100644 --- a/src/ol/renderer/dom/dommaprenderer.js +++ b/src/ol/renderer/dom/dommaprenderer.js @@ -5,6 +5,7 @@ goog.require('goog.dom'); goog.require('goog.dom.TagName'); goog.require('goog.functions'); goog.require('goog.style'); +goog.require('ol'); goog.require('ol.css'); goog.require('ol.layer.Image'); goog.require('ol.layer.Tile'); diff --git a/src/ol/renderer/dom/domtilelayerrenderer.js b/src/ol/renderer/dom/domtilelayerrenderer.js index 439fa0e145..f76952cbb7 100644 --- a/src/ol/renderer/dom/domtilelayerrenderer.js +++ b/src/ol/renderer/dom/domtilelayerrenderer.js @@ -10,6 +10,7 @@ goog.require('goog.dom.TagName'); goog.require('goog.object'); goog.require('goog.style'); goog.require('goog.vec.Mat4'); +goog.require('ol'); goog.require('ol.Coordinate'); goog.require('ol.Tile'); goog.require('ol.TileCoord'); diff --git a/src/ol/renderer/webgl/webglmaprenderer.js b/src/ol/renderer/webgl/webglmaprenderer.js index df1f4597d1..c971e900e8 100644 --- a/src/ol/renderer/webgl/webglmaprenderer.js +++ b/src/ol/renderer/webgl/webglmaprenderer.js @@ -13,6 +13,7 @@ goog.require('goog.log.Logger'); goog.require('goog.object'); goog.require('goog.style'); goog.require('goog.webgl'); +goog.require('ol'); goog.require('ol.Tile'); goog.require('ol.css'); goog.require('ol.dom'); @@ -33,12 +34,6 @@ goog.require('ol.webgl.Context'); goog.require('ol.webgl.WebGLContextEventType'); -/** - * @define {number} Texture cache high water mark. - */ -ol.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024; - - /** * @typedef {{magFilter: number, minFilter: number, texture: WebGLTexture}} */ diff --git a/src/ol/source/bingmapssource.js b/src/ol/source/bingmapssource.js index 0562241565..457eb1a489 100644 --- a/src/ol/source/bingmapssource.js +++ b/src/ol/source/bingmapssource.js @@ -4,6 +4,7 @@ goog.require('goog.Uri'); goog.require('goog.array'); goog.require('goog.asserts'); goog.require('goog.net.Jsonp'); +goog.require('ol'); goog.require('ol.Attribution'); goog.require('ol.TileRange'); goog.require('ol.TileUrlFunction'); diff --git a/src/ol/source/imagewmssource.js b/src/ol/source/imagewmssource.js index cdbc7d995a..cddef34393 100644 --- a/src/ol/source/imagewmssource.js +++ b/src/ol/source/imagewmssource.js @@ -6,6 +6,7 @@ goog.require('goog.asserts'); goog.require('goog.object'); goog.require('goog.string'); goog.require('goog.uri.utils'); +goog.require('ol'); goog.require('ol.Image'); goog.require('ol.extent'); goog.require('ol.proj'); @@ -150,7 +151,7 @@ ol.source.ImageWMS.prototype.getGetFeatureInfoUrl = var baseParams = { 'SERVICE': 'WMS', - 'VERSION': ol.source.wms.DEFAULT_VERSION, + 'VERSION': ol.DEFAULT_WMS_VERSION, 'REQUEST': 'GetFeatureInfo', 'FORMAT': 'image/png', 'TRANSPARENT': true, @@ -208,7 +209,7 @@ ol.source.ImageWMS.prototype.getImage = var params = { 'SERVICE': 'WMS', - 'VERSION': ol.source.wms.DEFAULT_VERSION, + 'VERSION': ol.DEFAULT_WMS_VERSION, 'REQUEST': 'GetMap', 'FORMAT': 'image/png', 'TRANSPARENT': true @@ -355,6 +356,6 @@ ol.source.ImageWMS.prototype.updateParams = function(params) { */ ol.source.ImageWMS.prototype.updateV13_ = function() { var version = - goog.object.get(this.params_, 'VERSION', ol.source.wms.DEFAULT_VERSION); + goog.object.get(this.params_, 'VERSION', ol.DEFAULT_WMS_VERSION); this.v13_ = goog.string.compareVersions(version, '1.3') >= 0; }; diff --git a/src/ol/source/mapquestsource.js b/src/ol/source/mapquestsource.js index 8d9287dc11..3705a00a5d 100644 --- a/src/ol/source/mapquestsource.js +++ b/src/ol/source/mapquestsource.js @@ -1,6 +1,7 @@ goog.provide('ol.source.MapQuest'); goog.require('goog.asserts'); +goog.require('ol'); goog.require('ol.Attribution'); goog.require('ol.source.OSM'); goog.require('ol.source.XYZ'); diff --git a/src/ol/source/osmsource.js b/src/ol/source/osmsource.js index ba07e01629..9dac5d83cf 100644 --- a/src/ol/source/osmsource.js +++ b/src/ol/source/osmsource.js @@ -1,5 +1,6 @@ goog.provide('ol.source.OSM'); +goog.require('ol'); goog.require('ol.Attribution'); goog.require('ol.source.XYZ'); diff --git a/src/ol/source/stamensource.js b/src/ol/source/stamensource.js index 0d4c5c36a0..9f7e00aab0 100644 --- a/src/ol/source/stamensource.js +++ b/src/ol/source/stamensource.js @@ -1,6 +1,7 @@ goog.provide('ol.source.Stamen'); goog.require('goog.asserts'); +goog.require('ol'); goog.require('ol.Attribution'); goog.require('ol.source.OSM'); goog.require('ol.source.XYZ'); diff --git a/src/ol/source/tilewmssource.js b/src/ol/source/tilewmssource.js index 3bdf0dd4cf..e5f39a3b9b 100644 --- a/src/ol/source/tilewmssource.js +++ b/src/ol/source/tilewmssource.js @@ -10,6 +10,7 @@ goog.require('goog.math'); goog.require('goog.object'); goog.require('goog.string'); goog.require('goog.uri.utils'); +goog.require('ol'); goog.require('ol.TileCoord'); goog.require('ol.TileUrlFunction'); goog.require('ol.extent'); @@ -165,7 +166,7 @@ ol.source.TileWMS.prototype.getGetFeatureInfoUrl = var baseParams = { 'SERVICE': 'WMS', - 'VERSION': ol.source.wms.DEFAULT_VERSION, + 'VERSION': ol.DEFAULT_WMS_VERSION, 'REQUEST': 'GetFeatureInfo', 'FORMAT': 'image/png', 'TRANSPARENT': true, @@ -373,7 +374,7 @@ ol.source.TileWMS.prototype.tileUrlFunction_ = var baseParams = { 'SERVICE': 'WMS', - 'VERSION': ol.source.wms.DEFAULT_VERSION, + 'VERSION': ol.DEFAULT_WMS_VERSION, 'REQUEST': 'GetMap', 'FORMAT': 'image/png', 'TRANSPARENT': true @@ -405,6 +406,6 @@ ol.source.TileWMS.prototype.updateParams = function(params) { */ ol.source.TileWMS.prototype.updateV13_ = function() { var version = - goog.object.get(this.params_, 'VERSION', ol.source.wms.DEFAULT_VERSION); + goog.object.get(this.params_, 'VERSION', ol.DEFAULT_WMS_VERSION); this.v13_ = goog.string.compareVersions(version, '1.3') >= 0; }; diff --git a/src/ol/source/wmssource.js b/src/ol/source/wmssource.js index 1c19281272..def6b908ba 100644 --- a/src/ol/source/wmssource.js +++ b/src/ol/source/wmssource.js @@ -2,12 +2,6 @@ goog.provide('ol.source.wms'); goog.provide('ol.source.wms.ServerType'); -/** - * @define {string} WMS default version. - */ -ol.source.wms.DEFAULT_VERSION = '1.3.0'; - - /** * @enum {string} */ diff --git a/src/ol/source/zoomifysource.js b/src/ol/source/zoomifysource.js index ae87d64aae..7c245da695 100644 --- a/src/ol/source/zoomifysource.js +++ b/src/ol/source/zoomifysource.js @@ -2,6 +2,7 @@ goog.provide('ol.source.Zoomify'); goog.require('goog.array'); goog.require('goog.asserts'); +goog.require('ol'); goog.require('ol.ImageTile'); goog.require('ol.TileCoord'); goog.require('ol.TileState'); diff --git a/src/ol/structs/buffer.js b/src/ol/structs/buffer.js index 31ae062393..29ddb99b56 100644 --- a/src/ol/structs/buffer.js +++ b/src/ol/structs/buffer.js @@ -3,6 +3,7 @@ goog.provide('ol.structs.Buffer'); goog.require('goog.array'); goog.require('goog.asserts'); goog.require('goog.webgl'); +goog.require('ol'); goog.require('ol.structs.IntegerSet'); @@ -16,12 +17,6 @@ ol.structs.BufferUsage = { }; -/** - * @define {boolean} Replace unused entries with NaNs. - */ -ol.BUFFER_REPLACE_UNUSED_ENTRIES_WITH_NANS = goog.DEBUG; - - /** * @constructor diff --git a/src/ol/tilecache.js b/src/ol/tilecache.js index 643ed75ce9..4b7456263b 100644 --- a/src/ol/tilecache.js +++ b/src/ol/tilecache.js @@ -1,18 +1,13 @@ goog.provide('ol.TileCache'); goog.require('goog.asserts'); +goog.require('ol'); goog.require('ol.Tile'); goog.require('ol.TileCoord'); goog.require('ol.TileRange'); goog.require('ol.structs.LRUCache'); -/** - * @define {number} Default high water mark. - */ -ol.DEFAULT_TILE_CACHE_HIGH_WATER_MARK = 2048; - - /** * @constructor diff --git a/src/ol/tilegrid/tilegrid.js b/src/ol/tilegrid/tilegrid.js index beaf508869..5e626aeff3 100644 --- a/src/ol/tilegrid/tilegrid.js +++ b/src/ol/tilegrid/tilegrid.js @@ -2,6 +2,7 @@ goog.provide('ol.tilegrid.TileGrid'); goog.require('goog.array'); goog.require('goog.asserts'); +goog.require('ol'); goog.require('ol.Coordinate'); goog.require('ol.TileCoord'); goog.require('ol.TileRange'); @@ -12,18 +13,6 @@ goog.require('ol.proj.Projection'); goog.require('ol.proj.Units'); -/** - * @define {number} Default tile size. - */ -ol.DEFAULT_TILE_SIZE = 256; - - -/** - * @define {number} Default maximum zoom for default tile grids. - */ -ol.DEFAULT_MAX_ZOOM = 42; - - /** * @constructor diff --git a/src/ol/tilegrid/xyztilegrid.js b/src/ol/tilegrid/xyztilegrid.js index 75a63200b5..a60a5bfdb9 100644 --- a/src/ol/tilegrid/xyztilegrid.js +++ b/src/ol/tilegrid/xyztilegrid.js @@ -1,6 +1,7 @@ goog.provide('ol.tilegrid.XYZ'); goog.require('goog.math'); +goog.require('ol'); goog.require('ol.TileCoord'); goog.require('ol.TileRange'); goog.require('ol.proj'); diff --git a/src/ol/view2d.js b/src/ol/view2d.js index 0a20d803c7..bd78045ac2 100644 --- a/src/ol/view2d.js +++ b/src/ol/view2d.js @@ -4,6 +4,7 @@ goog.provide('ol.View2D'); goog.provide('ol.View2DProperty'); goog.require('goog.asserts'); +goog.require('ol'); goog.require('ol.CenterConstraint'); goog.require('ol.Constraints'); goog.require('ol.IView2D');