Use named exports from ol/index.js

This commit is contained in:
Tim Schaub
2017-12-12 10:24:58 -07:00
parent fce644556b
commit 87295a74dd
250 changed files with 874 additions and 887 deletions

View File

@@ -107,7 +107,7 @@ In case you are creating a custom build of OpenLayers and do not need the reproj
See [Custom builds](custom-builds.html#defines) tutorial on how to do this.
### Triangulation precision threshold
The default [triangulation error threshold](#dynamic-triangulation) in pixels is given by `ol.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD` (0.5 pixel).
The default [triangulation error threshold](#dynamic-triangulation) in pixels is given by `DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD` (0.5 pixel).
In case a different threshold needs to be defined for different sources, the `reprojectionErrorThreshold` option can be passed when constructing the tile image source.
###Limiting visibility of reprojected map by extent

View File

@@ -1,4 +1,4 @@
import _ol_ from '../src/ol/index.js';
import {inherits} from '../src/ol/index.js';
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_control_ from '../src/ol/control.js';
@@ -49,7 +49,7 @@ app.RotateNorthControl = function(opt_options) {
});
};
_ol_.inherits(app.RotateNorthControl, _ol_control_Control_);
inherits(app.RotateNorthControl, _ol_control_Control_);
//

View File

@@ -1,4 +1,4 @@
import _ol_ from '../src/ol/index.js';
import {inherits} from '../src/ol/index.js';
import _ol_Feature_ from '../src/ol/Feature.js';
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
@@ -61,7 +61,7 @@ app.Drag = function() {
this.previousCursor_ = undefined;
};
_ol_.inherits(app.Drag, _ol_interaction_Pointer_);
inherits(app.Drag, _ol_interaction_Pointer_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/AssertionError
*/
import _ol_ from './index.js';
import {VERSION, inherits} from './index.js';
/**
* Error object thrown when an assertion failed. This is an ECMA-262 Error,
@@ -14,7 +14,7 @@ import _ol_ from './index.js';
*/
var _ol_AssertionError_ = function(code) {
var path = _ol_.VERSION ? _ol_.VERSION.split('-')[0] : 'latest';
var path = VERSION ? VERSION.split('-')[0] : 'latest';
/**
* @type {string}
@@ -36,5 +36,6 @@ var _ol_AssertionError_ = function(code) {
};
_ol_.inherits(_ol_AssertionError_, Error);
inherits(_ol_AssertionError_, Error);
export default _ol_AssertionError_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/CanvasMap
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_PluggableMap_ from './PluggableMap.js';
import _ol_PluginType_ from './PluginType.js';
import _ol_control_ from './control.js';
@@ -85,5 +85,6 @@ var _ol_CanvasMap_ = function(options) {
_ol_PluggableMap_.call(this, options);
};
_ol_.inherits(_ol_CanvasMap_, _ol_PluggableMap_);
inherits(_ol_CanvasMap_, _ol_PluggableMap_);
export default _ol_CanvasMap_;

View File

@@ -6,7 +6,7 @@
* @see https://developers.google.com/maps/documentation/javascript/reference
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_AssertionError_ from './AssertionError.js';
import _ol_CollectionEventType_ from './CollectionEventType.js';
import _ol_Object_ from './Object.js';
@@ -56,7 +56,7 @@ var _ol_Collection_ = function(opt_array, opt_options) {
};
_ol_.inherits(_ol_Collection_, _ol_Object_);
inherits(_ol_Collection_, _ol_Object_);
/**
@@ -302,5 +302,6 @@ _ol_Collection_.Event = function(type, opt_element) {
this.element = opt_element;
};
_ol_.inherits(_ol_Collection_.Event, _ol_events_Event_);
inherits(_ol_Collection_.Event, _ol_events_Event_);
export default _ol_Collection_;

View File

@@ -2,7 +2,7 @@
* @module ol/DeviceOrientation
*/
import _ol_events_ from './events.js';
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_Object_ from './Object.js';
import _ol_has_ from './has.js';
import _ol_math_ from './math.js';
@@ -84,7 +84,7 @@ var _ol_DeviceOrientation_ = function(opt_options) {
};
_ol_.inherits(_ol_DeviceOrientation_, _ol_Object_);
inherits(_ol_DeviceOrientation_, _ol_Object_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/Disposable
*/
import _ol_ from './index.js';
import {nullFunction} from './index.js';
/**
* Objects that need to clean up after themselves.
@@ -30,5 +30,5 @@ _ol_Disposable_.prototype.dispose = function() {
* Extension point for disposable objects.
* @protected
*/
_ol_Disposable_.prototype.disposeInternal = _ol_.nullFunction;
_ol_Disposable_.prototype.disposeInternal = nullFunction;
export default _ol_Disposable_;

View File

@@ -4,7 +4,7 @@
import _ol_asserts_ from './asserts.js';
import _ol_events_ from './events.js';
import _ol_events_EventType_ from './events/EventType.js';
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_Object_ from './Object.js';
import _ol_geom_Geometry_ from './geom/Geometry.js';
import _ol_style_Style_ from './style/Style.js';
@@ -107,7 +107,7 @@ var _ol_Feature_ = function(opt_geometryOrProperties) {
}
};
_ol_.inherits(_ol_Feature_, _ol_Object_);
inherits(_ol_Feature_, _ol_Object_);
/**

View File

@@ -3,7 +3,7 @@
*/
// FIXME handle geolocation not supported
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_GeolocationProperty_ from './GeolocationProperty.js';
import _ol_Object_ from './Object.js';
import _ol_Sphere_ from './Sphere.js';
@@ -90,7 +90,7 @@ var _ol_Geolocation_ = function(opt_options) {
};
_ol_.inherits(_ol_Geolocation_, _ol_Object_);
inherits(_ol_Geolocation_, _ol_Object_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/Image
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_ImageBase_ from './ImageBase.js';
import _ol_ImageState_ from './ImageState.js';
import _ol_events_ from './events.js';
@@ -57,7 +57,7 @@ var _ol_Image_ = function(extent, resolution, pixelRatio, src, crossOrigin, imag
};
_ol_.inherits(_ol_Image_, _ol_ImageBase_);
inherits(_ol_Image_, _ol_ImageBase_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/ImageBase
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_events_EventTarget_ from './events/EventTarget.js';
import _ol_events_EventType_ from './events/EventType.js';
@@ -44,7 +44,7 @@ var _ol_ImageBase_ = function(extent, resolution, pixelRatio, state) {
};
_ol_.inherits(_ol_ImageBase_, _ol_events_EventTarget_);
inherits(_ol_ImageBase_, _ol_events_EventTarget_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/ImageCanvas
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_ImageBase_ from './ImageBase.js';
import _ol_ImageState_ from './ImageState.js';
@@ -43,7 +43,7 @@ var _ol_ImageCanvas_ = function(extent, resolution, pixelRatio, canvas, opt_load
};
_ol_.inherits(_ol_ImageCanvas_, _ol_ImageBase_);
inherits(_ol_ImageCanvas_, _ol_ImageBase_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/ImageTile
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_Tile_ from './Tile.js';
import _ol_TileState_ from './TileState.js';
import _ol_dom_ from './dom.js';
@@ -59,7 +59,7 @@ var _ol_ImageTile_ = function(tileCoord, state, src, crossOrigin, tileLoadFuncti
};
_ol_.inherits(_ol_ImageTile_, _ol_Tile_);
inherits(_ol_ImageTile_, _ol_Tile_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/Map
*/
import _ol_ from './index.js';
import {ENABLE_CANVAS, ENABLE_WEBGL, inherits} from './index.js';
import _ol_PluggableMap_ from './PluggableMap.js';
import _ol_PluginType_ from './PluginType.js';
import _ol_control_ from './control.js';
@@ -19,7 +19,7 @@ import _ol_renderer_webgl_TileLayer_ from './renderer/webgl/TileLayer.js';
import _ol_renderer_webgl_VectorLayer_ from './renderer/webgl/VectorLayer.js';
if (_ol_.ENABLE_CANVAS) {
if (ENABLE_CANVAS) {
_ol_plugins_.register(_ol_PluginType_.MAP_RENDERER, _ol_renderer_canvas_Map_);
_ol_plugins_.registerMultiple(_ol_PluginType_.LAYER_RENDERER, [
_ol_renderer_canvas_ImageLayer_,
@@ -29,7 +29,7 @@ if (_ol_.ENABLE_CANVAS) {
]);
}
if (_ol_.ENABLE_WEBGL) {
if (ENABLE_WEBGL) {
_ol_plugins_.register(_ol_PluginType_.MAP_RENDERER, _ol_renderer_webgl_Map_);
_ol_plugins_.registerMultiple(_ol_PluginType_.LAYER_RENDERER, [
_ol_renderer_webgl_ImageLayer_,
@@ -99,5 +99,6 @@ var _ol_Map_ = function(options) {
_ol_PluggableMap_.call(this, options);
};
_ol_.inherits(_ol_Map_, _ol_PluggableMap_);
inherits(_ol_Map_, _ol_PluggableMap_);
export default _ol_Map_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/MapBrowserEvent
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_MapEvent_ from './MapEvent.js';
/**
@@ -56,7 +56,7 @@ var _ol_MapBrowserEvent_ = function(type, map, browserEvent, opt_dragging,
};
_ol_.inherits(_ol_MapBrowserEvent_, _ol_MapEvent_);
inherits(_ol_MapBrowserEvent_, _ol_MapEvent_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/MapBrowserEventHandler
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_has_ from './has.js';
import _ol_MapBrowserEventType_ from './MapBrowserEventType.js';
import _ol_MapBrowserPointerEvent_ from './MapBrowserPointerEvent.js';
@@ -110,7 +110,7 @@ var _ol_MapBrowserEventHandler_ = function(map, moveTolerance) {
};
_ol_.inherits(_ol_MapBrowserEventHandler_, _ol_events_EventTarget_);
inherits(_ol_MapBrowserEventHandler_, _ol_events_EventTarget_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/MapBrowserPointerEvent
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_MapBrowserEvent_ from './MapBrowserEvent.js';
/**
@@ -27,5 +27,5 @@ var _ol_MapBrowserPointerEvent_ = function(type, map, pointerEvent, opt_dragging
};
_ol_.inherits(_ol_MapBrowserPointerEvent_, _ol_MapBrowserEvent_);
inherits(_ol_MapBrowserPointerEvent_, _ol_MapBrowserEvent_);
export default _ol_MapBrowserPointerEvent_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/MapEvent
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_events_Event_ from './events/Event.js';
/**
@@ -36,5 +36,5 @@ var _ol_MapEvent_ = function(type, map, opt_frameState) {
};
_ol_.inherits(_ol_MapEvent_, _ol_events_Event_);
inherits(_ol_MapEvent_, _ol_events_Event_);
export default _ol_MapEvent_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/Object
*/
import _ol_ from './index.js';
import {getUid, inherits} from './index.js';
import _ol_ObjectEventType_ from './ObjectEventType.js';
import _ol_Observable_ from './Observable.js';
import _ol_events_Event_ from './events/Event.js';
@@ -59,7 +59,7 @@ var _ol_Object_ = function(opt_values) {
// the order in which they were created. This also helps to ensure that
// object properties are always added in the same order, which helps many
// JavaScript engines generate faster code.
_ol_.getUid(this);
getUid(this);
/**
* @private
@@ -72,7 +72,7 @@ var _ol_Object_ = function(opt_values) {
}
};
_ol_.inherits(_ol_Object_, _ol_Observable_);
inherits(_ol_Object_, _ol_Observable_);
/**
@@ -223,5 +223,5 @@ _ol_Object_.Event = function(type, key, oldValue) {
this.oldValue = oldValue;
};
_ol_.inherits(_ol_Object_.Event, _ol_events_Event_);
inherits(_ol_Object_.Event, _ol_events_Event_);
export default _ol_Object_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/Observable
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_events_ from './events.js';
import _ol_events_EventTarget_ from './events/EventTarget.js';
import _ol_events_EventType_ from './events/EventType.js';
@@ -32,7 +32,7 @@ var _ol_Observable_ = function() {
};
_ol_.inherits(_ol_Observable_, _ol_events_EventTarget_);
inherits(_ol_Observable_, _ol_events_EventTarget_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/Overlay
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_MapEventType_ from './MapEventType.js';
import _ol_Object_ from './Object.js';
import _ol_OverlayPositioning_ from './OverlayPositioning.js';
@@ -147,7 +147,7 @@ var _ol_Overlay_ = function(options) {
};
_ol_.inherits(_ol_Overlay_, _ol_Object_);
inherits(_ol_Overlay_, _ol_Object_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/PluggableMap
*/
import _ol_ from './index.js';
import {getUid, inherits} from './index.js';
import _ol_Collection_ from './Collection.js';
import _ol_CollectionEventType_ from './CollectionEventType.js';
import _ol_MapBrowserEvent_ from './MapBrowserEvent.js';
@@ -363,7 +363,7 @@ var _ol_PluggableMap_ = function(options) {
};
_ol_.inherits(_ol_PluggableMap_, _ol_Object_);
inherits(_ol_PluggableMap_, _ol_Object_);
/**
@@ -1010,7 +1010,7 @@ _ol_PluggableMap_.prototype.handleViewChanged_ = function() {
}
var view = this.getView();
if (view) {
this.viewport_.setAttribute('data-view', _ol_.getUid(view));
this.viewport_.setAttribute('data-view', getUid(view));
this.viewPropertyListenerKey_ = _ol_events_.listen(
view, _ol_ObjectEventType_.PROPERTYCHANGE,
this.handleViewPropertyChanged_, this);
@@ -1144,7 +1144,7 @@ _ol_PluggableMap_.prototype.renderFrame_ = function(time) {
var layerStatesArray = this.getLayerGroup().getLayerStatesArray();
var layerStates = {};
for (i = 0, ii = layerStatesArray.length; i < ii; ++i) {
layerStates[_ol_.getUid(layerStatesArray[i].layer)] = layerStatesArray[i];
layerStates[getUid(layerStatesArray[i].layer)] = layerStatesArray[i];
}
viewState = view.getState();
var center = viewState.center;
@@ -1270,7 +1270,7 @@ _ol_PluggableMap_.prototype.setView = function(view) {
* @param {ol.Feature} feature Feature.
*/
_ol_PluggableMap_.prototype.skipFeature = function(feature) {
var featureUid = _ol_.getUid(feature).toString();
var featureUid = getUid(feature).toString();
this.skippedFeatureUids_[featureUid] = true;
this.render();
};
@@ -1308,7 +1308,7 @@ _ol_PluggableMap_.prototype.updateSize = function() {
* @param {ol.Feature} feature Feature.
*/
_ol_PluggableMap_.prototype.unskipFeature = function(feature) {
var featureUid = _ol_.getUid(feature).toString();
var featureUid = getUid(feature).toString();
delete this.skippedFeatureUids_[featureUid];
this.render();
};
@@ -1382,7 +1382,7 @@ _ol_PluggableMap_.createOptionsInternal = function(options) {
if (typeof logo === 'string') {
logos[logo] = '';
} else if (logo instanceof HTMLElement) {
logos[_ol_.getUid(logo).toString()] = logo;
logos[getUid(logo).toString()] = logo;
} else if (logo) {
_ol_asserts_.assert(typeof logo.href == 'string', 44); // `logo.href` should be a string.
_ol_asserts_.assert(typeof logo.src == 'string', 45); // `logo.src` should be a string.

View File

@@ -1,7 +1,7 @@
/**
* @module ol/Tile
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_TileState_ from './TileState.js';
import _ol_easing_ from './easing.js';
import _ol_events_EventTarget_ from './events/EventTarget.js';
@@ -66,7 +66,7 @@ var _ol_Tile_ = function(tileCoord, state, opt_options) {
};
_ol_.inherits(_ol_Tile_, _ol_events_EventTarget_);
inherits(_ol_Tile_, _ol_events_EventTarget_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/TileCache
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_structs_LRUCache_ from './structs/LRUCache.js';
import _ol_tilecoord_ from './tilecoord.js';
@@ -17,7 +17,7 @@ var _ol_TileCache_ = function(opt_highWaterMark) {
};
_ol_.inherits(_ol_TileCache_, _ol_structs_LRUCache_);
inherits(_ol_TileCache_, _ol_structs_LRUCache_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/TileQueue
*/
import _ol_ from './index.js';
import {inherits} from './index.js';
import _ol_TileState_ from './TileState.js';
import _ol_events_ from './events.js';
import _ol_events_EventType_ from './events/EventType.js';
@@ -55,7 +55,7 @@ var _ol_TileQueue_ = function(tilePriorityFunction, tileChangeCallback) {
};
_ol_.inherits(_ol_TileQueue_, _ol_structs_PriorityQueue_);
inherits(_ol_TileQueue_, _ol_structs_PriorityQueue_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/VectorImageTile
*/
import _ol_ from './index.js';
import {getUid, inherits} from './index.js';
import _ol_Tile_ from './Tile.js';
import _ol_TileState_ from './TileState.js';
import _ol_dom_ from './dom.js';
@@ -121,7 +121,7 @@ var _ol_VectorImageTile_ = function(tileCoord, state, sourceRevision, format,
};
_ol_.inherits(_ol_VectorImageTile_, _ol_Tile_);
inherits(_ol_VectorImageTile_, _ol_Tile_);
/**
@@ -157,7 +157,7 @@ _ol_VectorImageTile_.prototype.disposeInternal = function() {
* @return {CanvasRenderingContext2D} The rendering context.
*/
_ol_VectorImageTile_.prototype.getContext = function(layer) {
var key = _ol_.getUid(layer).toString();
var key = getUid(layer).toString();
if (!(key in this.context_)) {
this.context_[key] = _ol_dom_.createCanvasContext2D();
}
@@ -181,7 +181,7 @@ _ol_VectorImageTile_.prototype.getImage = function(layer) {
* @return {ol.TileReplayState} The replay state.
*/
_ol_VectorImageTile_.prototype.getReplayState = function(layer) {
var key = _ol_.getUid(layer).toString();
var key = getUid(layer).toString();
if (!(key in this.replayState_)) {
this.replayState_[key] = {
dirty: false,
@@ -237,7 +237,7 @@ _ol_VectorImageTile_.prototype.load = function() {
var state = sourceTile.getState();
if (state == _ol_TileState_.LOADED ||
state == _ol_TileState_.ERROR) {
var uid = _ol_.getUid(sourceTile);
var uid = getUid(sourceTile);
if (state == _ol_TileState_.ERROR) {
errorSourceTiles[uid] = true;
} else {

View File

@@ -1,7 +1,7 @@
/**
* @module ol/VectorTile
*/
import _ol_ from './index.js';
import {getUid, inherits} from './index.js';
import _ol_Tile_ from './Tile.js';
import _ol_TileState_ from './TileState.js';
@@ -75,7 +75,7 @@ var _ol_VectorTile_ = function(tileCoord, state, src, format, tileLoadFunction,
};
_ol_.inherits(_ol_VectorTile_, _ol_Tile_);
inherits(_ol_VectorTile_, _ol_Tile_);
/**
@@ -146,7 +146,7 @@ _ol_VectorTile_.prototype.getProjection = function() {
* @return {ol.render.ReplayGroup} Replay group.
*/
_ol_VectorTile_.prototype.getReplayGroup = function(layer, key) {
return this.replayGroups_[_ol_.getUid(layer) + ',' + key];
return this.replayGroups_[getUid(layer) + ',' + key];
};
@@ -230,7 +230,7 @@ _ol_VectorTile_.prototype.setProjection = function(projection) {
* @param {ol.render.ReplayGroup} replayGroup Replay group.
*/
_ol_VectorTile_.prototype.setReplayGroup = function(layer, key, replayGroup) {
this.replayGroups_[_ol_.getUid(layer) + ',' + key] = replayGroup;
this.replayGroups_[getUid(layer) + ',' + key] = replayGroup;
};

View File

@@ -1,7 +1,7 @@
/**
* @module ol/View
*/
import _ol_ from './index.js';
import {DEFAULT_MIN_ZOOM, DEFAULT_TILE_SIZE, inherits, getUid, nullFunction} from './index.js';
import _ol_CenterConstraint_ from './CenterConstraint.js';
import _ol_Object_ from './Object.js';
import _ol_ResolutionConstraint_ from './ResolutionConstraint.js';
@@ -113,7 +113,7 @@ var _ol_View_ = function(opt_options) {
this.applyOptions_(options);
};
_ol_.inherits(_ol_View_, _ol_Object_);
inherits(_ol_View_, _ol_Object_);
/**
@@ -500,7 +500,7 @@ _ol_View_.prototype.calculateCenterZoom = function(resolution, anchor) {
*/
_ol_View_.prototype.getSizeFromViewport_ = function() {
var size = [100, 100];
var selector = '.ol-viewport[data-view="' + _ol_.getUid(this) + '"]';
var selector = '.ol-viewport[data-view="' + getUid(this) + '"]';
var element = document.querySelector(selector);
if (element) {
var metrics = getComputedStyle(element);
@@ -942,7 +942,7 @@ _ol_View_.prototype.fit = function(geometryOrExtent, opt_options) {
var centerX = centerRotX * cosAngle - centerRotY * sinAngle;
var centerY = centerRotY * cosAngle + centerRotX * sinAngle;
var center = [centerX, centerY];
var callback = options.callback ? options.callback : _ol_.nullFunction;
var callback = options.callback ? options.callback : nullFunction;
if (options.duration !== undefined) {
this.animate({
@@ -1104,7 +1104,7 @@ _ol_View_.createResolutionConstraint_ = function(options) {
var defaultZoomFactor = 2;
var minZoom = options.minZoom !== undefined ?
options.minZoom : _ol_.DEFAULT_MIN_ZOOM;
options.minZoom : DEFAULT_MIN_ZOOM;
var maxZoom = options.maxZoom !== undefined ?
options.maxZoom : defaultMaxZoom;
@@ -1129,11 +1129,11 @@ _ol_View_.createResolutionConstraint_ = function(options) {
projection.getMetersPerUnit() :
Math.max(_ol_extent_.getWidth(extent), _ol_extent_.getHeight(extent));
var defaultMaxResolution = size / _ol_.DEFAULT_TILE_SIZE / Math.pow(
defaultZoomFactor, _ol_.DEFAULT_MIN_ZOOM);
var defaultMaxResolution = size / DEFAULT_TILE_SIZE / Math.pow(
defaultZoomFactor, DEFAULT_MIN_ZOOM);
var defaultMinResolution = defaultMaxResolution / Math.pow(
defaultZoomFactor, defaultMaxZoom - _ol_.DEFAULT_MIN_ZOOM);
defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);
// user provided maxResolution takes precedence
maxResolution = options.maxResolution;

View File

@@ -3,7 +3,7 @@
*/
// FIXME handle date line wrap
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_array_ from '../array.js';
import _ol_control_Control_ from '../control/Control.js';
import _ol_css_ from '../css.js';
@@ -139,7 +139,7 @@ var _ol_control_Attribution_ = function(opt_options) {
};
_ol_.inherits(_ol_control_Attribution_, _ol_control_Control_);
inherits(_ol_control_Attribution_, _ol_control_Control_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/control/Control
*/
import _ol_ from '../index.js';
import {inherits, nullFunction} from '../index.js';
import _ol_MapEventType_ from '../MapEventType.js';
import _ol_Object_ from '../Object.js';
import _ol_dom_ from '../dom.js';
@@ -67,7 +67,7 @@ var _ol_control_Control_ = function(options) {
/**
* @type {function(ol.MapEvent)}
*/
this.render = options.render ? options.render : _ol_.nullFunction;
this.render = options.render ? options.render : nullFunction;
if (options.target) {
this.setTarget(options.target);
@@ -75,7 +75,7 @@ var _ol_control_Control_ = function(options) {
};
_ol_.inherits(_ol_control_Control_, _ol_Object_);
inherits(_ol_control_Control_, _ol_Object_);
/**
@@ -118,7 +118,7 @@ _ol_control_Control_.prototype.setMap = function(map) {
var target = this.target_ ?
this.target_ : map.getOverlayContainerStopEvent();
target.appendChild(this.element);
if (this.render !== _ol_.nullFunction) {
if (this.render !== nullFunction) {
this.listenerKeys.push(_ol_events_.listen(map,
_ol_MapEventType_.POSTRENDER, this.render, this));
}

View File

@@ -1,7 +1,7 @@
/**
* @module ol/control/FullScreen
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_control_Control_ from '../control/Control.js';
import _ol_css_ from '../css.js';
import _ol_dom_ from '../dom.js';
@@ -90,7 +90,7 @@ var _ol_control_FullScreen_ = function(opt_options) {
};
_ol_.inherits(_ol_control_FullScreen_, _ol_control_Control_);
inherits(_ol_control_FullScreen_, _ol_control_Control_);
/**

View File

@@ -1,9 +1,8 @@
/**
* @module ol/control/MousePosition
*/
// FIXME should listen on appropriate pane, once it is defined
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_events_ from '../events.js';
import _ol_events_EventType_ from '../events/EventType.js';
import _ol_Object_ from '../Object.js';
@@ -82,7 +81,7 @@ var _ol_control_MousePosition_ = function(opt_options) {
};
_ol_.inherits(_ol_control_MousePosition_, _ol_control_Control_);
inherits(_ol_control_MousePosition_, _ol_control_Control_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/control/OverviewMap
*/
import _ol_ from '../index.js';
import {OVERVIEWMAP_MAX_RATIO, OVERVIEWMAP_MIN_RATIO, inherits} from '../index.js';
import _ol_Collection_ from '../Collection.js';
import _ol_PluggableMap_ from '../PluggableMap.js';
import _ol_MapEventType_ from '../MapEventType.js';
@@ -188,7 +188,7 @@ var _ol_control_OverviewMap_ = function(opt_options) {
});
};
_ol_.inherits(_ol_control_OverviewMap_, _ol_control_Control_);
inherits(_ol_control_OverviewMap_, _ol_control_Control_);
/**
@@ -336,10 +336,10 @@ _ol_control_OverviewMap_.prototype.validateExtent_ = function() {
var ovmapWidth = ovmapSize[0];
var ovmapHeight = ovmapSize[1];
if (boxWidth < ovmapWidth * _ol_.OVERVIEWMAP_MIN_RATIO ||
boxHeight < ovmapHeight * _ol_.OVERVIEWMAP_MIN_RATIO ||
boxWidth > ovmapWidth * _ol_.OVERVIEWMAP_MAX_RATIO ||
boxHeight > ovmapHeight * _ol_.OVERVIEWMAP_MAX_RATIO) {
if (boxWidth < ovmapWidth * OVERVIEWMAP_MIN_RATIO ||
boxHeight < ovmapHeight * OVERVIEWMAP_MIN_RATIO ||
boxWidth > ovmapWidth * OVERVIEWMAP_MAX_RATIO ||
boxHeight > ovmapHeight * OVERVIEWMAP_MAX_RATIO) {
this.resetExtent_();
} else if (!_ol_extent_.containsExtent(ovextent, extent)) {
this.recenter_();
@@ -353,7 +353,7 @@ _ol_control_OverviewMap_.prototype.validateExtent_ = function() {
* @private
*/
_ol_control_OverviewMap_.prototype.resetExtent_ = function() {
if (_ol_.OVERVIEWMAP_MAX_RATIO === 0 || _ol_.OVERVIEWMAP_MIN_RATIO === 0) {
if (OVERVIEWMAP_MAX_RATIO === 0 || OVERVIEWMAP_MIN_RATIO === 0) {
return;
}
@@ -371,8 +371,8 @@ _ol_control_OverviewMap_.prototype.resetExtent_ = function() {
// box sizes using the min and max ratio, pick the step in the middle used
// to calculate the extent from the main map to set it to the overview map,
var steps = Math.log(
_ol_.OVERVIEWMAP_MAX_RATIO / _ol_.OVERVIEWMAP_MIN_RATIO) / Math.LN2;
var ratio = 1 / (Math.pow(2, steps / 2) * _ol_.OVERVIEWMAP_MIN_RATIO);
OVERVIEWMAP_MAX_RATIO / OVERVIEWMAP_MIN_RATIO) / Math.LN2;
var ratio = 1 / (Math.pow(2, steps / 2) * OVERVIEWMAP_MIN_RATIO);
_ol_extent_.scaleFromCenter(extent, ratio);
ovview.fit(extent);
};

View File

@@ -1,12 +1,13 @@
/**
* @module ol/control/Rotate
*/
import _ol_events_ from '../events.js';
import _ol_events_EventType_ from '../events/EventType.js';
import _ol_ from '../index.js';
import _ol_control_Control_ from '../control/Control.js';
import _ol_css_ from '../css.js';
import _ol_easing_ from '../easing.js';
import _ol_events_ from '../events.js';
import _ol_events_EventType_ from '../events/EventType.js';
import {inherits} from '../index.js';
/**
* @classdesc
@@ -93,7 +94,7 @@ var _ol_control_Rotate_ = function(opt_options) {
};
_ol_.inherits(_ol_control_Rotate_, _ol_control_Control_);
inherits(_ol_control_Rotate_, _ol_control_Control_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/control/ScaleLine
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Object_ from '../Object.js';
import _ol_asserts_ from '../asserts.js';
import _ol_control_Control_ from '../control/Control.js';
@@ -94,7 +94,7 @@ var _ol_control_ScaleLine_ = function(opt_options) {
};
_ol_.inherits(_ol_control_ScaleLine_, _ol_control_Control_);
inherits(_ol_control_ScaleLine_, _ol_control_Control_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/control/Zoom
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_events_ from '../events.js';
import _ol_events_EventType_ from '../events/EventType.js';
import _ol_control_Control_ from '../control/Control.js';
@@ -77,7 +77,7 @@ var _ol_control_Zoom_ = function(opt_options) {
};
_ol_.inherits(_ol_control_Zoom_, _ol_control_Control_);
inherits(_ol_control_Zoom_, _ol_control_Control_);
/**

View File

@@ -3,7 +3,7 @@
*/
// FIXME should possibly show tooltip when dragging?
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_ViewHint_ from '../ViewHint.js';
import _ol_control_Control_ from '../control/Control.js';
import _ol_css_ from '../css.js';
@@ -133,7 +133,7 @@ var _ol_control_ZoomSlider_ = function(opt_options) {
});
};
_ol_.inherits(_ol_control_ZoomSlider_, _ol_control_Control_);
inherits(_ol_control_ZoomSlider_, _ol_control_Control_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/control/ZoomToExtent
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_events_ from '../events.js';
import _ol_events_EventType_ from '../events/EventType.js';
import _ol_control_Control_ from '../control/Control.js';
@@ -54,7 +54,7 @@ var _ol_control_ZoomToExtent_ = function(opt_options) {
});
};
_ol_.inherits(_ol_control_ZoomToExtent_, _ol_control_Control_);
inherits(_ol_control_ZoomToExtent_, _ol_control_Control_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/events/EventTarget
*/
import _ol_ from '../index.js';
import {inherits, nullFunction} from '../index.js';
import _ol_Disposable_ from '../Disposable.js';
import _ol_events_ from '../events.js';
import _ol_events_Event_ from '../events/Event.js';
@@ -48,7 +48,7 @@ var _ol_events_EventTarget_ = function() {
};
_ol_.inherits(_ol_events_EventTarget_, _ol_Disposable_);
inherits(_ol_events_EventTarget_, _ol_Disposable_);
/**
@@ -96,7 +96,7 @@ _ol_events_EventTarget_.prototype.dispatchEvent = function(event) {
var pendingRemovals = this.pendingRemovals_[type];
delete this.pendingRemovals_[type];
while (pendingRemovals--) {
this.removeEventListener(type, _ol_.nullFunction);
this.removeEventListener(type, nullFunction);
}
delete this.dispatching_[type];
}
@@ -147,7 +147,7 @@ _ol_events_EventTarget_.prototype.removeEventListener = function(type, listener)
var index = listeners.indexOf(listener);
if (type in this.pendingRemovals_) {
// make listener a no-op, and remove later in #dispatchEvent()
listeners[index] = _ol_.nullFunction;
listeners[index] = nullFunction;
++this.pendingRemovals_[type];
} else {
listeners.splice(index, 1);

View File

@@ -1,7 +1,7 @@
/**
* @module ol/featureloader
*/
import _ol_ from './index.js';
import {nullFunction} from './index.js';
import _ol_format_FormatType_ from './format/FormatType.js';
import _ol_xml_ from './xml.js';
var _ol_featureloader_ = {};
@@ -96,6 +96,6 @@ _ol_featureloader_.xhr = function(url, format) {
*/
function(features, dataProjection) {
this.addFeatures(features);
}, /* FIXME handle error */ _ol_.nullFunction);
}, /* FIXME handle error */ nullFunction);
};
export default _ol_featureloader_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/EsriJSON
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Feature_ from '../Feature.js';
import _ol_asserts_ from '../asserts.js';
import _ol_extent_ from '../extent.js';
@@ -45,7 +45,7 @@ var _ol_format_EsriJSON_ = function(opt_options) {
};
_ol_.inherits(_ol_format_EsriJSON_, _ol_format_JSONFeature_);
inherits(_ol_format_EsriJSON_, _ol_format_JSONFeature_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/GML2
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_extent_ from '../extent.js';
import _ol_format_Feature_ from '../format/Feature.js';
import _ol_format_GMLBase_ from '../format/GMLBase.js';
@@ -39,7 +39,7 @@ var _ol_format_GML2_ = function(opt_options) {
};
_ol_.inherits(_ol_format_GML2_, _ol_format_GMLBase_);
inherits(_ol_format_GML2_, _ol_format_GMLBase_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/GML3
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_array_ from '../array.js';
import _ol_extent_ from '../extent.js';
import _ol_format_Feature_ from '../format/Feature.js';
@@ -76,7 +76,7 @@ var _ol_format_GML3_ = function(opt_options) {
};
_ol_.inherits(_ol_format_GML3_, _ol_format_GMLBase_);
inherits(_ol_format_GML3_, _ol_format_GMLBase_);
/**

View File

@@ -4,7 +4,7 @@
// FIXME Envelopes should not be treated as geometries! readEnvelope_ is part
// of GEOMETRY_PARSERS_ and methods using GEOMETRY_PARSERS_ do not expect
// envelopes/extents, only geometries!
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_array_ from '../array.js';
import _ol_Feature_ from '../Feature.js';
import _ol_format_Feature_ from '../format/Feature.js';
@@ -78,7 +78,7 @@ var _ol_format_GMLBase_ = function(opt_options) {
_ol_format_XMLFeature_.call(this);
};
_ol_.inherits(_ol_format_GMLBase_, _ol_format_XMLFeature_);
inherits(_ol_format_GMLBase_, _ol_format_XMLFeature_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/GPX
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Feature_ from '../Feature.js';
import _ol_array_ from '../array.js';
import _ol_format_Feature_ from '../format/Feature.js';
@@ -41,7 +41,7 @@ var _ol_format_GPX_ = function(opt_options) {
this.readExtensions_ = options.readExtensions;
};
_ol_.inherits(_ol_format_GPX_, _ol_format_XMLFeature_);
inherits(_ol_format_GPX_, _ol_format_XMLFeature_);
/**

View File

@@ -4,7 +4,7 @@
// TODO: serialize dataProjection as crs member when writing
// see https://github.com/openlayers/openlayers/issues/2078
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_asserts_ from '../asserts.js';
import _ol_Feature_ from '../Feature.js';
import _ol_format_Feature_ from '../format/Feature.js';
@@ -62,7 +62,7 @@ var _ol_format_GeoJSON_ = function(opt_options) {
};
_ol_.inherits(_ol_format_GeoJSON_, _ol_format_JSONFeature_);
inherits(_ol_format_GeoJSON_, _ol_format_JSONFeature_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/IGC
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Feature_ from '../Feature.js';
import _ol_format_Feature_ from '../format/Feature.js';
import _ol_format_IGCZ_ from '../format/IGCZ.js';
@@ -39,7 +39,7 @@ var _ol_format_IGC_ = function(opt_options) {
};
_ol_.inherits(_ol_format_IGC_, _ol_format_TextFeature_);
inherits(_ol_format_IGC_, _ol_format_TextFeature_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/JSONFeature
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_format_Feature_ from '../format/Feature.js';
import _ol_format_FormatType_ from '../format/FormatType.js';
@@ -19,7 +19,7 @@ var _ol_format_JSONFeature_ = function() {
_ol_format_Feature_.call(this);
};
_ol_.inherits(_ol_format_JSONFeature_, _ol_format_Feature_);
inherits(_ol_format_JSONFeature_, _ol_format_Feature_);
/**

View File

@@ -6,7 +6,7 @@
// FIXME serialize arbitrary feature properties
// FIXME don't parse style if extractStyles is false
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Feature_ from '../Feature.js';
import _ol_array_ from '../array.js';
import _ol_asserts_ from '../asserts.js';
@@ -97,7 +97,7 @@ var _ol_format_KML_ = function(opt_options) {
};
_ol_.inherits(_ol_format_KML_, _ol_format_XMLFeature_);
inherits(_ol_format_KML_, _ol_format_XMLFeature_);
/**

View File

@@ -3,7 +3,7 @@
*/
//FIXME Implement projection handling
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_asserts_ from '../asserts.js';
import _ol_ext_PBF_ from 'pbf';
import _ol_format_Feature_ from '../format/Feature.js';
@@ -79,7 +79,7 @@ var _ol_format_MVT_ = function(opt_options) {
};
_ol_.inherits(_ol_format_MVT_, _ol_format_Feature_);
inherits(_ol_format_MVT_, _ol_format_Feature_);
/**

View File

@@ -2,7 +2,7 @@
* @module ol/format/OSMXML
*/
// FIXME add typedef for stack state objects
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_array_ from '../array.js';
import _ol_Feature_ from '../Feature.js';
import _ol_format_Feature_ from '../format/Feature.js';
@@ -33,7 +33,7 @@ var _ol_format_OSMXML_ = function() {
this.defaultDataProjection = _ol_proj_.get('EPSG:4326');
};
_ol_.inherits(_ol_format_OSMXML_, _ol_format_XMLFeature_);
inherits(_ol_format_OSMXML_, _ol_format_XMLFeature_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/OWS
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_format_XLink_ from '../format/XLink.js';
import _ol_format_XML_ from '../format/XML.js';
import _ol_format_XSD_ from '../format/XSD.js';
@@ -15,7 +15,7 @@ var _ol_format_OWS_ = function() {
_ol_format_XML_.call(this);
};
_ol_.inherits(_ol_format_OWS_, _ol_format_XML_);
inherits(_ol_format_OWS_, _ol_format_XML_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/Polyline
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_asserts_ from '../asserts.js';
import _ol_Feature_ from '../Feature.js';
import _ol_format_Feature_ from '../format/Feature.js';
@@ -49,7 +49,7 @@ var _ol_format_Polyline_ = function(opt_options) {
options.geometryLayout : _ol_geom_GeometryLayout_.XY;
};
_ol_.inherits(_ol_format_Polyline_, _ol_format_TextFeature_);
inherits(_ol_format_Polyline_, _ol_format_TextFeature_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/TextFeature
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_format_Feature_ from '../format/Feature.js';
import _ol_format_FormatType_ from '../format/FormatType.js';
@@ -19,7 +19,7 @@ var _ol_format_TextFeature_ = function() {
_ol_format_Feature_.call(this);
};
_ol_.inherits(_ol_format_TextFeature_, _ol_format_Feature_);
inherits(_ol_format_TextFeature_, _ol_format_Feature_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/TopoJSON
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Feature_ from '../Feature.js';
import _ol_format_Feature_ from '../format/Feature.js';
import _ol_format_JSONFeature_ from '../format/JSONFeature.js';
@@ -49,7 +49,7 @@ var _ol_format_TopoJSON_ = function(opt_options) {
};
_ol_.inherits(_ol_format_TopoJSON_, _ol_format_JSONFeature_);
inherits(_ol_format_TopoJSON_, _ol_format_JSONFeature_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/WFS
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_asserts_ from '../asserts.js';
import _ol_format_GML2_ from '../format/GML2.js';
import _ol_format_GML3_ from '../format/GML3.js';
@@ -60,7 +60,7 @@ var _ol_format_WFS_ = function(opt_options) {
_ol_format_XMLFeature_.call(this);
};
_ol_.inherits(_ol_format_WFS_, _ol_format_XMLFeature_);
inherits(_ol_format_WFS_, _ol_format_XMLFeature_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/WKT
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Feature_ from '../Feature.js';
import _ol_format_Feature_ from '../format/Feature.js';
import _ol_format_TextFeature_ from '../format/TextFeature.js';
@@ -42,7 +42,7 @@ var _ol_format_WKT_ = function(opt_options) {
};
_ol_.inherits(_ol_format_WKT_, _ol_format_TextFeature_);
inherits(_ol_format_WKT_, _ol_format_TextFeature_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/WMSCapabilities
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_format_XLink_ from '../format/XLink.js';
import _ol_format_XML_ from '../format/XML.js';
import _ol_format_XSD_ from '../format/XSD.js';
@@ -25,7 +25,7 @@ var _ol_format_WMSCapabilities_ = function() {
this.version = undefined;
};
_ol_.inherits(_ol_format_WMSCapabilities_, _ol_format_XML_);
inherits(_ol_format_WMSCapabilities_, _ol_format_XML_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/WMSGetFeatureInfo
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_array_ from '../array.js';
import _ol_format_GML2_ from '../format/GML2.js';
import _ol_format_XMLFeature_ from '../format/XMLFeature.js';
@@ -45,7 +45,7 @@ var _ol_format_WMSGetFeatureInfo_ = function(opt_options) {
_ol_format_XMLFeature_.call(this);
};
_ol_.inherits(_ol_format_WMSGetFeatureInfo_, _ol_format_XMLFeature_);
inherits(_ol_format_WMSGetFeatureInfo_, _ol_format_XMLFeature_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/WMTSCapabilities
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_extent_ from '../extent.js';
import _ol_format_OWS_ from '../format/OWS.js';
import _ol_format_XLink_ from '../format/XLink.js';
@@ -27,7 +27,7 @@ var _ol_format_WMTSCapabilities_ = function() {
this.owsParser_ = new _ol_format_OWS_();
};
_ol_.inherits(_ol_format_WMTSCapabilities_, _ol_format_XML_);
inherits(_ol_format_WMTSCapabilities_, _ol_format_XML_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/XMLFeature
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_array_ from '../array.js';
import _ol_format_Feature_ from '../format/Feature.js';
import _ol_format_FormatType_ from '../format/FormatType.js';
@@ -28,7 +28,7 @@ var _ol_format_XMLFeature_ = function() {
_ol_format_Feature_.call(this);
};
_ol_.inherits(_ol_format_XMLFeature_, _ol_format_Feature_);
inherits(_ol_format_XMLFeature_, _ol_format_Feature_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/And
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_LogicalNary_ from '../filter/LogicalNary.js';
/**
@@ -21,5 +21,6 @@ var _ol_format_filter_And_ = function(conditions) {
_ol_format_filter_LogicalNary_.apply(this, params);
};
_ol_.inherits(_ol_format_filter_And_, _ol_format_filter_LogicalNary_);
inherits(_ol_format_filter_And_, _ol_format_filter_LogicalNary_);
export default _ol_format_filter_And_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/Bbox
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_Filter_ from '../filter/Filter.js';
/**
@@ -40,5 +40,6 @@ var _ol_format_filter_Bbox_ = function(geometryName, extent, opt_srsName) {
this.srsName = opt_srsName;
};
_ol_.inherits(_ol_format_filter_Bbox_, _ol_format_filter_Filter_);
inherits(_ol_format_filter_Bbox_, _ol_format_filter_Filter_);
export default _ol_format_filter_Bbox_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/Comparison
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_Filter_ from '../filter/Filter.js';
/**
@@ -29,5 +29,6 @@ var _ol_format_filter_Comparison_ = function(tagName, propertyName) {
this.propertyName = propertyName;
};
_ol_.inherits(_ol_format_filter_Comparison_, _ol_format_filter_Filter_);
inherits(_ol_format_filter_Comparison_, _ol_format_filter_Filter_);
export default _ol_format_filter_Comparison_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/ComparisonBinary
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_Comparison_ from '../filter/Comparison.js';
/**
@@ -38,5 +38,5 @@ var _ol_format_filter_ComparisonBinary_ = function(
this.matchCase = opt_matchCase;
};
_ol_.inherits(_ol_format_filter_ComparisonBinary_, _ol_format_filter_Comparison_);
inherits(_ol_format_filter_ComparisonBinary_, _ol_format_filter_Comparison_);
export default _ol_format_filter_ComparisonBinary_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/Contains
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_Spatial_ from '../filter/Spatial.js';
/**
@@ -23,5 +23,5 @@ var _ol_format_filter_Contains_ = function(geometryName, geometry, opt_srsName)
};
_ol_.inherits(_ol_format_filter_Contains_, _ol_format_filter_Spatial_);
inherits(_ol_format_filter_Contains_, _ol_format_filter_Spatial_);
export default _ol_format_filter_Contains_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/During
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_Comparison_ from '../filter/Comparison.js';
/**
@@ -31,5 +31,5 @@ var _ol_format_filter_During_ = function(propertyName, begin, end) {
this.end = end;
};
_ol_.inherits(_ol_format_filter_During_, _ol_format_filter_Comparison_);
inherits(_ol_format_filter_During_, _ol_format_filter_Comparison_);
export default _ol_format_filter_During_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/EqualTo
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_ComparisonBinary_ from '../filter/ComparisonBinary.js';
/**
@@ -19,5 +19,5 @@ var _ol_format_filter_EqualTo_ = function(propertyName, expression, opt_matchCas
_ol_format_filter_ComparisonBinary_.call(this, 'PropertyIsEqualTo', propertyName, expression, opt_matchCase);
};
_ol_.inherits(_ol_format_filter_EqualTo_, _ol_format_filter_ComparisonBinary_);
inherits(_ol_format_filter_EqualTo_, _ol_format_filter_ComparisonBinary_);
export default _ol_format_filter_EqualTo_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/GreaterThan
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_ComparisonBinary_ from '../filter/ComparisonBinary.js';
/**
@@ -18,5 +18,5 @@ var _ol_format_filter_GreaterThan_ = function(propertyName, expression) {
_ol_format_filter_ComparisonBinary_.call(this, 'PropertyIsGreaterThan', propertyName, expression);
};
_ol_.inherits(_ol_format_filter_GreaterThan_, _ol_format_filter_ComparisonBinary_);
inherits(_ol_format_filter_GreaterThan_, _ol_format_filter_ComparisonBinary_);
export default _ol_format_filter_GreaterThan_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/GreaterThanOrEqualTo
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_ComparisonBinary_ from '../filter/ComparisonBinary.js';
/**
@@ -18,5 +18,5 @@ var _ol_format_filter_GreaterThanOrEqualTo_ = function(propertyName, expression)
_ol_format_filter_ComparisonBinary_.call(this, 'PropertyIsGreaterThanOrEqualTo', propertyName, expression);
};
_ol_.inherits(_ol_format_filter_GreaterThanOrEqualTo_, _ol_format_filter_ComparisonBinary_);
inherits(_ol_format_filter_GreaterThanOrEqualTo_, _ol_format_filter_ComparisonBinary_);
export default _ol_format_filter_GreaterThanOrEqualTo_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/Intersects
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_Spatial_ from '../filter/Spatial.js';
/**
@@ -23,5 +23,5 @@ var _ol_format_filter_Intersects_ = function(geometryName, geometry, opt_srsName
};
_ol_.inherits(_ol_format_filter_Intersects_, _ol_format_filter_Spatial_);
inherits(_ol_format_filter_Intersects_, _ol_format_filter_Spatial_);
export default _ol_format_filter_Intersects_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/IsBetween
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_Comparison_ from '../filter/Comparison.js';
/**
@@ -31,5 +31,5 @@ var _ol_format_filter_IsBetween_ = function(propertyName, lowerBoundary, upperBo
this.upperBoundary = upperBoundary;
};
_ol_.inherits(_ol_format_filter_IsBetween_, _ol_format_filter_Comparison_);
inherits(_ol_format_filter_IsBetween_, _ol_format_filter_Comparison_);
export default _ol_format_filter_IsBetween_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/IsLike
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_Comparison_ from '../filter/Comparison.js';
/**
@@ -56,5 +56,5 @@ var _ol_format_filter_IsLike_ = function(propertyName, pattern,
this.matchCase = opt_matchCase;
};
_ol_.inherits(_ol_format_filter_IsLike_, _ol_format_filter_Comparison_);
inherits(_ol_format_filter_IsLike_, _ol_format_filter_Comparison_);
export default _ol_format_filter_IsLike_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/IsNull
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_Comparison_ from '../filter/Comparison.js';
/**
@@ -17,5 +17,5 @@ var _ol_format_filter_IsNull_ = function(propertyName) {
_ol_format_filter_Comparison_.call(this, 'PropertyIsNull', propertyName);
};
_ol_.inherits(_ol_format_filter_IsNull_, _ol_format_filter_Comparison_);
inherits(_ol_format_filter_IsNull_, _ol_format_filter_Comparison_);
export default _ol_format_filter_IsNull_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/LessThan
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_ComparisonBinary_ from '../filter/ComparisonBinary.js';
/**
@@ -18,5 +18,5 @@ var _ol_format_filter_LessThan_ = function(propertyName, expression) {
_ol_format_filter_ComparisonBinary_.call(this, 'PropertyIsLessThan', propertyName, expression);
};
_ol_.inherits(_ol_format_filter_LessThan_, _ol_format_filter_ComparisonBinary_);
inherits(_ol_format_filter_LessThan_, _ol_format_filter_ComparisonBinary_);
export default _ol_format_filter_LessThan_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/LessThanOrEqualTo
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_ComparisonBinary_ from '../filter/ComparisonBinary.js';
/**
@@ -18,5 +18,5 @@ var _ol_format_filter_LessThanOrEqualTo_ = function(propertyName, expression) {
_ol_format_filter_ComparisonBinary_.call(this, 'PropertyIsLessThanOrEqualTo', propertyName, expression);
};
_ol_.inherits(_ol_format_filter_LessThanOrEqualTo_, _ol_format_filter_ComparisonBinary_);
inherits(_ol_format_filter_LessThanOrEqualTo_, _ol_format_filter_ComparisonBinary_);
export default _ol_format_filter_LessThanOrEqualTo_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/LogicalNary
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_asserts_ from '../../asserts.js';
import _ol_format_filter_Filter_ from '../filter/Filter.js';
@@ -28,5 +28,5 @@ var _ol_format_filter_LogicalNary_ = function(tagName, conditions) {
_ol_asserts_.assert(this.conditions.length >= 2, 57); // At least 2 conditions are required.
};
_ol_.inherits(_ol_format_filter_LogicalNary_, _ol_format_filter_Filter_);
inherits(_ol_format_filter_LogicalNary_, _ol_format_filter_Filter_);
export default _ol_format_filter_LogicalNary_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/Not
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_Filter_ from '../filter/Filter.js';
/**
@@ -24,5 +24,5 @@ var _ol_format_filter_Not_ = function(condition) {
this.condition = condition;
};
_ol_.inherits(_ol_format_filter_Not_, _ol_format_filter_Filter_);
inherits(_ol_format_filter_Not_, _ol_format_filter_Filter_);
export default _ol_format_filter_Not_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/NotEqualTo
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_ComparisonBinary_ from '../filter/ComparisonBinary.js';
/**
@@ -19,5 +19,5 @@ var _ol_format_filter_NotEqualTo_ = function(propertyName, expression, opt_match
_ol_format_filter_ComparisonBinary_.call(this, 'PropertyIsNotEqualTo', propertyName, expression, opt_matchCase);
};
_ol_.inherits(_ol_format_filter_NotEqualTo_, _ol_format_filter_ComparisonBinary_);
inherits(_ol_format_filter_NotEqualTo_, _ol_format_filter_ComparisonBinary_);
export default _ol_format_filter_NotEqualTo_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/Or
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_LogicalNary_ from '../filter/LogicalNary.js';
/**
@@ -18,5 +18,5 @@ var _ol_format_filter_Or_ = function(conditions) {
_ol_format_filter_LogicalNary_.apply(this, params);
};
_ol_.inherits(_ol_format_filter_Or_, _ol_format_filter_LogicalNary_);
inherits(_ol_format_filter_Or_, _ol_format_filter_LogicalNary_);
export default _ol_format_filter_Or_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/Spatial
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_Filter_ from '../filter/Filter.js';
/**
@@ -45,5 +45,5 @@ var _ol_format_filter_Spatial_ = function(tagName, geometryName, geometry, opt_s
this.srsName = opt_srsName;
};
_ol_.inherits(_ol_format_filter_Spatial_, _ol_format_filter_Filter_);
inherits(_ol_format_filter_Spatial_, _ol_format_filter_Filter_);
export default _ol_format_filter_Spatial_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/format/filter/Within
*/
import _ol_ from '../../index.js';
import {inherits} from '../../index.js';
import _ol_format_filter_Spatial_ from '../filter/Spatial.js';
/**
@@ -23,5 +23,5 @@ var _ol_format_filter_Within_ = function(geometryName, geometry, opt_srsName) {
};
_ol_.inherits(_ol_format_filter_Within_, _ol_format_filter_Spatial_);
inherits(_ol_format_filter_Within_, _ol_format_filter_Spatial_);
export default _ol_format_filter_Within_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/geom/Circle
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_extent_ from '../extent.js';
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
import _ol_geom_GeometryType_ from '../geom/GeometryType.js';
@@ -25,7 +25,7 @@ var _ol_geom_Circle_ = function(center, opt_radius, opt_layout) {
this.setCenterAndRadius(center, radius, opt_layout);
};
_ol_.inherits(_ol_geom_Circle_, _ol_geom_SimpleGeometry_);
inherits(_ol_geom_Circle_, _ol_geom_SimpleGeometry_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/geom/Geometry
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_Object_ from '../Object.js';
import _ol_extent_ from '../extent.js';
import _ol_functions_ from '../functions.js';
@@ -66,7 +66,7 @@ var _ol_geom_Geometry_ = function() {
};
_ol_.inherits(_ol_geom_Geometry_, _ol_Object_);
inherits(_ol_geom_Geometry_, _ol_Object_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/geom/GeometryCollection
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_events_ from '../events.js';
import _ol_events_EventType_ from '../events/EventType.js';
import _ol_extent_ from '../extent.js';
@@ -31,7 +31,7 @@ var _ol_geom_GeometryCollection_ = function(opt_geometries) {
this.listenGeometriesChange_();
};
_ol_.inherits(_ol_geom_GeometryCollection_, _ol_geom_Geometry_);
inherits(_ol_geom_GeometryCollection_, _ol_geom_Geometry_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/geom/LineString
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_array_ from '../array.js';
import _ol_extent_ from '../extent.js';
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
@@ -58,7 +58,7 @@ var _ol_geom_LineString_ = function(coordinates, opt_layout) {
};
_ol_.inherits(_ol_geom_LineString_, _ol_geom_SimpleGeometry_);
inherits(_ol_geom_LineString_, _ol_geom_SimpleGeometry_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/geom/LinearRing
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_extent_ from '../extent.js';
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
import _ol_geom_GeometryType_ from '../geom/GeometryType.js';
@@ -43,7 +43,7 @@ var _ol_geom_LinearRing_ = function(coordinates, opt_layout) {
};
_ol_.inherits(_ol_geom_LinearRing_, _ol_geom_SimpleGeometry_);
inherits(_ol_geom_LinearRing_, _ol_geom_SimpleGeometry_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/geom/MultiLineString
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_array_ from '../array.js';
import _ol_extent_ from '../extent.js';
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
@@ -51,7 +51,7 @@ var _ol_geom_MultiLineString_ = function(coordinates, opt_layout) {
};
_ol_.inherits(_ol_geom_MultiLineString_, _ol_geom_SimpleGeometry_);
inherits(_ol_geom_MultiLineString_, _ol_geom_SimpleGeometry_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/geom/MultiPoint
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_array_ from '../array.js';
import _ol_extent_ from '../extent.js';
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
@@ -27,7 +27,7 @@ var _ol_geom_MultiPoint_ = function(coordinates, opt_layout) {
this.setCoordinates(coordinates, opt_layout);
};
_ol_.inherits(_ol_geom_MultiPoint_, _ol_geom_SimpleGeometry_);
inherits(_ol_geom_MultiPoint_, _ol_geom_SimpleGeometry_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/geom/MultiPolygon
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_array_ from '../array.js';
import _ol_extent_ from '../extent.js';
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
@@ -80,7 +80,7 @@ var _ol_geom_MultiPolygon_ = function(coordinates, opt_layout) {
};
_ol_.inherits(_ol_geom_MultiPolygon_, _ol_geom_SimpleGeometry_);
inherits(_ol_geom_MultiPolygon_, _ol_geom_SimpleGeometry_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/geom/Point
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_extent_ from '../extent.js';
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
import _ol_geom_GeometryType_ from '../geom/GeometryType.js';
@@ -24,7 +24,7 @@ var _ol_geom_Point_ = function(coordinates, opt_layout) {
this.setCoordinates(coordinates, opt_layout);
};
_ol_.inherits(_ol_geom_Point_, _ol_geom_SimpleGeometry_);
inherits(_ol_geom_Point_, _ol_geom_SimpleGeometry_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/geom/Polygon
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_array_ from '../array.js';
import _ol_extent_ from '../extent.js';
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
@@ -85,7 +85,7 @@ var _ol_geom_Polygon_ = function(coordinates, opt_layout) {
};
_ol_.inherits(_ol_geom_Polygon_, _ol_geom_SimpleGeometry_);
inherits(_ol_geom_Polygon_, _ol_geom_SimpleGeometry_);
/**

View File

@@ -1,7 +1,7 @@
/**
* @module ol/geom/SimpleGeometry
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_functions_ from '../functions.js';
import _ol_extent_ from '../extent.js';
import _ol_geom_Geometry_ from '../geom/Geometry.js';
@@ -43,7 +43,7 @@ var _ol_geom_SimpleGeometry_ = function() {
};
_ol_.inherits(_ol_geom_SimpleGeometry_, _ol_geom_Geometry_);
inherits(_ol_geom_SimpleGeometry_, _ol_geom_Geometry_);
/**

View File

@@ -1,8 +1,8 @@
/**
* @module ol/has
*/
import _ol_ from './index.js';
import _ol_webgl_ from './webgl.js';
import {ENABLE_CANVAS, ASSUME_TOUCH, HAS_WEBGL} from './index.js';
var _ol_has_ = {};
var ua = typeof navigator !== 'undefined' ?
@@ -57,7 +57,7 @@ _ol_has_.CANVAS_LINE_DASH = false;
* @type {boolean}
* @api
*/
_ol_has_.CANVAS = _ol_.ENABLE_CANVAS && (
_ol_has_.CANVAS = ENABLE_CANVAS && (
/**
* @return {boolean} Canvas supported.
*/
@@ -105,7 +105,7 @@ _ol_has_.GEOLOCATION = 'geolocation' in navigator;
* @type {boolean}
* @api
*/
_ol_has_.TOUCH = _ol_.ASSUME_TOUCH || 'ontouchstart' in window;
_ol_has_.TOUCH = ASSUME_TOUCH || 'ontouchstart' in window;
/**
@@ -125,41 +125,12 @@ _ol_has_.MSPOINTER = !!(navigator.msPointerEnabled);
/**
* True if both OpenLayers and browser support WebGL. Always `false`
* if `ol.ENABLE_WEBGL` is set to `false` at compile time.
* True if both OpenLayers and browser support WebGL.
* @const
* @type {boolean}
* @api
*/
_ol_has_.WEBGL;
_ol_has_.WEBGL = HAS_WEBGL;
(function() {
if (_ol_.ENABLE_WEBGL) {
var hasWebGL = false;
var textureSize;
var /** @type {Array.<string>} */ extensions = [];
if ('WebGLRenderingContext' in window) {
try {
var canvas = /** @type {HTMLCanvasElement} */
(document.createElement('CANVAS'));
var gl = _ol_webgl_.getContext(canvas, {
failIfMajorPerformanceCaveat: true
});
if (gl) {
hasWebGL = true;
textureSize = /** @type {number} */
(gl.getParameter(gl.MAX_TEXTURE_SIZE));
extensions = gl.getSupportedExtensions();
}
} catch (e) {
// pass
}
}
_ol_has_.WEBGL = hasWebGL;
_ol_.WEBGL_EXTENSIONS = extensions;
_ol_.WEBGL_MAX_TEXTURE_SIZE = textureSize;
}
})();
export default _ol_has_;

View File

@@ -1,7 +1,8 @@
/**
* @module ol/index
*/
var _ol_ = {};
import webgl from './webgl.js';
/**
@@ -12,168 +13,164 @@ var _ol_ = {};
/**
* @define {boolean} Assume touch. Default is `false`.
* @type {boolean} Assume touch. Default is `false`.
*/
_ol_.ASSUME_TOUCH = false;
export var ASSUME_TOUCH = false;
/**
* TODO: rename this to something having to do with tile grids
* see https://github.com/openlayers/openlayers/issues/2076
* @define {number} Default maximum zoom for default tile grids.
* @type {number} Default maximum zoom for default tile grids.
*/
_ol_.DEFAULT_MAX_ZOOM = 42;
export var DEFAULT_MAX_ZOOM = 42;
/**
* @define {number} Default min zoom level for the map view. Default is `0`.
* @type {number} Default min zoom level for the map view. Default is `0`.
*/
_ol_.DEFAULT_MIN_ZOOM = 0;
export var DEFAULT_MIN_ZOOM = 0;
/**
* @define {number} Default maximum allowed threshold (in pixels) for
* @type {number} Default maximum allowed threshold (in pixels) for
* reprojection triangulation. Default is `0.5`.
*/
_ol_.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD = 0.5;
export var DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD = 0.5;
/**
* @define {number} Default tile size.
* @type {number} Default tile size.
*/
_ol_.DEFAULT_TILE_SIZE = 256;
export var DEFAULT_TILE_SIZE = 256;
/**
* @define {string} Default WMS version.
* @type {string} Default WMS version.
*/
_ol_.DEFAULT_WMS_VERSION = '1.3.0';
export var DEFAULT_WMS_VERSION = '1.3.0';
/**
* @define {boolean} Enable the Canvas renderer. Default is `true`. Setting
* @type {boolean} Enable the Canvas renderer. Default is `true`. Setting
* this to false at compile time in advanced mode removes all code
* supporting the Canvas renderer from the build.
*/
_ol_.ENABLE_CANVAS = true;
export var ENABLE_CANVAS = true;
/**
* @define {boolean} Enable integration with the Proj4js library. Default is
* @type {boolean} Enable integration with the Proj4js library. Default is
* `true`.
*/
_ol_.ENABLE_PROJ4JS = true;
export var ENABLE_PROJ4JS = true;
/**
* @define {boolean} Enable automatic reprojection of raster sources. Default is
* @type {boolean} Enable automatic reprojection of raster sources. Default is
* `true`.
*/
_ol_.ENABLE_RASTER_REPROJECTION = true;
export var ENABLE_RASTER_REPROJECTION = true;
/**
* @define {boolean} Enable the WebGL renderer. Default is `true`. Setting
* @type {boolean} Enable the WebGL renderer. Default is `true`. Setting
* this to false at compile time in advanced mode removes all code
* supporting the WebGL renderer from the build.
*/
_ol_.ENABLE_WEBGL = true;
export var ENABLE_WEBGL = true;
/**
* @define {boolean} Include debuggable shader sources. Default is `true`.
* This should be set to `false` for production builds (if `ol.ENABLE_WEBGL`
* @type {boolean} Include debuggable shader sources. Default is `true`.
* This should be set to `false` for production builds (if `ENABLE_WEBGL`
* is `true`).
*/
_ol_.DEBUG_WEBGL = true;
export var DEBUG_WEBGL = true;
/**
* @define {number} The size in pixels of the first atlas image. Default is
* TODO: get rid of this or move it to AtlasManager.js
* @type {number} The size in pixels of the first atlas image. Default is
* `256`.
*/
_ol_.INITIAL_ATLAS_SIZE = 256;
export var INITIAL_ATLAS_SIZE = 256;
/**
* @define {number} The maximum size in pixels of atlas images. Default is
* `-1`, meaning it is not used (and `ol.WEBGL_MAX_TEXTURE_SIZE` is
* TODO: get rid of this or move it to AtlasManager.js
* @type {number} The maximum size in pixels of atlas images. Default is
* `-1`, meaning it is not used (and `WEBGL_MAX_TEXTURE_SIZE` is
* used instead).
*/
_ol_.MAX_ATLAS_SIZE = -1;
export var MAX_ATLAS_SIZE = -1;
/**
* @define {number} Maximum mouse wheel delta.
* TODO: move this to MouseWheelZoom.js
* @type {number} Maximum mouse wheel delta.
*/
_ol_.MOUSEWHEELZOOM_MAXDELTA = 1;
export var MOUSEWHEELZOOM_MAXDELTA = 1;
/**
* @define {number} Maximum width and/or height extent ratio that determines
* TODO: move this to OverviewMap.js
* @type {number} Maximum width and/or height extent ratio that determines
* when the overview map should be zoomed out.
*/
_ol_.OVERVIEWMAP_MAX_RATIO = 0.75;
export var OVERVIEWMAP_MAX_RATIO = 0.75;
/**
* @define {number} Minimum width and/or height extent ratio that determines
* TODO: move this to OverviewMap.js
* @type {number} Minimum width and/or height extent ratio that determines
* when the overview map should be zoomed in.
*/
_ol_.OVERVIEWMAP_MIN_RATIO = 0.1;
export var OVERVIEWMAP_MIN_RATIO = 0.1;
/**
* @define {number} Maximum number of source tiles for raster reprojection of
* a single tile.
* If too many source tiles are determined to be loaded to create a single
* reprojected tile the browser can become unresponsive or even crash.
* This can happen if the developer defines projections improperly and/or
* with unlimited extents.
* If too many tiles are required, no tiles are loaded and
* `ol.TileState.ERROR` state is set. Default is `100`.
*/
_ol_.RASTER_REPROJECTION_MAX_SOURCE_TILES = 100;
/**
* @define {number} Maximum number of subdivision steps during raster
* TODO: move this to Triangulation.js
* @type {number} Maximum number of subdivision steps during raster
* reprojection triangulation. Prevents high memory usage and large
* number of proj4 calls (for certain transformations and areas).
* At most `2*(2^this)` triangles are created for each triangulated
* extent (tile/image). Default is `10`.
*/
_ol_.RASTER_REPROJECTION_MAX_SUBDIVISION = 10;
export var RASTER_REPROJECTION_MAX_SUBDIVISION = 10;
/**
* @define {number} Maximum allowed size of triangle relative to world width.
* TODO: move this to Triangulation.js
* @type {number} Maximum allowed size of triangle relative to world width.
* When transforming corners of world extent between certain projections,
* the resulting triangulation seems to have zero error and no subdivision
* is performed.
* If the triangle width is more than this (relative to world width; 0-1),
* subdivison is forced (up to `ol.RASTER_REPROJECTION_MAX_SUBDIVISION`).
* subdivison is forced (up to `RASTER_REPROJECTION_MAX_SUBDIVISION`).
* Default is `0.25`.
*/
_ol_.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH = 0.25;
export var RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH = 0.25;
/**
* @define {number} Tolerance for geometry simplification in device pixels.
* TODO: move this to renderer/vector.js
* @type {number} Tolerance for geometry simplification in device pixels.
*/
_ol_.SIMPLIFY_TOLERANCE = 0.5;
export var SIMPLIFY_TOLERANCE = 0.5;
/**
* @define {number} Texture cache high water mark.
* TODO: move this to webgl/Map.js
* @type {number} Texture cache high water mark.
*/
_ol_.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024;
export var WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024;
/**
* @define {string} OpenLayers version.
* @type {string} OpenLayers version.
*/
_ol_.VERSION = 'v4.6.4';
export var VERSION = 'v4.6.4';
/**
@@ -182,7 +179,7 @@ _ol_.VERSION = 'v4.6.4';
* @const
* @type {number|undefined}
*/
_ol_.WEBGL_MAX_TEXTURE_SIZE; // value is set in `ol.has`
var WEBGL_MAX_TEXTURE_SIZE; // value is set below
/**
@@ -190,7 +187,33 @@ _ol_.WEBGL_MAX_TEXTURE_SIZE; // value is set in `ol.has`
* @const
* @type {Array.<string>}
*/
_ol_.WEBGL_EXTENSIONS; // value is set in `ol.has`
var WEBGL_EXTENSIONS; // value is set below
/**
* WebGL is available.
* @type {boolean}
*/
var HAS_WEBGL = false;
if (ENABLE_WEBGL && 'WebGLRenderingContext' in window) {
try {
var canvas = /** @type {HTMLCanvasElement} */
(document.createElement('CANVAS'));
var gl = webgl.getContext(canvas, {failIfMajorPerformanceCaveat: true});
if (gl) {
HAS_WEBGL = true;
WEBGL_MAX_TEXTURE_SIZE = /** @type {number} */
(gl.getParameter(gl.MAX_TEXTURE_SIZE));
WEBGL_EXTENSIONS = gl.getSupportedExtensions();
}
} catch (e) {
// pass
}
}
export {HAS_WEBGL, WEBGL_MAX_TEXTURE_SIZE, WEBGL_EXTENSIONS};
/**
@@ -205,7 +228,7 @@ _ol_.WEBGL_EXTENSIONS; // value is set in `ol.has`
* // Call parent constructor
* ParentClass.call(this, a, b);
* }
* ol.inherits(ChildClass, ParentClass);
* inherits(ChildClass, ParentClass);
*
* var child = new ChildClass('a', 'b', 'see');
* child.foo(); // This works.
@@ -215,10 +238,10 @@ _ol_.WEBGL_EXTENSIONS; // value is set in `ol.has`
* @function
* @api
*/
_ol_.inherits = function(childCtor, parentCtor) {
export function inherits(childCtor, parentCtor) {
childCtor.prototype = Object.create(parentCtor.prototype);
childCtor.prototype.constructor = childCtor;
};
}
/**
@@ -226,9 +249,16 @@ _ol_.inherits = function(childCtor, parentCtor) {
*
* @return {undefined} Nothing.
*/
_ol_.nullFunction = function() {};
export function nullFunction() {}
/**
* Counter for getUid.
* @type {number}
* @private
*/
var uidCounter_ = 0;
/**
* Gets a unique ID for an object. This mutates the object so that further calls
* with the same object as a parameter returns the same value. Unique IDs are generated
@@ -237,16 +267,37 @@ _ol_.nullFunction = function() {};
* @param {Object} obj The object to get the unique ID for.
* @return {number} The unique ID for the object.
*/
_ol_.getUid = function(obj) {
return obj.ol_uid ||
(obj.ol_uid = ++_ol_.uidCounter_);
export function getUid(obj) {
return obj.ol_uid || (obj.ol_uid = ++uidCounter_);
}
export default {
getUid: getUid,
nullFunction: nullFunction,
inherits: inherits,
VERSION: VERSION,
ASSUME_TOUCH: ASSUME_TOUCH,
DEFAULT_MAX_ZOOM: DEFAULT_MAX_ZOOM,
DEFAULT_MIN_ZOOM: DEFAULT_MIN_ZOOM,
DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD: DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD,
DEFAULT_TILE_SIZE: DEFAULT_TILE_SIZE,
DEFAULT_WMS_VERSION: DEFAULT_WMS_VERSION,
ENABLE_CANVAS: ENABLE_CANVAS,
ENABLE_PROJ4JS: ENABLE_PROJ4JS,
ENABLE_RASTER_REPROJECTION: ENABLE_RASTER_REPROJECTION,
ENABLE_WEBGL: ENABLE_WEBGL,
DEBUG_WEBGL: DEBUG_WEBGL,
INITIAL_ATLAS_SIZE: INITIAL_ATLAS_SIZE,
MAX_ATLAS_SIZE: MAX_ATLAS_SIZE,
MOUSEWHEELZOOM_MAXDELTA: MOUSEWHEELZOOM_MAXDELTA,
OVERVIEWMAP_MAX_RATIO: OVERVIEWMAP_MAX_RATIO,
OVERVIEWMAP_MIN_RATIO: OVERVIEWMAP_MIN_RATIO,
RASTER_REPROJECTION_MAX_SUBDIVISION: RASTER_REPROJECTION_MAX_SUBDIVISION,
RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH: RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH,
SIMPLIFY_TOLERANCE: SIMPLIFY_TOLERANCE,
HAS_WEBGL: HAS_WEBGL,
WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK: WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK,
WEBGL_MAX_TEXTURE_SIZE: WEBGL_MAX_TEXTURE_SIZE,
WEBGL_EXTENSIONS: WEBGL_EXTENSIONS
};
/**
* Counter for getUid.
* @type {number}
* @private
*/
_ol_.uidCounter_ = 0;
export default _ol_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/interaction/DoubleClickZoom
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_MapBrowserEventType_ from '../MapBrowserEventType.js';
import _ol_interaction_Interaction_ from '../interaction/Interaction.js';
@@ -36,7 +36,7 @@ var _ol_interaction_DoubleClickZoom_ = function(opt_options) {
};
_ol_.inherits(_ol_interaction_DoubleClickZoom_, _ol_interaction_Interaction_);
inherits(_ol_interaction_DoubleClickZoom_, _ol_interaction_Interaction_);
/**

View File

@@ -3,7 +3,7 @@
*/
// FIXME should handle all geo-referenced data, not just vector data
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_functions_ from '../functions.js';
import _ol_events_ from '../events.js';
import _ol_events_Event_ from '../events/Event.js';
@@ -63,7 +63,7 @@ var _ol_interaction_DragAndDrop_ = function(opt_options) {
};
_ol_.inherits(_ol_interaction_DragAndDrop_, _ol_interaction_Interaction_);
inherits(_ol_interaction_DragAndDrop_, _ol_interaction_Interaction_);
/**
@@ -277,5 +277,5 @@ _ol_interaction_DragAndDrop_.Event = function(type, file, opt_features, opt_proj
this.projection = opt_projection;
};
_ol_.inherits(_ol_interaction_DragAndDrop_.Event, _ol_events_Event_);
inherits(_ol_interaction_DragAndDrop_.Event, _ol_events_Event_);
export default _ol_interaction_DragAndDrop_;

View File

@@ -3,7 +3,7 @@
*/
// FIXME draw drag box
import _ol_events_Event_ from '../events/Event.js';
import _ol_ from '../index.js';
import {inherits, nullFunction} from '../index.js';
import _ol_events_condition_ from '../events/condition.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
import _ol_render_Box_ from '../render/Box.js';
@@ -68,7 +68,7 @@ var _ol_interaction_DragBox_ = function(opt_options) {
options.boxEndCondition : _ol_interaction_DragBox_.defaultBoxEndCondition;
};
_ol_.inherits(_ol_interaction_DragBox_, _ol_interaction_Pointer_);
inherits(_ol_interaction_DragBox_, _ol_interaction_Pointer_);
/**
@@ -121,7 +121,7 @@ _ol_interaction_DragBox_.prototype.getGeometry = function() {
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
* @protected
*/
_ol_interaction_DragBox_.prototype.onBoxEnd = _ol_.nullFunction;
_ol_interaction_DragBox_.prototype.onBoxEnd = nullFunction;
/**
@@ -231,5 +231,5 @@ _ol_interaction_DragBox_.Event = function(type, coordinate, mapBrowserEvent) {
this.mapBrowserEvent = mapBrowserEvent;
};
_ol_.inherits(_ol_interaction_DragBox_.Event, _ol_events_Event_);
inherits(_ol_interaction_DragBox_.Event, _ol_events_Event_);
export default _ol_interaction_DragBox_;

View File

@@ -1,7 +1,7 @@
/**
* @module ol/interaction/DragPan
*/
import _ol_ from '../index.js';
import {inherits} from '../index.js';
import _ol_ViewHint_ from '../ViewHint.js';
import _ol_coordinate_ from '../coordinate.js';
import _ol_easing_ from '../easing.js';
@@ -59,7 +59,7 @@ var _ol_interaction_DragPan_ = function(opt_options) {
};
_ol_.inherits(_ol_interaction_DragPan_, _ol_interaction_Pointer_);
inherits(_ol_interaction_DragPan_, _ol_interaction_Pointer_);
/**

Some files were not shown because too many files have changed in this diff Show More