Merge pull request #4602 from tschaub/eslint

Use ESLint.
This commit is contained in:
Tim Schaub
2016-01-12 00:09:15 -08:00
341 changed files with 1621 additions and 2336 deletions

View File

@@ -4,7 +4,6 @@ goog.require('goog.math');
goog.require('ol.TileRange');
/**
* @classdesc
* An attribution for a layer source.
@@ -59,8 +58,7 @@ ol.Attribution.prototype.getHTML = function() {
* @param {!ol.proj.Projection} projection Projection.
* @return {boolean} Intersects any tile range.
*/
ol.Attribution.prototype.intersectsAnyTileRange =
function(tileRanges, tileGrid, projection) {
ol.Attribution.prototype.intersectsAnyTileRange = function(tileRanges, tileGrid, projection) {
if (!this.tileRanges_) {
return true;
}

View File

@@ -12,7 +12,7 @@ ol.CenterConstraintType;
/**
* @param {ol.Extent} extent Extent.
* @return {ol.CenterConstraintType}
* @return {ol.CenterConstraintType} The constraint.
*/
ol.CenterConstraint.createExtent = function(extent) {
return (

View File

@@ -31,7 +31,6 @@ ol.CollectionEventType = {
};
/**
* @classdesc
* Events emitted by {@link ol.Collection} instances are instances of this
@@ -67,7 +66,6 @@ ol.CollectionProperty = {
};
/**
* @classdesc
* An expanded version of standard JS Array, adding convenience methods for

View File

@@ -145,9 +145,6 @@ ol.color.equals = function(color1, color2) {
* @return {ol.Color} Color.
*/
ol.color.fromString = (
/**
* @return {function(string): ol.Color}
*/
function() {
// We maintain a small cache of parsed strings. To provide cheap LRU-like

View File

@@ -5,7 +5,6 @@ goog.require('ol.ResolutionConstraintType');
goog.require('ol.RotationConstraintType');
/**
* @constructor
* @param {ol.CenterConstraintType} centerConstraint Center constraint.
@@ -14,8 +13,7 @@ goog.require('ol.RotationConstraintType');
* @param {ol.RotationConstraintType} rotationConstraint
* Rotation constraint.
*/
ol.Constraints =
function(centerConstraint, resolutionConstraint, rotationConstraint) {
ol.Constraints = function(centerConstraint, resolutionConstraint, rotationConstraint) {
/**
* @type {ol.CenterConstraintType}

View File

@@ -16,7 +16,6 @@ goog.require('ol.css');
goog.require('ol.source.Tile');
/**
* @classdesc
* Control to show all the attributions associated with the layer sources
@@ -238,16 +237,14 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) {
this.attributionElementRenderedVisible_[attributionKey] = true;
}
delete visibleAttributions[attributionKey];
}
else if (attributionKey in hiddenAttributions) {
} else if (attributionKey in hiddenAttributions) {
if (this.attributionElementRenderedVisible_[attributionKey]) {
goog.style.setElementShown(
this.attributionElements_[attributionKey], false);
delete this.attributionElementRenderedVisible_[attributionKey];
}
delete hiddenAttributions[attributionKey];
}
else {
} else {
goog.dom.removeNode(this.attributionElements_[attributionKey]);
delete this.attributionElements_[attributionKey];
delete this.attributionElementRenderedVisible_[attributionKey];

View File

@@ -7,7 +7,6 @@ goog.require('ol.MapEventType');
goog.require('ol.Object');
/**
* @classdesc
* A control is a visible widget with a DOM element in a fixed position on the

View File

@@ -12,7 +12,6 @@ goog.require('ol.control.Control');
goog.require('ol.css');
/**
* @classdesc
* Provides a button that when clicked fills up the full screen with the map.

View File

@@ -23,7 +23,6 @@ ol.control.MousePositionProperty = {
};
/**
* @classdesc
* A control to show the 2D coordinates of the mouse cursor. By default, these

View File

@@ -23,7 +23,6 @@ goog.require('ol.css');
goog.require('ol.extent');
/**
* Create a new control with a map acting as an overview map for an other
* defined map.

View File

@@ -11,7 +11,6 @@ goog.require('ol.css');
goog.require('ol.easing');
/**
* @classdesc
* A button control to reset rotation to 0.

View File

@@ -37,7 +37,6 @@ ol.control.ScaleLineUnits = {
};
/**
* @classdesc
* A control displaying rough x-axis distances, calculated for the center of the

View File

@@ -9,7 +9,6 @@ goog.require('ol.css');
goog.require('ol.easing');
/**
* @classdesc
* A control with 2 buttons, one for zoom in and one for zoom out.

View File

@@ -21,7 +21,6 @@ goog.require('ol.easing');
goog.require('ol.math');
/**
* @classdesc
* A slider type of control for zooming.

View File

@@ -8,7 +8,6 @@ goog.require('ol.control.Control');
goog.require('ol.css');
/**
* @classdesc
* A button control which, when pressed, changes the map view to a specific

View File

@@ -20,7 +20,6 @@ ol.DeviceOrientationProperty = {
};
/**
* @classdesc
* The ol.DeviceOrientation class provides access to information from

View File

@@ -14,7 +14,7 @@ goog.require('ol');
* Create an html canvas element and returns its 2d context.
* @param {number=} opt_width Canvas width.
* @param {number=} opt_height Canvas height.
* @return {CanvasRenderingContext2D}
* @return {CanvasRenderingContext2D} The context.
*/
ol.dom.createCanvasContext2D = function(opt_width, opt_height) {
var canvas = document.createElement('CANVAS');
@@ -196,7 +196,7 @@ ol.dom.transformElement2D = function(element, transform, opt_precision) {
* padding and border.
* Equivalent to jQuery's `$(el).outerWidth(true)`.
* @param {!Element} element Element.
* @return {number}
* @return {number} The width.
*/
ol.dom.outerWidth = function(element) {
var width = element.offsetWidth;
@@ -212,7 +212,7 @@ ol.dom.outerWidth = function(element) {
* padding and border.
* Equivalent to jQuery's `$(el).outerHeight(true)`.
* @param {!Element} element Element.
* @return {number}
* @return {number} The height.
*/
ol.dom.outerHeight = function(element) {
var height = element.offsetHeight;

View File

@@ -301,8 +301,7 @@ ol.extent.createOrUpdateFromCoordinates = function(coordinates, opt_extent) {
* @param {ol.Extent=} opt_extent Extent.
* @return {ol.Extent} Extent.
*/
ol.extent.createOrUpdateFromFlatCoordinates =
function(flatCoordinates, offset, end, stride, opt_extent) {
ol.extent.createOrUpdateFromFlatCoordinates = function(flatCoordinates, offset, end, stride, opt_extent) {
var extent = ol.extent.createOrUpdateEmpty(opt_extent);
return ol.extent.extendFlatCoordinates(
extent, flatCoordinates, offset, end, stride);
@@ -411,8 +410,7 @@ ol.extent.extendCoordinates = function(extent, coordinates) {
* @param {number} stride Stride.
* @return {ol.Extent} Extent.
*/
ol.extent.extendFlatCoordinates =
function(extent, flatCoordinates, offset, end, stride) {
ol.extent.extendFlatCoordinates = function(extent, flatCoordinates, offset, end, stride) {
for (; offset < end; offset += stride) {
ol.extent.extendXY(
extent, flatCoordinates[offset], flatCoordinates[offset + 1]);
@@ -572,8 +570,7 @@ ol.extent.getEnlargedArea = function(extent1, extent2) {
* @param {ol.Extent=} opt_extent Destination extent.
* @return {ol.Extent} Extent.
*/
ol.extent.getForViewAndSize =
function(center, resolution, rotation, size, opt_extent) {
ol.extent.getForViewAndSize = function(center, resolution, rotation, size, opt_extent) {
var dx = resolution * size[0] / 2;
var dy = resolution * size[1] / 2;
var cosRotation = Math.cos(rotation);

View File

@@ -10,7 +10,6 @@ goog.require('ol.geom.Geometry');
goog.require('ol.style.Style');
/**
* @classdesc
* A vector object for geographic features with a geometry and other

View File

@@ -20,7 +20,6 @@ goog.require('ol.geom.flat.orient');
goog.require('ol.proj');
/**
* @classdesc
* Feature format for reading and writing data in the EsriJSON format.
@@ -353,8 +352,7 @@ ol.format.EsriJSON.writePolygonGeometry_ = function(geometry, opt_options) {
* @private
* @return {EsriJSONPolyline} EsriJSON geometry.
*/
ol.format.EsriJSON.writeMultiLineStringGeometry_ =
function(geometry, opt_options) {
ol.format.EsriJSON.writeMultiLineStringGeometry_ = function(geometry, opt_options) {
goog.asserts.assertInstanceof(geometry, ol.geom.MultiLineString,
'geometry should be an ol.geom.MultiLineString');
var hasZM = ol.format.EsriJSON.getHasZM_(geometry);
@@ -688,8 +686,7 @@ ol.format.EsriJSON.prototype.writeFeatures;
* @return {Object} EsriJSON Object.
* @api
*/
ol.format.EsriJSON.prototype.writeFeaturesObject =
function(features, opt_options) {
ol.format.EsriJSON.prototype.writeFeaturesObject = function(features, opt_options) {
opt_options = this.adaptOptions(opt_options);
var objects = [];
var i, ii;

View File

@@ -4,7 +4,6 @@ goog.require('ol.geom.Geometry');
goog.require('ol.proj');
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not

View File

@@ -18,7 +18,6 @@ goog.require('ol.geom.Polygon');
goog.require('ol.proj');
/**
* @classdesc
* Feature format for reading and writing data in the GeoJSON format.
@@ -243,8 +242,7 @@ ol.format.GeoJSON.writeLineStringGeometry_ = function(geometry, opt_options) {
* @private
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
ol.format.GeoJSON.writeMultiLineStringGeometry_ =
function(geometry, opt_options) {
ol.format.GeoJSON.writeMultiLineStringGeometry_ = function(geometry, opt_options) {
goog.asserts.assertInstanceof(geometry, ol.geom.MultiLineString,
'geometry should be an ol.geom.MultiLineString');
return /** @type {GeoJSONGeometry} */ ({
@@ -572,8 +570,7 @@ ol.format.GeoJSON.prototype.writeFeatures;
* @return {GeoJSONFeatureCollection} GeoJSON Object.
* @api stable
*/
ol.format.GeoJSON.prototype.writeFeaturesObject =
function(features, opt_options) {
ol.format.GeoJSON.prototype.writeFeaturesObject = function(features, opt_options) {
opt_options = this.adaptOptions(opt_options);
var objects = [];
var i, ii;

View File

@@ -9,7 +9,6 @@ goog.require('ol.proj');
goog.require('ol.xml');
/**
* @classdesc
* Feature format for reading and writing data in the GML format,
@@ -120,8 +119,7 @@ ol.format.GML2.prototype.readBox_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack.
* @private
*/
ol.format.GML2.prototype.innerBoundaryIsParser_ =
function(node, objectStack) {
ol.format.GML2.prototype.innerBoundaryIsParser_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
'node.nodeType should be ELEMENT');
goog.asserts.assert(node.localName == 'innerBoundaryIs',
@@ -146,8 +144,7 @@ ol.format.GML2.prototype.innerBoundaryIsParser_ =
* @param {Array.<*>} objectStack Object stack.
* @private
*/
ol.format.GML2.prototype.outerBoundaryIsParser_ =
function(node, objectStack) {
ol.format.GML2.prototype.outerBoundaryIsParser_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
'node.nodeType should be ELEMENT');
goog.asserts.assert(node.localName == 'outerBoundaryIs',

View File

@@ -23,7 +23,6 @@ goog.require('ol.proj');
goog.require('ol.xml');
/**
* @classdesc
* Feature format for reading and writing data in the GML format
@@ -224,8 +223,7 @@ ol.format.GML3.prototype.readPolygonPatch_ = function(node, objectStack) {
* @private
* @return {Array.<number>|undefined} flat coordinates.
*/
ol.format.GML3.prototype.readLineStringSegment_ =
function(node, objectStack) {
ol.format.GML3.prototype.readLineStringSegment_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
'node.nodeType should be ELEMENT');
goog.asserts.assert(node.localName == 'LineStringSegment',
@@ -661,7 +659,7 @@ ol.format.GML3.prototype.writePos_ = function(node, value, objectStack) {
/**
* @param {Array.<number>} point Point geometry.
* @param {string=} opt_srsName Optional srsName
* @return {string}
* @return {string} The coords string.
* @private
*/
ol.format.GML3.prototype.getCoords_ = function(point, opt_srsName) {
@@ -758,8 +756,7 @@ ol.format.GML3.prototype.writeEnvelope = function(node, extent, objectStack) {
* @param {Array.<*>} objectStack Node stack.
* @private
*/
ol.format.GML3.prototype.writeLinearRing_ =
function(node, geometry, objectStack) {
ol.format.GML3.prototype.writeLinearRing_ = function(node, geometry, objectStack) {
var context = objectStack[objectStack.length - 1];
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
var srsName = context['srsName'];
@@ -779,8 +776,7 @@ ol.format.GML3.prototype.writeLinearRing_ =
* @return {Node} Node.
* @private
*/
ol.format.GML3.prototype.RING_NODE_FACTORY_ =
function(value, objectStack, opt_nodeName) {
ol.format.GML3.prototype.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
var context = objectStack[objectStack.length - 1];
var parentNode = context.node;
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
@@ -799,8 +795,7 @@ ol.format.GML3.prototype.RING_NODE_FACTORY_ =
* @param {Array.<*>} objectStack Node stack.
* @private
*/
ol.format.GML3.prototype.writeSurfaceOrPolygon_ =
function(node, geometry, objectStack) {
ol.format.GML3.prototype.writeSurfaceOrPolygon_ = function(node, geometry, objectStack) {
var context = objectStack[objectStack.length - 1];
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
var srsName = context['srsName'];
@@ -829,8 +824,7 @@ ol.format.GML3.prototype.writeSurfaceOrPolygon_ =
* @param {Array.<*>} objectStack Node stack.
* @private
*/
ol.format.GML3.prototype.writeCurveOrLineString_ =
function(node, geometry, objectStack) {
ol.format.GML3.prototype.writeCurveOrLineString_ = function(node, geometry, objectStack) {
var context = objectStack[objectStack.length - 1];
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
var srsName = context['srsName'];
@@ -857,8 +851,7 @@ ol.format.GML3.prototype.writeCurveOrLineString_ =
* @param {Array.<*>} objectStack Node stack.
* @private
*/
ol.format.GML3.prototype.writeMultiSurfaceOrPolygon_ =
function(node, geometry, objectStack) {
ol.format.GML3.prototype.writeMultiSurfaceOrPolygon_ = function(node, geometry, objectStack) {
var context = objectStack[objectStack.length - 1];
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
var srsName = context['srsName'];
@@ -902,8 +895,7 @@ ol.format.GML3.prototype.writeMultiPoint_ = function(node, geometry,
* @param {Array.<*>} objectStack Node stack.
* @private
*/
ol.format.GML3.prototype.writeMultiCurveOrLineString_ =
function(node, geometry, objectStack) {
ol.format.GML3.prototype.writeMultiCurveOrLineString_ = function(node, geometry, objectStack) {
var context = objectStack[objectStack.length - 1];
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
var srsName = context['srsName'];
@@ -938,8 +930,7 @@ ol.format.GML3.prototype.writeRing_ = function(node, ring, objectStack) {
* @param {Array.<*>} objectStack Node stack.
* @private
*/
ol.format.GML3.prototype.writeSurfaceOrPolygonMember_ =
function(node, polygon, objectStack) {
ol.format.GML3.prototype.writeSurfaceOrPolygonMember_ = function(node, polygon, objectStack) {
var context = objectStack[objectStack.length - 1];
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
var child = this.GEOMETRY_NODE_FACTORY_(
@@ -957,8 +948,7 @@ ol.format.GML3.prototype.writeSurfaceOrPolygonMember_ =
* @param {Array.<*>} objectStack Node stack.
* @private
*/
ol.format.GML3.prototype.writePointMember_ =
function(node, point, objectStack) {
ol.format.GML3.prototype.writePointMember_ = function(node, point, objectStack) {
var child = ol.xml.createElementNS(node.namespaceURI, 'Point');
node.appendChild(child);
this.writePoint_(child, point, objectStack);
@@ -971,8 +961,7 @@ ol.format.GML3.prototype.writePointMember_ =
* @param {Array.<*>} objectStack Node stack.
* @private
*/
ol.format.GML3.prototype.writeLineStringOrCurveMember_ =
function(node, line, objectStack) {
ol.format.GML3.prototype.writeLineStringOrCurveMember_ = function(node, line, objectStack) {
var context = objectStack[objectStack.length - 1];
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);
@@ -989,8 +978,7 @@ ol.format.GML3.prototype.writeLineStringOrCurveMember_ =
* @param {Array.<*>} objectStack Node stack.
* @private
*/
ol.format.GML3.prototype.writeSurfacePatches_ =
function(node, polygon, objectStack) {
ol.format.GML3.prototype.writeSurfacePatches_ = function(node, polygon, objectStack) {
var child = ol.xml.createElementNS(node.namespaceURI, 'PolygonPatch');
node.appendChild(child);
this.writeSurfaceOrPolygon_(child, polygon, objectStack);
@@ -1003,8 +991,7 @@ ol.format.GML3.prototype.writeSurfacePatches_ =
* @param {Array.<*>} objectStack Node stack.
* @private
*/
ol.format.GML3.prototype.writeCurveSegments_ =
function(node, line, objectStack) {
ol.format.GML3.prototype.writeCurveSegments_ = function(node, line, objectStack) {
var child = ol.xml.createElementNS(node.namespaceURI,
'LineStringSegment');
node.appendChild(child);
@@ -1017,8 +1004,7 @@ ol.format.GML3.prototype.writeCurveSegments_ =
* @param {ol.geom.Geometry|ol.Extent} geometry Geometry.
* @param {Array.<*>} objectStack Node stack.
*/
ol.format.GML3.prototype.writeGeometryElement =
function(node, geometry, objectStack) {
ol.format.GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
var context = objectStack[objectStack.length - 1];
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
var item = goog.object.clone(context);
@@ -1049,8 +1035,7 @@ ol.format.GML3.prototype.writeGeometryElement =
* @param {ol.Feature} feature Feature.
* @param {Array.<*>} objectStack Node stack.
*/
ol.format.GML3.prototype.writeFeatureElement =
function(node, feature, objectStack) {
ol.format.GML3.prototype.writeFeatureElement = function(node, feature, objectStack) {
var fid = feature.getId();
if (fid) {
node.setAttribute('fid', fid);
@@ -1099,8 +1084,7 @@ ol.format.GML3.prototype.writeFeatureElement =
* @param {Array.<*>} objectStack Node stack.
* @private
*/
ol.format.GML3.prototype.writeFeatureMembers_ =
function(node, features, objectStack) {
ol.format.GML3.prototype.writeFeatureMembers_ = function(node, features, objectStack) {
var context = objectStack[objectStack.length - 1];
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
var featureType = context['featureType'];
@@ -1225,8 +1209,7 @@ ol.format.GML3.MULTIGEOMETRY_TO_MEMBER_NODENAME_ = {
* @return {Node|undefined} Node.
* @private
*/
ol.format.GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ =
function(value, objectStack, opt_nodeName) {
ol.format.GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
var parentNode = objectStack[objectStack.length - 1].node;
goog.asserts.assert(ol.xml.isNode(parentNode),
'parentNode should be a node');
@@ -1243,8 +1226,7 @@ ol.format.GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ =
* @return {Node|undefined} Node.
* @private
*/
ol.format.GML3.prototype.GEOMETRY_NODE_FACTORY_ =
function(value, objectStack, opt_nodeName) {
ol.format.GML3.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
var context = objectStack[objectStack.length - 1];
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
var multiSurface = context['multiSurface'];
@@ -1341,7 +1323,6 @@ ol.format.GML3.prototype.writeFeaturesNode = function(features, opt_options) {
};
/**
* @classdesc
* Feature format for reading and writing data in the GML format

View File

@@ -24,7 +24,6 @@ goog.require('ol.proj');
goog.require('ol.xml');
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
@@ -340,8 +339,7 @@ ol.format.GMLBase.prototype.pointMemberParser_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack.
* @private
*/
ol.format.GMLBase.prototype.lineStringMemberParser_ =
function(node, objectStack) {
ol.format.GMLBase.prototype.lineStringMemberParser_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
'node.nodeType should be ELEMENT');
goog.asserts.assert(node.localName == 'lineStringMember' ||
@@ -357,8 +355,7 @@ ol.format.GMLBase.prototype.lineStringMemberParser_ =
* @param {Array.<*>} objectStack Object stack.
* @private
*/
ol.format.GMLBase.prototype.polygonMemberParser_ =
function(node, objectStack) {
ol.format.GMLBase.prototype.polygonMemberParser_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
'node.nodeType should be ELEMENT');
goog.asserts.assert(node.localName == 'polygonMember' ||
@@ -472,8 +469,7 @@ ol.format.GMLBase.prototype.readPolygon = function(node, objectStack) {
* @private
* @return {Array.<number>} Flat coordinates.
*/
ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_ =
function(node, objectStack) {
ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
'node.nodeType should be ELEMENT');
return /** @type {Array.<number>} */ (ol.xml.pushParseAndPop(
@@ -583,8 +579,7 @@ ol.format.GMLBase.prototype.RING_PARSERS = Object({
/**
* @inheritDoc
*/
ol.format.GMLBase.prototype.readGeometryFromNode =
function(node, opt_options) {
ol.format.GMLBase.prototype.readGeometryFromNode = function(node, opt_options) {
var geometry = this.readGeometryElement(node,
[this.getReadOptions(node, opt_options ? opt_options : {})]);
return geometry ? geometry : null;
@@ -606,8 +601,7 @@ ol.format.GMLBase.prototype.readFeatures;
/**
* @inheritDoc
*/
ol.format.GMLBase.prototype.readFeaturesFromNode =
function(node, opt_options) {
ol.format.GMLBase.prototype.readFeaturesFromNode = function(node, opt_options) {
var options = {
featureType: this.featureType,
featureNS: this.featureNS

View File

@@ -15,7 +15,6 @@ goog.require('ol.proj');
goog.require('ol.xml');
/**
* @classdesc
* Feature format for reading and writing data in the GPX format.
@@ -413,7 +412,7 @@ ol.format.GPX.WPT_PARSERS_ = ol.xml.makeStructureNS(
/**
* @param {Array.<ol.Feature>} features
* @param {Array.<ol.Feature>} features List of features.
* @private
*/
ol.format.GPX.prototype.handleReadExtensions_ = function(features) {
@@ -551,12 +550,12 @@ ol.format.GPX.writeWptType_ = function(node, coordinate, objectStack) {
ol.xml.setAttributeNS(node, null, 'lat', coordinate[1]);
ol.xml.setAttributeNS(node, null, 'lon', coordinate[0]);
var geometryLayout = context['geometryLayout'];
/* jshint -W086 */
switch (geometryLayout) {
case ol.geom.GeometryLayout.XYZM:
if (coordinate[3] !== 0) {
properties['time'] = coordinate[3];
}
// fall through
case ol.geom.GeometryLayout.XYZ:
if (coordinate[2] !== 0) {
properties['ele'] = coordinate[2];
@@ -566,8 +565,10 @@ ol.format.GPX.writeWptType_ = function(node, coordinate, objectStack) {
if (coordinate[2] !== 0) {
properties['time'] = coordinate[2];
}
break;
default:
// pass
}
/* jshint +W086 */
var orderedKeys = ol.format.GPX.WPT_TYPE_SEQUENCE_[namespaceURI];
var values = ol.xml.makeSequence(properties, orderedKeys);
ol.xml.pushSerializeAndPop(/** @type {ol.xml.NodeStackItem} */

View File

@@ -23,7 +23,6 @@ ol.format.IGCZ = {
};
/**
* @classdesc
* Feature format for `*.igc` flight recording files.

View File

@@ -6,7 +6,6 @@ goog.require('ol.format.Feature');
goog.require('ol.format.FormatType');
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not

View File

@@ -57,7 +57,6 @@ ol.format.KMLVec2_;
ol.format.KMLGxTrackObject_;
/**
* @classdesc
* Feature format for reading and writing data in the KML format.
@@ -1164,8 +1163,8 @@ ol.format.KML.readStyle_ = function(node, objectStack) {
* Reads an array of geometries and creates arrays for common geometry
* properties. Then sets them to the multi geometry.
* @param {ol.geom.MultiPoint|ol.geom.MultiLineString|ol.geom.MultiPolygon}
* multiGeometry
* @param {Array.<ol.geom.Geometry>} geometries
* multiGeometry A multi-geometry.
* @param {Array.<ol.geom.Geometry>} geometries List of geometries.
* @private
*/
ol.format.KML.setCommonGeometryProperties_ = function(multiGeometry,
@@ -2137,8 +2136,7 @@ ol.format.KML.writeColorTextNode_ = function(node, color) {
* @param {Array.<*>} objectStack Object stack.
* @private
*/
ol.format.KML.writeCoordinatesTextNode_ =
function(node, coordinates, objectStack) {
ol.format.KML.writeCoordinatesTextNode_ = function(node, coordinates, objectStack) {
var context = objectStack[objectStack.length - 1];
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
@@ -2322,8 +2320,7 @@ ol.format.KML.writeLineStyle_ = function(node, style, objectStack) {
* @param {Array.<*>} objectStack Object stack.
* @private
*/
ol.format.KML.writeMultiGeometry_ =
function(node, geometry, objectStack) {
ol.format.KML.writeMultiGeometry_ = function(node, geometry, objectStack) {
goog.asserts.assert(
(geometry instanceof ol.geom.MultiPoint) ||
(geometry instanceof ol.geom.MultiLineString) ||
@@ -2605,9 +2602,8 @@ ol.format.KML.ICON_SEQUENCE_ = ol.xml.makeStructureNS(
ol.format.KML.NAMESPACE_URIS_, [
'href'
],
ol.xml.makeStructureNS(
ol.format.KML.GX_NAMESPACE_URIS_, [
'x', 'y', 'w', 'h'
ol.xml.makeStructureNS(ol.format.KML.GX_NAMESPACE_URIS_, [
'x', 'y', 'w', 'h'
]));

View File

@@ -22,7 +22,6 @@ goog.require('ol.proj.Units');
goog.require('ol.render.Feature');
/**
* @classdesc
* Feature format for reading data in the Mapbox MVT format.
@@ -207,11 +206,11 @@ ol.format.MVT.prototype.setLayers = function(layers) {
ol.format.MVT.calculateFlatCoordinates_ = function(
coords, flatCoordinates, ends) {
var end = 0;
var line, coord;
for (var i = 0, ii = coords.length; i < ii; ++i) {
line = coords[i];
for (var j = 0, jj = line.length; j < jj; ++j) {
coord = line[j];
var line = coords[i];
var j, jj;
for (j = 0, jj = line.length; j < jj; ++j) {
var coord = line[j];
// Non-tilespace coords can be calculated here when a TileGrid and
// TileCoord are known.
flatCoordinates.push(coord.x, coord.y);

View File

@@ -16,7 +16,6 @@ goog.require('ol.proj');
goog.require('ol.xml');
/**
* @classdesc
* Feature format for reading data in the
@@ -128,7 +127,6 @@ ol.format.OSMXML.readWay_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {ol.Feature|undefined} Track.
*/
ol.format.OSMXML.readNd_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -143,7 +141,6 @@ ol.format.OSMXML.readNd_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {ol.Feature|undefined} Track.
*/
ol.format.OSMXML.readTag_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,

View File

@@ -8,7 +8,6 @@ goog.require('ol.format.XSD');
goog.require('ol.xml');
/**
* @constructor
* @extends {ol.format.XML}
@@ -52,7 +51,7 @@ ol.format.OWS.prototype.readFromNode = function(node) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The address.
*/
ol.format.OWS.readAddress_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -68,7 +67,7 @@ ol.format.OWS.readAddress_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The values.
*/
ol.format.OWS.readAllowedValues_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -84,7 +83,7 @@ ol.format.OWS.readAllowedValues_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The constraint.
*/
ol.format.OWS.readConstraint_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -105,7 +104,7 @@ ol.format.OWS.readConstraint_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The contact info.
*/
ol.format.OWS.readContactInfo_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -121,7 +120,7 @@ ol.format.OWS.readContactInfo_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The DCP.
*/
ol.format.OWS.readDcp_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -136,7 +135,7 @@ ol.format.OWS.readDcp_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The GET object.
*/
ol.format.OWS.readGet_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -155,7 +154,7 @@ ol.format.OWS.readGet_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The HTTP object.
*/
ol.format.OWS.readHttp_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -170,7 +169,7 @@ ol.format.OWS.readHttp_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The operation.
*/
ol.format.OWS.readOperation_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -195,7 +194,7 @@ ol.format.OWS.readOperation_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The operations metadata.
*/
ol.format.OWS.readOperationsMetadata_ = function(node,
objectStack) {
@@ -213,7 +212,7 @@ ol.format.OWS.readOperationsMetadata_ = function(node,
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The phone.
*/
ol.format.OWS.readPhone_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -228,7 +227,7 @@ ol.format.OWS.readPhone_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The service identification.
*/
ol.format.OWS.readServiceIdentification_ = function(node,
objectStack) {
@@ -246,7 +245,7 @@ ol.format.OWS.readServiceIdentification_ = function(node,
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The service contact.
*/
ol.format.OWS.readServiceContact_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -263,7 +262,7 @@ ol.format.OWS.readServiceContact_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {Object|undefined}
* @return {Object|undefined} The service provider.
*/
ol.format.OWS.readServiceProvider_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -280,7 +279,7 @@ ol.format.OWS.readServiceProvider_ = function(node, objectStack) {
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @private
* @return {string|undefined}
* @return {string|undefined} The value.
*/
ol.format.OWS.readValue_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,

View File

@@ -12,7 +12,6 @@ goog.require('ol.geom.flat.inflate');
goog.require('ol.proj');
/**
* @classdesc
* Feature format for reading and writing data in the Encoded
@@ -301,8 +300,7 @@ ol.format.Polyline.prototype.readFeatures;
/**
* @inheritDoc
*/
ol.format.Polyline.prototype.readFeaturesFromText =
function(text, opt_options) {
ol.format.Polyline.prototype.readFeaturesFromText = function(text, opt_options) {
var feature = this.readFeatureFromText(text, opt_options);
return [feature];
};
@@ -323,8 +321,7 @@ ol.format.Polyline.prototype.readGeometry;
/**
* @inheritDoc
*/
ol.format.Polyline.prototype.readGeometryFromText =
function(text, opt_options) {
ol.format.Polyline.prototype.readGeometryFromText = function(text, opt_options) {
var stride = ol.geom.SimpleGeometry.getStrideForLayout(this.geometryLayout_);
var flatCoordinates = ol.format.Polyline.decodeDeltas(
text, stride, this.factor_);
@@ -368,8 +365,7 @@ ol.format.Polyline.prototype.writeFeatureText = function(feature, opt_options) {
/**
* @inheritDoc
*/
ol.format.Polyline.prototype.writeFeaturesText =
function(features, opt_options) {
ol.format.Polyline.prototype.writeFeaturesText = function(features, opt_options) {
goog.asserts.assert(features.length == 1,
'features array should have 1 item');
return this.writeFeatureText(features[0], opt_options);
@@ -391,8 +387,7 @@ ol.format.Polyline.prototype.writeGeometry;
/**
* @inheritDoc
*/
ol.format.Polyline.prototype.writeGeometryText =
function(geometry, opt_options) {
ol.format.Polyline.prototype.writeGeometryText = function(geometry, opt_options) {
goog.asserts.assertInstanceof(geometry, ol.geom.LineString,
'geometry should be an ol.geom.LineString');
geometry = /** @type {ol.geom.LineString} */

View File

@@ -132,4 +132,3 @@ If, when reading a value from a child element, you find an invalid value, you sh
An `ol.format.Format` should read as many features as it can, skipping features with any errors.

View File

@@ -5,7 +5,6 @@ goog.require('ol.format.Feature');
goog.require('ol.format.FormatType');
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not

View File

@@ -14,7 +14,6 @@ goog.require('ol.geom.Polygon');
goog.require('ol.proj');
/**
* @classdesc
* Feature format for reading data in the TopoJSON format.

View File

@@ -13,7 +13,6 @@ goog.require('ol.proj');
goog.require('ol.xml');
/**
* @classdesc
* Feature format for reading and writing data in the WFS format.
@@ -192,8 +191,7 @@ ol.format.WFS.prototype.readFeatureCollectionMetadata = function(source) {
* @return {ol.format.WFS.FeatureCollectionMetadata|undefined}
* FeatureCollection metadata.
*/
ol.format.WFS.prototype.readFeatureCollectionMetadataFromDocument =
function(doc) {
ol.format.WFS.prototype.readFeatureCollectionMetadataFromDocument = function(doc) {
goog.asserts.assert(doc.nodeType == goog.dom.NodeType.DOCUMENT,
'doc.nodeType should be DOCUMENT');
for (var n = doc.firstChild; n; n = n.nextSibling) {

View File

@@ -16,7 +16,6 @@ goog.require('ol.geom.Point');
goog.require('ol.geom.Polygon');
/**
* @classdesc
* Geometry format for reading and writing data in the `WellKnownText` (WKT)
@@ -387,7 +386,6 @@ ol.format.WKT.TokenType = {
};
/**
* Class to tokenize a WKT string.
* @param {string} wkt WKT string.
@@ -524,10 +522,9 @@ ol.format.WKT.Lexer.prototype.readText_ = function() {
};
/**
* Class to parse the tokens from the WKT string.
* @param {ol.format.WKT.Lexer} lexer
* @param {ol.format.WKT.Lexer} lexer The lexer.
* @constructor
* @protected
*/

View File

@@ -10,7 +10,6 @@ goog.require('ol.format.XSD');
goog.require('ol.xml');
/**
* @classdesc
* Format for reading WMS capabilities data
@@ -131,8 +130,7 @@ ol.format.WMSCapabilities.readBoundingBox_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack.
* @return {ol.Extent|undefined} Bounding box object.
*/
ol.format.WMSCapabilities.readEXGeographicBoundingBox_ =
function(node, objectStack) {
ol.format.WMSCapabilities.readEXGeographicBoundingBox_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
'node.nodeType should be ELEMENT');
goog.asserts.assert(node.localName == 'EX_GeographicBoundingBox',
@@ -201,8 +199,7 @@ ol.format.WMSCapabilities.readService_ = function(node, objectStack) {
* @private
* @return {Object|undefined} Contact information object.
*/
ol.format.WMSCapabilities.readContactInformation_ =
function(node, objectStack) {
ol.format.WMSCapabilities.readContactInformation_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
'node.nodeType shpuld be ELEMENT');
goog.asserts.assert(node.localName == 'ContactInformation',
@@ -219,8 +216,7 @@ ol.format.WMSCapabilities.readContactInformation_ =
* @private
* @return {Object|undefined} Contact person object.
*/
ol.format.WMSCapabilities.readContactPersonPrimary_ =
function(node, objectStack) {
ol.format.WMSCapabilities.readContactPersonPrimary_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
'node.nodeType should be ELEMENT');
goog.asserts.assert(node.localName == 'ContactPersonPrimary',
@@ -237,8 +233,7 @@ ol.format.WMSCapabilities.readContactPersonPrimary_ =
* @private
* @return {Object|undefined} Contact address object.
*/
ol.format.WMSCapabilities.readContactAddress_ =
function(node, objectStack) {
ol.format.WMSCapabilities.readContactAddress_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
'node.nodeType should be ELEMENT');
goog.asserts.assert(node.localName == 'ContactAddress',
@@ -396,8 +391,7 @@ ol.format.WMSCapabilities.readDimension_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} Online resource object.
*/
ol.format.WMSCapabilities.readFormatOnlineresource_ =
function(node, objectStack) {
ol.format.WMSCapabilities.readFormatOnlineresource_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
'node.nodeType should be ELEMENT');
return ol.xml.pushParseAndPop(
@@ -473,8 +467,7 @@ ol.format.WMSCapabilities.readOperationType_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} Online resource object.
*/
ol.format.WMSCapabilities.readSizedFormatOnlineresource_ =
function(node, objectStack) {
ol.format.WMSCapabilities.readSizedFormatOnlineresource_ = function(node, objectStack) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
'node.nodeType should be ELEMENT');
var formatOnlineresource =

View File

@@ -9,7 +9,6 @@ goog.require('ol.format.XMLFeature');
goog.require('ol.xml');
/**
* @classdesc
* Format for reading WMSGetFeatureInfo format. It uses
@@ -61,8 +60,7 @@ ol.format.WMSGetFeatureInfo.layerIdentifier_ = '_layer';
* @return {Array.<ol.Feature>} Features.
* @private
*/
ol.format.WMSGetFeatureInfo.prototype.readFeatures_ =
function(node, objectStack) {
ol.format.WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
node.namespaceURI = this.featureNS_;
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -134,8 +132,7 @@ ol.format.WMSGetFeatureInfo.prototype.readFeatures;
/**
* @inheritDoc
*/
ol.format.WMSGetFeatureInfo.prototype.readFeaturesFromNode =
function(node, opt_options) {
ol.format.WMSGetFeatureInfo.prototype.readFeaturesFromNode = function(node, opt_options) {
var options = {
'featureType': this.featureType,
'featureNS': this.featureNS

View File

@@ -10,7 +10,6 @@ goog.require('ol.format.XSD');
goog.require('ol.xml');
/**
* @classdesc
* Format for reading WMTS capabilities data.

View File

@@ -10,7 +10,6 @@ goog.require('ol.proj');
goog.require('ol.xml');
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not

View File

@@ -4,7 +4,6 @@ goog.require('goog.asserts');
goog.require('ol.xml');
/**
* @classdesc
* Generic format for reading non-feature XML data
@@ -17,7 +16,7 @@ ol.format.XML = function() {
/**
* @param {Document|Node|string} source Source.
* @return {Object}
* @return {Object} The parsed result.
*/
ol.format.XML.prototype.read = function(source) {
if (ol.xml.isDocument(source)) {

View File

@@ -165,8 +165,7 @@ ol.format.XSD.writeDecimalTextNode = function(node, decimal) {
* @param {Node} node Node to append a TextNode with the decimal to.
* @param {number} nonNegativeInteger Non negative integer.
*/
ol.format.XSD.writeNonNegativeIntegerTextNode =
function(node, nonNegativeInteger) {
ol.format.XSD.writeNonNegativeIntegerTextNode = function(node, nonNegativeInteger) {
goog.asserts.assert(nonNegativeInteger >= 0, 'value should be more than 0');
goog.asserts.assert(nonNegativeInteger == (nonNegativeInteger | 0),
'value should be an integer value');

View File

@@ -32,7 +32,6 @@ ol.GeolocationProperty = {
};
/**
* @classdesc
* Helper class for providing HTML5 Geolocation capabilities.

View File

@@ -9,7 +9,6 @@ goog.require('ol.geom.flat.deflate');
goog.require('ol.proj');
/**
* @classdesc
* Circle geometry.
@@ -44,8 +43,7 @@ ol.geom.Circle.prototype.clone = function() {
/**
* @inheritDoc
*/
ol.geom.Circle.prototype.closestPointXY =
function(x, y, closestPoint, minSquaredDistance) {
ol.geom.Circle.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
var flatCoordinates = this.flatCoordinates;
var dx = x - flatCoordinates[0];
var dy = y - flatCoordinates[1];
@@ -187,8 +185,7 @@ ol.geom.Circle.prototype.setCenter = function(center) {
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api
*/
ol.geom.Circle.prototype.setCenterAndRadius =
function(center, radius, opt_layout) {
ol.geom.Circle.prototype.setCenterAndRadius = function(center, radius, opt_layout) {
if (!center) {
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
} else {
@@ -215,8 +212,7 @@ ol.geom.Circle.prototype.setCenterAndRadius =
* @param {ol.geom.GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates.
*/
ol.geom.Circle.prototype.setFlatCoordinates =
function(layout, flatCoordinates) {
ol.geom.Circle.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
this.setFlatCoordinatesInternal(layout, flatCoordinates);
this.changed();
};

View File

@@ -30,8 +30,7 @@ ol.geom.flat.area.linearRing = function(flatCoordinates, offset, end, stride) {
* @param {number} stride Stride.
* @return {number} Area.
*/
ol.geom.flat.area.linearRings =
function(flatCoordinates, offset, ends, stride) {
ol.geom.flat.area.linearRings = function(flatCoordinates, offset, ends, stride) {
var area = 0;
var i, ii;
for (i = 0, ii = ends.length; i < ii; ++i) {
@@ -50,8 +49,7 @@ ol.geom.flat.area.linearRings =
* @param {number} stride Stride.
* @return {number} Area.
*/
ol.geom.flat.area.linearRingss =
function(flatCoordinates, offset, endss, stride) {
ol.geom.flat.area.linearRingss = function(flatCoordinates, offset, endss, stride) {
var area = 0;
var i, ii;
for (i = 0, ii = endss.length; i < ii; ++i) {

View File

@@ -10,8 +10,7 @@ goog.require('ol.extent');
* @param {number} stride Stride.
* @return {Array.<number>} Flat centers.
*/
ol.geom.flat.center.linearRingss =
function(flatCoordinates, offset, endss, stride) {
ol.geom.flat.center.linearRingss = function(flatCoordinates, offset, endss, stride) {
var flatCenters = [];
var i, ii;
var extent = ol.extent.createEmpty();

View File

@@ -17,8 +17,7 @@ goog.require('ol.math');
* @param {number} y Y.
* @param {Array.<number>} closestPoint Closest point.
*/
ol.geom.flat.closest.point =
function(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {
ol.geom.flat.closest.point = function(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {
var x1 = flatCoordinates[offset1];
var y1 = flatCoordinates[offset1 + 1];
var dx = flatCoordinates[offset2] - x1;
@@ -58,8 +57,7 @@ ol.geom.flat.closest.point =
* @param {number} maxSquaredDelta Max squared delta.
* @return {number} Max squared delta.
*/
ol.geom.flat.closest.getMaxSquaredDelta =
function(flatCoordinates, offset, end, stride, maxSquaredDelta) {
ol.geom.flat.closest.getMaxSquaredDelta = function(flatCoordinates, offset, end, stride, maxSquaredDelta) {
var x1 = flatCoordinates[offset];
var y1 = flatCoordinates[offset + 1];
for (offset += stride; offset < end; offset += stride) {
@@ -84,8 +82,7 @@ ol.geom.flat.closest.getMaxSquaredDelta =
* @param {number} maxSquaredDelta Max squared delta.
* @return {number} Max squared delta.
*/
ol.geom.flat.closest.getsMaxSquaredDelta =
function(flatCoordinates, offset, ends, stride, maxSquaredDelta) {
ol.geom.flat.closest.getsMaxSquaredDelta = function(flatCoordinates, offset, ends, stride, maxSquaredDelta) {
var i, ii;
for (i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
@@ -105,8 +102,7 @@ ol.geom.flat.closest.getsMaxSquaredDelta =
* @param {number} maxSquaredDelta Max squared delta.
* @return {number} Max squared delta.
*/
ol.geom.flat.closest.getssMaxSquaredDelta =
function(flatCoordinates, offset, endss, stride, maxSquaredDelta) {
ol.geom.flat.closest.getssMaxSquaredDelta = function(flatCoordinates, offset, endss, stride, maxSquaredDelta) {
var i, ii;
for (i = 0, ii = endss.length; i < ii; ++i) {
var ends = endss[i];

View File

@@ -12,8 +12,7 @@ goog.require('ol.extent');
* @param {ol.Extent} extent Extent.
* @return {boolean} Contains extent.
*/
ol.geom.flat.contains.linearRingContainsExtent =
function(flatCoordinates, offset, end, stride, extent) {
ol.geom.flat.contains.linearRingContainsExtent = function(flatCoordinates, offset, end, stride, extent) {
var outside = ol.extent.forEachCorner(extent,
/**
* @param {ol.Coordinate} coordinate Coordinate.
@@ -35,8 +34,7 @@ ol.geom.flat.contains.linearRingContainsExtent =
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
ol.geom.flat.contains.linearRingContainsXY =
function(flatCoordinates, offset, end, stride, x, y) {
ol.geom.flat.contains.linearRingContainsXY = function(flatCoordinates, offset, end, stride, x, y) {
// http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
var contains = false;
var x1 = flatCoordinates[end - stride];
@@ -65,8 +63,7 @@ ol.geom.flat.contains.linearRingContainsXY =
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
ol.geom.flat.contains.linearRingsContainsXY =
function(flatCoordinates, offset, ends, stride, x, y) {
ol.geom.flat.contains.linearRingsContainsXY = function(flatCoordinates, offset, ends, stride, x, y) {
goog.asserts.assert(ends.length > 0, 'ends should not be an empty array');
if (ends.length === 0) {
return false;
@@ -95,8 +92,7 @@ ol.geom.flat.contains.linearRingsContainsXY =
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
ol.geom.flat.contains.linearRingssContainsXY =
function(flatCoordinates, offset, endss, stride, x, y) {
ol.geom.flat.contains.linearRingssContainsXY = function(flatCoordinates, offset, endss, stride, x, y) {
goog.asserts.assert(endss.length > 0, 'endss should not be an empty array');
if (endss.length === 0) {
return false;

View File

@@ -10,8 +10,7 @@ goog.require('goog.asserts');
* @param {number} stride Stride.
* @return {number} offset Offset.
*/
ol.geom.flat.deflate.coordinate =
function(flatCoordinates, offset, coordinate, stride) {
ol.geom.flat.deflate.coordinate = function(flatCoordinates, offset, coordinate, stride) {
goog.asserts.assert(coordinate.length == stride,
'length of the coordinate array should match stride');
var i, ii;
@@ -29,8 +28,7 @@ ol.geom.flat.deflate.coordinate =
* @param {number} stride Stride.
* @return {number} offset Offset.
*/
ol.geom.flat.deflate.coordinates =
function(flatCoordinates, offset, coordinates, stride) {
ol.geom.flat.deflate.coordinates = function(flatCoordinates, offset, coordinates, stride) {
var i, ii;
for (i = 0, ii = coordinates.length; i < ii; ++i) {
var coordinate = coordinates[i];
@@ -53,8 +51,7 @@ ol.geom.flat.deflate.coordinates =
* @param {Array.<number>=} opt_ends Ends.
* @return {Array.<number>} Ends.
*/
ol.geom.flat.deflate.coordinatess =
function(flatCoordinates, offset, coordinatess, stride, opt_ends) {
ol.geom.flat.deflate.coordinatess = function(flatCoordinates, offset, coordinatess, stride, opt_ends) {
var ends = opt_ends ? opt_ends : [];
var i = 0;
var j, jj;
@@ -77,8 +74,7 @@ ol.geom.flat.deflate.coordinatess =
* @param {Array.<Array.<number>>=} opt_endss Endss.
* @return {Array.<Array.<number>>} Endss.
*/
ol.geom.flat.deflate.coordinatesss =
function(flatCoordinates, offset, coordinatesss, stride, opt_endss) {
ol.geom.flat.deflate.coordinatesss = function(flatCoordinates, offset, coordinatesss, stride, opt_endss) {
var endss = opt_endss ? opt_endss : [];
var i = 0;
var j, jj;

View File

@@ -12,8 +12,7 @@ goog.require('goog.asserts');
* @param {number=} opt_destOffset Destination offset.
* @return {Array.<number>} Flat coordinates.
*/
ol.geom.flat.flip.flipXY =
function(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {
ol.geom.flat.flip.flipXY = function(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {
var dest, destOffset;
if (opt_dest !== undefined) {
dest = opt_dest;
@@ -24,12 +23,12 @@ ol.geom.flat.flip.flipXY =
dest = [];
destOffset = 0;
}
var j, k;
for (j = offset; j < end; ) {
var j = offset;
while (j < end) {
var x = flatCoordinates[j++];
dest[destOffset++] = flatCoordinates[j++];
dest[destOffset++] = x;
for (k = 2; k < stride; ++k) {
for (var k = 2; k < stride; ++k) {
dest[destOffset++] = flatCoordinates[j++];
}
}

View File

@@ -14,8 +14,7 @@ goog.require('ol.proj');
* @param {number} squaredTolerance Squared tolerance.
* @return {Array.<number>} Flat coordinates.
*/
ol.geom.flat.geodesic.line_ =
function(interpolate, transform, squaredTolerance) {
ol.geom.flat.geodesic.line_ = function(interpolate, transform, squaredTolerance) {
// FIXME reduce garbage generation
// FIXME optimize stack operations
@@ -141,8 +140,7 @@ ol.geom.flat.geodesic.greatCircleArc = function(
* @param {number} squaredTolerance Squared tolerance.
* @return {Array.<number>} Flat coordinates.
*/
ol.geom.flat.geodesic.meridian =
function(lon, lat1, lat2, projection, squaredTolerance) {
ol.geom.flat.geodesic.meridian = function(lon, lat1, lat2, projection, squaredTolerance) {
var epsg4326Projection = ol.proj.get('EPSG:4326');
return ol.geom.flat.geodesic.line_(
/**
@@ -165,8 +163,7 @@ ol.geom.flat.geodesic.meridian =
* @param {number} squaredTolerance Squared tolerance.
* @return {Array.<number>} Flat coordinates.
*/
ol.geom.flat.geodesic.parallel =
function(lat, lon1, lon2, projection, squaredTolerance) {
ol.geom.flat.geodesic.parallel = function(lat, lon1, lon2, projection, squaredTolerance) {
var epsg4326Projection = ol.proj.get('EPSG:4326');
return ol.geom.flat.geodesic.line_(
/**

View File

@@ -9,8 +9,7 @@ goog.provide('ol.geom.flat.inflate');
* @param {Array.<ol.Coordinate>=} opt_coordinates Coordinates.
* @return {Array.<ol.Coordinate>} Coordinates.
*/
ol.geom.flat.inflate.coordinates =
function(flatCoordinates, offset, end, stride, opt_coordinates) {
ol.geom.flat.inflate.coordinates = function(flatCoordinates, offset, end, stride, opt_coordinates) {
var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];
var i = 0;
var j;
@@ -30,8 +29,7 @@ ol.geom.flat.inflate.coordinates =
* @param {Array.<Array.<ol.Coordinate>>=} opt_coordinatess Coordinatess.
* @return {Array.<Array.<ol.Coordinate>>} Coordinatess.
*/
ol.geom.flat.inflate.coordinatess =
function(flatCoordinates, offset, ends, stride, opt_coordinatess) {
ol.geom.flat.inflate.coordinatess = function(flatCoordinates, offset, ends, stride, opt_coordinatess) {
var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];
var i = 0;
var j, jj;
@@ -55,8 +53,7 @@ ol.geom.flat.inflate.coordinatess =
* Coordinatesss.
* @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinatesss.
*/
ol.geom.flat.inflate.coordinatesss =
function(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
ol.geom.flat.inflate.coordinatesss = function(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];
var i = 0;
var j, jj;

View File

@@ -78,8 +78,7 @@ ol.geom.flat.interiorpoint.linearRings = function(flatCoordinates, offset,
* @param {Array.<number>} flatCenters Flat centers.
* @return {Array.<number>} Interior points.
*/
ol.geom.flat.interiorpoint.linearRingss =
function(flatCoordinates, offset, endss, stride, flatCenters) {
ol.geom.flat.interiorpoint.linearRingss = function(flatCoordinates, offset, endss, stride, flatCenters) {
goog.asserts.assert(2 * endss.length == flatCenters.length,
'endss.length times 2 should be flatCenters.length');
var interiorPoints = [];

View File

@@ -14,8 +14,7 @@ goog.require('goog.math');
* @param {Array.<number>=} opt_dest Destination.
* @return {Array.<number>} Destination.
*/
ol.geom.flat.interpolate.lineString =
function(flatCoordinates, offset, end, stride, fraction, opt_dest) {
ol.geom.flat.interpolate.lineString = function(flatCoordinates, offset, end, stride, fraction, opt_dest) {
// FIXME interpolate extra dimensions
goog.asserts.assert(0 <= fraction && fraction <= 1,
'fraction should be in between 0 and 1');
@@ -80,8 +79,7 @@ ol.geom.flat.interpolate.lineString =
* @param {boolean} extrapolate Extrapolate.
* @return {ol.Coordinate} Coordinate.
*/
ol.geom.flat.lineStringCoordinateAtM =
function(flatCoordinates, offset, end, stride, m, extrapolate) {
ol.geom.flat.lineStringCoordinateAtM = function(flatCoordinates, offset, end, stride, m, extrapolate) {
if (end == offset) {
return null;
}

View File

@@ -14,8 +14,7 @@ goog.require('ol.geom.flat.segments');
* @param {ol.Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
ol.geom.flat.intersectsextent.lineString =
function(flatCoordinates, offset, end, stride, extent) {
ol.geom.flat.intersectsextent.lineString = function(flatCoordinates, offset, end, stride, extent) {
var coordinatesExtent = ol.extent.extendFlatCoordinates(
ol.extent.createEmpty(), flatCoordinates, offset, end, stride);
if (!ol.extent.intersects(extent, coordinatesExtent)) {
@@ -53,8 +52,7 @@ ol.geom.flat.intersectsextent.lineString =
* @param {ol.Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
ol.geom.flat.intersectsextent.lineStrings =
function(flatCoordinates, offset, ends, stride, extent) {
ol.geom.flat.intersectsextent.lineStrings = function(flatCoordinates, offset, ends, stride, extent) {
var i, ii;
for (i = 0, ii = ends.length; i < ii; ++i) {
if (ol.geom.flat.intersectsextent.lineString(
@@ -75,8 +73,7 @@ ol.geom.flat.intersectsextent.lineStrings =
* @param {ol.Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
ol.geom.flat.intersectsextent.linearRing =
function(flatCoordinates, offset, end, stride, extent) {
ol.geom.flat.intersectsextent.linearRing = function(flatCoordinates, offset, end, stride, extent) {
if (ol.geom.flat.intersectsextent.lineString(
flatCoordinates, offset, end, stride, extent)) {
return true;
@@ -109,8 +106,7 @@ ol.geom.flat.intersectsextent.linearRing =
* @param {ol.Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
ol.geom.flat.intersectsextent.linearRings =
function(flatCoordinates, offset, ends, stride, extent) {
ol.geom.flat.intersectsextent.linearRings = function(flatCoordinates, offset, ends, stride, extent) {
goog.asserts.assert(ends.length > 0, 'ends should not be an empty array');
if (!ol.geom.flat.intersectsextent.linearRing(
flatCoordinates, offset, ends[0], stride, extent)) {
@@ -138,8 +134,7 @@ ol.geom.flat.intersectsextent.linearRings =
* @param {ol.Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
ol.geom.flat.intersectsextent.linearRingss =
function(flatCoordinates, offset, endss, stride, extent) {
ol.geom.flat.intersectsextent.linearRingss = function(flatCoordinates, offset, endss, stride, extent) {
goog.asserts.assert(endss.length > 0, 'endss should not be an empty array');
var i, ii;
for (i = 0, ii = endss.length; i < ii; ++i) {

View File

@@ -8,8 +8,7 @@ goog.provide('ol.geom.flat.length');
* @param {number} stride Stride.
* @return {number} Length.
*/
ol.geom.flat.length.lineString =
function(flatCoordinates, offset, end, stride) {
ol.geom.flat.length.lineString = function(flatCoordinates, offset, end, stride) {
var x1 = flatCoordinates[offset];
var y1 = flatCoordinates[offset + 1];
var length = 0;
@@ -32,8 +31,7 @@ ol.geom.flat.length.lineString =
* @param {number} stride Stride.
* @return {number} Perimeter.
*/
ol.geom.flat.length.linearRing =
function(flatCoordinates, offset, end, stride) {
ol.geom.flat.length.linearRing = function(flatCoordinates, offset, end, stride) {
var perimeter =
ol.geom.flat.length.lineString(flatCoordinates, offset, end, stride);
var dx = flatCoordinates[end - stride] - flatCoordinates[offset];

View File

@@ -11,8 +11,7 @@ goog.require('ol.geom.flat.reverse');
* @param {number} stride Stride.
* @return {boolean} Is clockwise.
*/
ol.geom.flat.orient.linearRingIsClockwise =
function(flatCoordinates, offset, end, stride) {
ol.geom.flat.orient.linearRingIsClockwise = function(flatCoordinates, offset, end, stride) {
// http://tinyurl.com/clockwise-method
// https://github.com/OSGeo/gdal/blob/trunk/gdal/ogr/ogrlinearring.cpp
var edge = 0;
@@ -42,8 +41,7 @@ ol.geom.flat.orient.linearRingIsClockwise =
* (counter-clockwise exterior ring and clockwise interior rings).
* @return {boolean} Rings are correctly oriented.
*/
ol.geom.flat.orient.linearRingsAreOriented =
function(flatCoordinates, offset, ends, stride, opt_right) {
ol.geom.flat.orient.linearRingsAreOriented = function(flatCoordinates, offset, ends, stride, opt_right) {
var right = opt_right !== undefined ? opt_right : false;
var i, ii;
for (i = 0, ii = ends.length; i < ii; ++i) {
@@ -78,8 +76,7 @@ ol.geom.flat.orient.linearRingsAreOriented =
* (counter-clockwise exterior ring and clockwise interior rings).
* @return {boolean} Rings are correctly oriented.
*/
ol.geom.flat.orient.linearRingssAreOriented =
function(flatCoordinates, offset, endss, stride, opt_right) {
ol.geom.flat.orient.linearRingssAreOriented = function(flatCoordinates, offset, endss, stride, opt_right) {
var i, ii;
for (i = 0, ii = endss.length; i < ii; ++i) {
if (!ol.geom.flat.orient.linearRingsAreOriented(
@@ -104,8 +101,7 @@ ol.geom.flat.orient.linearRingssAreOriented =
* @param {boolean=} opt_right Follow the right-hand rule for orientation.
* @return {number} End.
*/
ol.geom.flat.orient.orientLinearRings =
function(flatCoordinates, offset, ends, stride, opt_right) {
ol.geom.flat.orient.orientLinearRings = function(flatCoordinates, offset, ends, stride, opt_right) {
var right = opt_right !== undefined ? opt_right : false;
var i, ii;
for (i = 0, ii = ends.length; i < ii; ++i) {
@@ -137,8 +133,7 @@ ol.geom.flat.orient.orientLinearRings =
* @param {boolean=} opt_right Follow the right-hand rule for orientation.
* @return {number} End.
*/
ol.geom.flat.orient.orientLinearRingss =
function(flatCoordinates, offset, endss, stride, opt_right) {
ol.geom.flat.orient.orientLinearRingss = function(flatCoordinates, offset, endss, stride, opt_right) {
var i, ii;
for (i = 0, ii = endss.length; i < ii; ++i) {
offset = ol.geom.flat.orient.orientLinearRings(

View File

@@ -7,8 +7,7 @@ goog.provide('ol.geom.flat.reverse');
* @param {number} end End.
* @param {number} stride Stride.
*/
ol.geom.flat.reverse.coordinates =
function(flatCoordinates, offset, end, stride) {
ol.geom.flat.reverse.coordinates = function(flatCoordinates, offset, end, stride) {
while (offset < end - stride) {
var i;
for (i = 0; i < stride; ++i) {

View File

@@ -16,8 +16,7 @@ goog.provide('ol.geom.flat.segments');
* @return {T|boolean} Value.
* @template T,S
*/
ol.geom.flat.segments.forEach =
function(flatCoordinates, offset, end, stride, callback, opt_this) {
ol.geom.flat.segments.forEach = function(flatCoordinates, offset, end, stride, callback, opt_this) {
var point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];
var point2 = [];
var ret;

View File

@@ -12,8 +12,7 @@ goog.require('goog.vec.Mat4');
* @param {Array.<number>=} opt_dest Destination.
* @return {Array.<number>} Transformed coordinates.
*/
ol.geom.flat.transform.transform2D =
function(flatCoordinates, offset, end, stride, transform, opt_dest) {
ol.geom.flat.transform.transform2D = function(flatCoordinates, offset, end, stride, transform, opt_dest) {
var m00 = goog.vec.Mat4.getElement(transform, 0, 0);
var m10 = goog.vec.Mat4.getElement(transform, 1, 0);
var m01 = goog.vec.Mat4.getElement(transform, 0, 1);
@@ -46,8 +45,7 @@ ol.geom.flat.transform.transform2D =
* @param {Array.<number>=} opt_dest Destination.
* @return {Array.<number>} Transformed coordinates.
*/
ol.geom.flat.transform.translate =
function(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {
ol.geom.flat.transform.translate = function(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {
var dest = opt_dest ? opt_dest : [];
var i = 0;
var j, k;

View File

@@ -45,7 +45,6 @@ ol.geom.GeometryLayout = {
};
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not

View File

@@ -8,7 +8,6 @@ goog.require('ol.geom.Geometry');
goog.require('ol.geom.GeometryType');
/**
* @classdesc
* An array of {@link ol.geom.Geometry} objects.
@@ -95,8 +94,7 @@ ol.geom.GeometryCollection.prototype.clone = function() {
/**
* @inheritDoc
*/
ol.geom.GeometryCollection.prototype.closestPointXY =
function(x, y, closestPoint, minSquaredDistance) {
ol.geom.GeometryCollection.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance <
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
@@ -160,8 +158,7 @@ ol.geom.GeometryCollection.prototype.getGeometriesArray = function() {
/**
* @inheritDoc
*/
ol.geom.GeometryCollection.prototype.getSimplifiedGeometry =
function(squaredTolerance) {
ol.geom.GeometryCollection.prototype.getSimplifiedGeometry = function(squaredTolerance) {
if (this.simplifiedGeometryRevision != this.getRevision()) {
goog.object.clear(this.simplifiedGeometryCache);
this.simplifiedGeometryMaxMinSquaredTolerance = 0;

View File

@@ -11,7 +11,6 @@ goog.require('ol.geom.flat.inflate');
goog.require('ol.geom.flat.simplify');
/**
* @classdesc
* Linear ring geometry. Only used as part of polygon; cannot be rendered
@@ -60,8 +59,7 @@ ol.geom.LinearRing.prototype.clone = function() {
/**
* @inheritDoc
*/
ol.geom.LinearRing.prototype.closestPointXY =
function(x, y, closestPoint, minSquaredDistance) {
ol.geom.LinearRing.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance <
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
@@ -102,8 +100,7 @@ ol.geom.LinearRing.prototype.getCoordinates = function() {
/**
* @inheritDoc
*/
ol.geom.LinearRing.prototype.getSimplifiedGeometryInternal =
function(squaredTolerance) {
ol.geom.LinearRing.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
var simplifiedFlatCoordinates = [];
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeucker(
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
@@ -130,8 +127,7 @@ ol.geom.LinearRing.prototype.getType = function() {
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api stable
*/
ol.geom.LinearRing.prototype.setCoordinates =
function(coordinates, opt_layout) {
ol.geom.LinearRing.prototype.setCoordinates = function(coordinates, opt_layout) {
if (!coordinates) {
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
} else {
@@ -150,8 +146,7 @@ ol.geom.LinearRing.prototype.setCoordinates =
* @param {ol.geom.GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates.
*/
ol.geom.LinearRing.prototype.setFlatCoordinates =
function(layout, flatCoordinates) {
ol.geom.LinearRing.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
this.setFlatCoordinatesInternal(layout, flatCoordinates);
this.changed();
};

View File

@@ -17,7 +17,6 @@ goog.require('ol.geom.flat.segments');
goog.require('ol.geom.flat.simplify');
/**
* @classdesc
* Linestring geometry.
@@ -94,8 +93,7 @@ ol.geom.LineString.prototype.clone = function() {
/**
* @inheritDoc
*/
ol.geom.LineString.prototype.closestPointXY =
function(x, y, closestPoint, minSquaredDistance) {
ol.geom.LineString.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance <
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
@@ -209,8 +207,7 @@ ol.geom.LineString.prototype.getFlatMidpoint = function() {
/**
* @inheritDoc
*/
ol.geom.LineString.prototype.getSimplifiedGeometryInternal =
function(squaredTolerance) {
ol.geom.LineString.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
var simplifiedFlatCoordinates = [];
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeucker(
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
@@ -248,8 +245,7 @@ ol.geom.LineString.prototype.intersectsExtent = function(extent) {
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api stable
*/
ol.geom.LineString.prototype.setCoordinates =
function(coordinates, opt_layout) {
ol.geom.LineString.prototype.setCoordinates = function(coordinates, opt_layout) {
if (!coordinates) {
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
} else {
@@ -268,8 +264,7 @@ ol.geom.LineString.prototype.setCoordinates =
* @param {ol.geom.GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates.
*/
ol.geom.LineString.prototype.setFlatCoordinates =
function(layout, flatCoordinates) {
ol.geom.LineString.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
this.setFlatCoordinatesInternal(layout, flatCoordinates);
this.changed();
};

View File

@@ -16,7 +16,6 @@ goog.require('ol.geom.flat.intersectsextent');
goog.require('ol.geom.flat.simplify');
/**
* @classdesc
* Multi-linestring geometry.
@@ -90,8 +89,7 @@ ol.geom.MultiLineString.prototype.clone = function() {
/**
* @inheritDoc
*/
ol.geom.MultiLineString.prototype.closestPointXY =
function(x, y, closestPoint, minSquaredDistance) {
ol.geom.MultiLineString.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance <
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
@@ -129,8 +127,7 @@ ol.geom.MultiLineString.prototype.closestPointXY =
* @return {ol.Coordinate} Coordinate.
* @api stable
*/
ol.geom.MultiLineString.prototype.getCoordinateAtM =
function(m, opt_extrapolate, opt_interpolate) {
ol.geom.MultiLineString.prototype.getCoordinateAtM = function(m, opt_extrapolate, opt_interpolate) {
if ((this.layout != ol.geom.GeometryLayout.XYM &&
this.layout != ol.geom.GeometryLayout.XYZM) ||
this.flatCoordinates.length === 0) {
@@ -229,8 +226,7 @@ ol.geom.MultiLineString.prototype.getFlatMidpoints = function() {
/**
* @inheritDoc
*/
ol.geom.MultiLineString.prototype.getSimplifiedGeometryInternal =
function(squaredTolerance) {
ol.geom.MultiLineString.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
var simplifiedFlatCoordinates = [];
var simplifiedEnds = [];
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeuckers(
@@ -268,8 +264,7 @@ ol.geom.MultiLineString.prototype.intersectsExtent = function(extent) {
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api stable
*/
ol.geom.MultiLineString.prototype.setCoordinates =
function(coordinates, opt_layout) {
ol.geom.MultiLineString.prototype.setCoordinates = function(coordinates, opt_layout) {
if (!coordinates) {
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.ends_);
} else {
@@ -290,8 +285,7 @@ ol.geom.MultiLineString.prototype.setCoordinates =
* @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {Array.<number>} ends Ends.
*/
ol.geom.MultiLineString.prototype.setFlatCoordinates =
function(layout, flatCoordinates, ends) {
ol.geom.MultiLineString.prototype.setFlatCoordinates = function(layout, flatCoordinates, ends) {
if (!flatCoordinates) {
goog.asserts.assert(ends && ends.length === 0,
'ends must be truthy and ends.length should be 0');

View File

@@ -12,7 +12,6 @@ goog.require('ol.geom.flat.inflate');
goog.require('ol.math');
/**
* @classdesc
* Multi-point geometry.
@@ -62,8 +61,7 @@ ol.geom.MultiPoint.prototype.clone = function() {
/**
* @inheritDoc
*/
ol.geom.MultiPoint.prototype.closestPointXY =
function(x, y, closestPoint, minSquaredDistance) {
ol.geom.MultiPoint.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance <
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
@@ -173,8 +171,7 @@ ol.geom.MultiPoint.prototype.intersectsExtent = function(extent) {
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api stable
*/
ol.geom.MultiPoint.prototype.setCoordinates =
function(coordinates, opt_layout) {
ol.geom.MultiPoint.prototype.setCoordinates = function(coordinates, opt_layout) {
if (!coordinates) {
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
} else {
@@ -193,8 +190,7 @@ ol.geom.MultiPoint.prototype.setCoordinates =
* @param {ol.geom.GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates.
*/
ol.geom.MultiPoint.prototype.setFlatCoordinates =
function(layout, flatCoordinates) {
ol.geom.MultiPoint.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
this.setFlatCoordinatesInternal(layout, flatCoordinates);
this.changed();
};

View File

@@ -22,7 +22,6 @@ goog.require('ol.geom.flat.orient');
goog.require('ol.geom.flat.simplify');
/**
* @classdesc
* Multi-polygon geometry.
@@ -131,8 +130,7 @@ ol.geom.MultiPolygon.prototype.clone = function() {
/**
* @inheritDoc
*/
ol.geom.MultiPolygon.prototype.closestPointXY =
function(x, y, closestPoint, minSquaredDistance) {
ol.geom.MultiPolygon.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance <
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
@@ -257,8 +255,7 @@ ol.geom.MultiPolygon.prototype.getOrientedFlatCoordinates = function() {
/**
* @inheritDoc
*/
ol.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal =
function(squaredTolerance) {
ol.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
var simplifiedFlatCoordinates = [];
var simplifiedEndss = [];
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.quantizess(
@@ -361,8 +358,7 @@ ol.geom.MultiPolygon.prototype.intersectsExtent = function(extent) {
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api stable
*/
ol.geom.MultiPolygon.prototype.setCoordinates =
function(coordinates, opt_layout) {
ol.geom.MultiPolygon.prototype.setCoordinates = function(coordinates, opt_layout) {
if (!coordinates) {
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.endss_);
} else {
@@ -389,8 +385,7 @@ ol.geom.MultiPolygon.prototype.setCoordinates =
* @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {Array.<Array.<number>>} endss Endss.
*/
ol.geom.MultiPolygon.prototype.setFlatCoordinates =
function(layout, flatCoordinates, endss) {
ol.geom.MultiPolygon.prototype.setFlatCoordinates = function(layout, flatCoordinates, endss) {
goog.asserts.assert(endss, 'endss must be truthy');
if (!flatCoordinates || flatCoordinates.length === 0) {
goog.asserts.assert(endss.length === 0, 'the length of endss should be 0');

View File

@@ -8,7 +8,6 @@ goog.require('ol.geom.flat.deflate');
goog.require('ol.math');
/**
* @classdesc
* Point geometry.
@@ -41,8 +40,7 @@ ol.geom.Point.prototype.clone = function() {
/**
* @inheritDoc
*/
ol.geom.Point.prototype.closestPointXY =
function(x, y, closestPoint, minSquaredDistance) {
ol.geom.Point.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
var flatCoordinates = this.flatCoordinates;
var squaredDistance = ol.math.squaredDistance(
x, y, flatCoordinates[0], flatCoordinates[1]);

View File

@@ -21,7 +21,6 @@ goog.require('ol.geom.flat.orient');
goog.require('ol.geom.flat.simplify');
/**
* @classdesc
* Polygon geometry.
@@ -118,8 +117,7 @@ ol.geom.Polygon.prototype.clone = function() {
/**
* @inheritDoc
*/
ol.geom.Polygon.prototype.closestPointXY =
function(x, y, closestPoint, minSquaredDistance) {
ol.geom.Polygon.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance <
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
@@ -298,8 +296,7 @@ ol.geom.Polygon.prototype.getOrientedFlatCoordinates = function() {
/**
* @inheritDoc
*/
ol.geom.Polygon.prototype.getSimplifiedGeometryInternal =
function(squaredTolerance) {
ol.geom.Polygon.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
var simplifiedFlatCoordinates = [];
var simplifiedEnds = [];
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.quantizes(
@@ -359,8 +356,7 @@ ol.geom.Polygon.prototype.setCoordinates = function(coordinates, opt_layout) {
* @param {Array.<number>} flatCoordinates Flat coordinates.
* @param {Array.<number>} ends Ends.
*/
ol.geom.Polygon.prototype.setFlatCoordinates =
function(layout, flatCoordinates, ends) {
ol.geom.Polygon.prototype.setFlatCoordinates = function(layout, flatCoordinates, ends) {
if (!flatCoordinates) {
goog.asserts.assert(ends && ends.length === 0,
'ends must be an empty array');

View File

@@ -9,7 +9,6 @@ goog.require('ol.geom.GeometryLayout');
goog.require('ol.geom.flat.transform');
/**
* @classdesc
* Abstract base class; only used for creating subclasses; do not instantiate
@@ -145,8 +144,7 @@ ol.geom.SimpleGeometry.prototype.getLayout = function() {
/**
* @inheritDoc
*/
ol.geom.SimpleGeometry.prototype.getSimplifiedGeometry =
function(squaredTolerance) {
ol.geom.SimpleGeometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {
if (this.simplifiedGeometryRevision != this.getRevision()) {
goog.object.clear(this.simplifiedGeometryCache);
this.simplifiedGeometryMaxMinSquaredTolerance = 0;
@@ -188,8 +186,7 @@ ol.geom.SimpleGeometry.prototype.getSimplifiedGeometry =
* @return {ol.geom.SimpleGeometry} Simplified geometry.
* @protected
*/
ol.geom.SimpleGeometry.prototype.getSimplifiedGeometryInternal =
function(squaredTolerance) {
ol.geom.SimpleGeometry.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
return this;
};
@@ -207,8 +204,7 @@ ol.geom.SimpleGeometry.prototype.getStride = function() {
* @param {Array.<number>} flatCoordinates Flat coordinates.
* @protected
*/
ol.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal =
function(layout, flatCoordinates) {
ol.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal = function(layout, flatCoordinates) {
this.stride = ol.geom.SimpleGeometry.getStrideForLayout(layout);
this.layout = layout;
this.flatCoordinates = flatCoordinates;
@@ -228,8 +224,7 @@ ol.geom.SimpleGeometry.prototype.setCoordinates = goog.abstractMethod;
* @param {number} nesting Nesting.
* @protected
*/
ol.geom.SimpleGeometry.prototype.setLayout =
function(layout, coordinates, nesting) {
ol.geom.SimpleGeometry.prototype.setLayout = function(layout, coordinates, nesting) {
/** @type {number} */
var stride;
if (layout) {
@@ -287,8 +282,7 @@ ol.geom.SimpleGeometry.prototype.translate = function(deltaX, deltaY) {
* @param {Array.<number>=} opt_dest Destination.
* @return {Array.<number>} Transformed flat coordinates.
*/
ol.geom.transformSimpleGeometry2D =
function(simpleGeometry, transform, opt_dest) {
ol.geom.transformSimpleGeometry2D = function(simpleGeometry, transform, opt_dest) {
var flatCoordinates = simpleGeometry.getFlatCoordinates();
if (!flatCoordinates) {
return null;

View File

@@ -11,7 +11,6 @@ goog.require('ol.render.EventType');
goog.require('ol.style.Stroke');
/**
* Render a grid for a coordinate system on a map.
* @constructor
@@ -167,8 +166,7 @@ ol.Graticule.intervals_ = [90, 45, 30, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05,
* @return {number} Index.
* @private
*/
ol.Graticule.prototype.addMeridian_ =
function(lon, minLat, maxLat, squaredTolerance, extent, index) {
ol.Graticule.prototype.addMeridian_ = function(lon, minLat, maxLat, squaredTolerance, extent, index) {
var lineString = this.getMeridian_(lon, minLat, maxLat,
squaredTolerance, index);
if (ol.extent.intersects(lineString.getExtent(), extent)) {
@@ -188,8 +186,7 @@ ol.Graticule.prototype.addMeridian_ =
* @return {number} Index.
* @private
*/
ol.Graticule.prototype.addParallel_ =
function(lat, minLon, maxLon, squaredTolerance, extent, index) {
ol.Graticule.prototype.addParallel_ = function(lat, minLon, maxLon, squaredTolerance, extent, index) {
var lineString = this.getParallel_(lat, minLon, maxLon, squaredTolerance,
index);
if (ol.extent.intersects(lineString.getExtent(), extent)) {
@@ -206,8 +203,7 @@ ol.Graticule.prototype.addParallel_ =
* @param {number} squaredTolerance Squared tolerance.
* @private
*/
ol.Graticule.prototype.createGraticule_ =
function(extent, center, resolution, squaredTolerance) {
ol.Graticule.prototype.createGraticule_ = function(extent, center, resolution, squaredTolerance) {
var interval = this.getInterval_(resolution);
if (interval == -1) {

View File

@@ -133,7 +133,9 @@ ol.has.WEBGL;
(gl.getParameter(gl.MAX_TEXTURE_SIZE));
extensions = gl.getSupportedExtensions();
}
} catch (e) {}
} catch (e) {
// pass
}
}
ol.has.WEBGL = hasWebGL;
ol.WEBGL_EXTENSIONS = extensions;

View File

@@ -9,7 +9,6 @@ goog.require('ol.ImageState');
goog.require('ol.extent');
/**
* @constructor
* @extends {ol.ImageBase}

View File

@@ -19,7 +19,6 @@ ol.ImageState = {
};
/**
* @constructor
* @extends {goog.events.EventTarget}

View File

@@ -5,7 +5,6 @@ goog.require('ol.ImageBase');
goog.require('ol.ImageState');
/**
* @constructor
* @extends {ol.ImageBase}

View File

@@ -10,7 +10,6 @@ goog.require('ol.TileLoadFunctionType');
goog.require('ol.TileState');
/**
* @constructor
* @extends {ol.Tile}

View File

@@ -6,7 +6,6 @@ goog.require('ol.MapBrowserEvent.EventType');
goog.require('ol.interaction.Interaction');
/**
* @classdesc
* Allows the user to zoom by double-clicking on the map.

View File

@@ -14,7 +14,6 @@ goog.require('ol.interaction.Interaction');
goog.require('ol.proj');
/**
* @classdesc
* Handles input of vector data by drag and drop.
@@ -198,7 +197,6 @@ ol.interaction.DragAndDropEventType = {
};
/**
* @classdesc
* Events emitted by {@link ol.interaction.DragAndDrop} instances are instances
@@ -213,8 +211,7 @@ ol.interaction.DragAndDropEventType = {
* @param {Array.<ol.Feature>=} opt_features Features.
* @param {ol.proj.Projection=} opt_projection Projection.
*/
ol.interaction.DragAndDropEvent =
function(type, target, file, opt_features, opt_projection) {
ol.interaction.DragAndDropEvent = function(type, target, file, opt_features, opt_projection) {
goog.base(this, type, target);

View File

@@ -38,7 +38,6 @@ ol.DragBoxEventType = {
};
/**
* @classdesc
* Events emitted by {@link ol.interaction.DragBox} instances are instances of
@@ -83,7 +82,6 @@ goog.inherits(ol.DragBoxEvent, goog.events.Event);
ol.interaction.DragBoxEndConditionType;
/**
* @classdesc
* Allows the user to draw a vector box by clicking and dragging on the map,

View File

@@ -10,7 +10,6 @@ goog.require('ol.events.condition');
goog.require('ol.interaction.Pointer');
/**
* @classdesc
* Allows the user to pan the map by dragging the map.

View File

@@ -9,7 +9,6 @@ goog.require('ol.interaction.Interaction');
goog.require('ol.interaction.Pointer');
/**
* @classdesc
* Allows the user to zoom and rotate the map by clicking and dragging

View File

@@ -8,7 +8,6 @@ goog.require('ol.interaction.Interaction');
goog.require('ol.interaction.Pointer');
/**
* @classdesc
* Allows the user to rotate the map by clicking and dragging on the map,

View File

@@ -8,7 +8,6 @@ goog.require('ol.extent');
goog.require('ol.interaction.DragBox');
/**
* @classdesc
* Allows the user to zoom the map by clicking and dragging on the map,

View File

@@ -49,7 +49,6 @@ ol.interaction.DrawEventType = {
};
/**
* @classdesc
* Events emitted by {@link ol.interaction.Draw} instances are instances of
@@ -76,7 +75,6 @@ ol.interaction.DrawEvent = function(type, feature) {
goog.inherits(ol.interaction.DrawEvent, goog.events.Event);
/**
* @classdesc
* Interaction for drawing feature geometries.
@@ -166,8 +164,9 @@ ol.interaction.Draw = function(options) {
if (this.type_ === ol.geom.GeometryType.CIRCLE) {
/**
* @param {ol.Coordinate|Array.<ol.Coordinate>|Array.<Array.<ol.Coordinate>>} coordinates
* @param {ol.geom.SimpleGeometry=} opt_geometry
* @return {ol.geom.SimpleGeometry}
* The coordinates.
* @param {ol.geom.SimpleGeometry=} opt_geometry Optional geometry.
* @return {ol.geom.SimpleGeometry} A geometry.
*/
geometryFunction = function(coordinates, opt_geometry) {
var circle = opt_geometry ? opt_geometry :
@@ -191,8 +190,9 @@ ol.interaction.Draw = function(options) {
}
/**
* @param {ol.Coordinate|Array.<ol.Coordinate>|Array.<Array.<ol.Coordinate>>} coordinates
* @param {ol.geom.SimpleGeometry=} opt_geometry
* @return {ol.geom.SimpleGeometry}
* The coordinates.
* @param {ol.geom.SimpleGeometry=} opt_geometry Optional geometry.
* @return {ol.geom.SimpleGeometry} A geometry.
*/
geometryFunction = function(coordinates, opt_geometry) {
var geometry = opt_geometry;

View File

@@ -18,7 +18,6 @@ ol.interaction.InteractionProperty = {
};
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
@@ -131,8 +130,7 @@ ol.interaction.Interaction.pan = function(map, view, delta, opt_duration) {
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
* @param {number=} opt_duration Duration.
*/
ol.interaction.Interaction.rotate =
function(map, view, rotation, opt_anchor, opt_duration) {
ol.interaction.Interaction.rotate = function(map, view, rotation, opt_anchor, opt_duration) {
rotation = view.constrainRotation(rotation, 0);
ol.interaction.Interaction.rotateWithoutConstraints(
map, view, rotation, opt_anchor, opt_duration);
@@ -146,8 +144,7 @@ ol.interaction.Interaction.rotate =
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
* @param {number=} opt_duration Duration.
*/
ol.interaction.Interaction.rotateWithoutConstraints =
function(map, view, rotation, opt_anchor, opt_duration) {
ol.interaction.Interaction.rotateWithoutConstraints = function(map, view, rotation, opt_anchor, opt_duration) {
if (rotation !== undefined) {
var currentRotation = view.getRotation();
var currentCenter = view.getCenter();
@@ -186,8 +183,7 @@ ol.interaction.Interaction.rotateWithoutConstraints =
* will select the nearest resolution. If not defined 0 is
* assumed.
*/
ol.interaction.Interaction.zoom =
function(map, view, resolution, opt_anchor, opt_duration, opt_direction) {
ol.interaction.Interaction.zoom = function(map, view, resolution, opt_anchor, opt_duration, opt_direction) {
resolution = view.constrainResolution(resolution, 0, opt_direction);
ol.interaction.Interaction.zoomWithoutConstraints(
map, view, resolution, opt_anchor, opt_duration);
@@ -201,8 +197,7 @@ ol.interaction.Interaction.zoom =
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
* @param {number=} opt_duration Duration.
*/
ol.interaction.Interaction.zoomByDelta =
function(map, view, delta, opt_anchor, opt_duration) {
ol.interaction.Interaction.zoomByDelta = function(map, view, delta, opt_anchor, opt_duration) {
var currentResolution = view.getResolution();
var resolution = view.constrainResolution(currentResolution, delta, 0);
ol.interaction.Interaction.zoomWithoutConstraints(
@@ -217,8 +212,7 @@ ol.interaction.Interaction.zoomByDelta =
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
* @param {number=} opt_duration Duration.
*/
ol.interaction.Interaction.zoomWithoutConstraints =
function(map, view, resolution, opt_anchor, opt_duration) {
ol.interaction.Interaction.zoomWithoutConstraints = function(map, view, resolution, opt_anchor, opt_duration) {
if (resolution) {
var currentResolution = view.getResolution();
var currentCenter = view.getCenter();

View File

@@ -11,7 +11,6 @@ goog.require('ol.events.condition');
goog.require('ol.interaction.Interaction');
/**
* @classdesc
* Allows the user to pan the map using keyboard arrows.

View File

@@ -7,7 +7,6 @@ goog.require('ol.events.condition');
goog.require('ol.interaction.Interaction');
/**
* @classdesc
* Allows the user to zoom the map using keyboard + and -.

View File

@@ -49,7 +49,6 @@ ol.ModifyEventType = {
};
/**
* @classdesc
* Events emitted by {@link ol.interaction.Modify} instances are instances of
@@ -94,7 +93,6 @@ goog.inherits(ol.interaction.ModifyEvent, goog.events.Event);
ol.interaction.SegmentDataType;
/**
* @classdesc
* Interaction for modifying feature geometries.
@@ -359,8 +357,7 @@ ol.interaction.Modify.prototype.handleFeatureRemove_ = function(evt) {
* @param {ol.geom.Point} geometry Geometry.
* @private
*/
ol.interaction.Modify.prototype.writePointGeometry_ =
function(feature, geometry) {
ol.interaction.Modify.prototype.writePointGeometry_ = function(feature, geometry) {
var coordinates = geometry.getCoordinates();
var segmentData = /** @type {ol.interaction.SegmentDataType} */ ({
feature: feature,
@@ -376,8 +373,7 @@ ol.interaction.Modify.prototype.writePointGeometry_ =
* @param {ol.geom.MultiPoint} geometry Geometry.
* @private
*/
ol.interaction.Modify.prototype.writeMultiPointGeometry_ =
function(feature, geometry) {
ol.interaction.Modify.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
var points = geometry.getCoordinates();
var coordinates, i, ii, segmentData;
for (i = 0, ii = points.length; i < ii; ++i) {
@@ -399,8 +395,7 @@ ol.interaction.Modify.prototype.writeMultiPointGeometry_ =
* @param {ol.geom.LineString} geometry Geometry.
* @private
*/
ol.interaction.Modify.prototype.writeLineStringGeometry_ =
function(feature, geometry) {
ol.interaction.Modify.prototype.writeLineStringGeometry_ = function(feature, geometry) {
var coordinates = geometry.getCoordinates();
var i, ii, segment, segmentData;
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
@@ -421,8 +416,7 @@ ol.interaction.Modify.prototype.writeLineStringGeometry_ =
* @param {ol.geom.MultiLineString} geometry Geometry.
* @private
*/
ol.interaction.Modify.prototype.writeMultiLineStringGeometry_ =
function(feature, geometry) {
ol.interaction.Modify.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
var lines = geometry.getCoordinates();
var coordinates, i, ii, j, jj, segment, segmentData;
for (j = 0, jj = lines.length; j < jj; ++j) {
@@ -447,8 +441,7 @@ ol.interaction.Modify.prototype.writeMultiLineStringGeometry_ =
* @param {ol.geom.Polygon} geometry Geometry.
* @private
*/
ol.interaction.Modify.prototype.writePolygonGeometry_ =
function(feature, geometry) {
ol.interaction.Modify.prototype.writePolygonGeometry_ = function(feature, geometry) {
var rings = geometry.getCoordinates();
var coordinates, i, ii, j, jj, segment, segmentData;
for (j = 0, jj = rings.length; j < jj; ++j) {
@@ -473,8 +466,7 @@ ol.interaction.Modify.prototype.writePolygonGeometry_ =
* @param {ol.geom.MultiPolygon} geometry Geometry.
* @private
*/
ol.interaction.Modify.prototype.writeMultiPolygonGeometry_ =
function(feature, geometry) {
ol.interaction.Modify.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
var polygons = geometry.getCoordinates();
var coordinates, i, ii, j, jj, k, kk, rings, segment, segmentData;
for (k = 0, kk = polygons.length; k < kk; ++k) {
@@ -502,8 +494,7 @@ ol.interaction.Modify.prototype.writeMultiPolygonGeometry_ =
* @param {ol.geom.GeometryCollection} geometry Geometry.
* @private
*/
ol.interaction.Modify.prototype.writeGeometryCollectionGeometry_ =
function(feature, geometry) {
ol.interaction.Modify.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
var i, geometries = geometry.getGeometriesArray();
for (i = 0; i < geometries.length; ++i) {
this.SEGMENT_WRITERS_[geometries[i].getType()].call(
@@ -517,8 +508,7 @@ ol.interaction.Modify.prototype.writeGeometryCollectionGeometry_ =
* @return {ol.Feature} Vertex feature.
* @private
*/
ol.interaction.Modify.prototype.createOrUpdateVertexFeature_ =
function(coordinates) {
ol.interaction.Modify.prototype.createOrUpdateVertexFeature_ = function(coordinates) {
var vertexFeature = this.vertexFeature_;
if (!vertexFeature) {
vertexFeature = new ol.Feature(new ol.geom.Point(coordinates));
@@ -533,9 +523,9 @@ ol.interaction.Modify.prototype.createOrUpdateVertexFeature_ =
/**
* @param {ol.interaction.SegmentDataType} a
* @param {ol.interaction.SegmentDataType} b
* @return {number}
* @param {ol.interaction.SegmentDataType} a The first segment data.
* @param {ol.interaction.SegmentDataType} b The second segment data.
* @return {number} The difference in indexes.
* @private
*/
ol.interaction.Modify.compareIndexes_ = function(a, b) {
@@ -600,8 +590,8 @@ ol.interaction.Modify.handleDownEvent_ = function(evt) {
if (insertVertices.length) {
this.willModifyFeatures_(evt);
}
for (i = insertVertices.length - 1; i >= 0; --i) {
this.insertVertex_.apply(this, insertVertices[i]);
for (var j = insertVertices.length - 1; j >= 0; --j) {
this.insertVertex_.apply(this, insertVertices[j]);
}
}
return !!this.vertexFeature_;
@@ -656,6 +646,8 @@ ol.interaction.Modify.handleDragEvent_ = function(evt) {
coordinates[depth[1]][depth[0]][segmentData.index + index] = vertex;
segment[index] = vertex;
break;
default:
// pass
}
this.setGeometryCoordinates_(geometry, coordinates);
@@ -952,6 +944,8 @@ ol.interaction.Modify.prototype.removeVertex_ = function() {
}
}
break;
default:
// pass
}
if (deleted) {
@@ -986,8 +980,7 @@ ol.interaction.Modify.prototype.removeVertex_ = function() {
* @param {Array} coordinates Coordinates.
* @private
*/
ol.interaction.Modify.prototype.setGeometryCoordinates_ =
function(geometry, coordinates) {
ol.interaction.Modify.prototype.setGeometryCoordinates_ = function(geometry, coordinates) {
this.changingFeature_ = true;
geometry.setCoordinates(coordinates);
this.changingFeature_ = false;

View File

@@ -9,7 +9,6 @@ goog.require('ol.interaction.Interaction');
goog.require('ol.math');
/**
* @classdesc
* Allows the user to zoom the map by scrolling the mouse wheel.

View File

@@ -10,7 +10,6 @@ goog.require('ol.interaction.Interaction');
goog.require('ol.interaction.Pointer');
/**
* @classdesc
* Allows the user to rotate the map by twisting with two fingers

View File

@@ -10,7 +10,6 @@ goog.require('ol.interaction.Interaction');
goog.require('ol.interaction.Pointer');
/**
* @classdesc
* Allows the user to zoom the map by pinching with two fingers

View File

@@ -9,7 +9,6 @@ goog.require('ol.Pixel');
goog.require('ol.interaction.Interaction');
/**
* @classdesc
* Base class that calls user-defined functions on `down`, `move` and `up`
@@ -87,7 +86,7 @@ goog.inherits(ol.interaction.Pointer, ol.interaction.Interaction);
/**
* @param {Array.<ol.pointer.PointerEvent>} pointerEvents
* @param {Array.<ol.pointer.PointerEvent>} pointerEvents List of events.
* @return {ol.Pixel} Centroid pixel.
*/
ol.interaction.Pointer.centroid = function(pointerEvents) {
@@ -108,8 +107,7 @@ ol.interaction.Pointer.centroid = function(pointerEvents) {
* or pointerup event.
* @private
*/
ol.interaction.Pointer.prototype.isPointerDraggingEvent_ =
function(mapBrowserEvent) {
ol.interaction.Pointer.prototype.isPointerDraggingEvent_ = function(mapBrowserEvent) {
var type = mapBrowserEvent.type;
return (
type === ol.MapBrowserEvent.EventType.POINTERDOWN ||
@@ -122,8 +120,7 @@ ol.interaction.Pointer.prototype.isPointerDraggingEvent_ =
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
* @private
*/
ol.interaction.Pointer.prototype.updateTrackedPointers_ =
function(mapBrowserEvent) {
ol.interaction.Pointer.prototype.updateTrackedPointers_ = function(mapBrowserEvent) {
if (this.isPointerDraggingEvent_(mapBrowserEvent)) {
var event = mapBrowserEvent.pointerEvent;

View File

@@ -43,7 +43,6 @@ ol.interaction.SelectEventType = {
ol.interaction.SelectFilterFunction;
/**
* @classdesc
* Events emitted by {@link ol.interaction.Select} instances are instances of
@@ -58,8 +57,7 @@ ol.interaction.SelectFilterFunction;
* @extends {goog.events.Event}
* @constructor
*/
ol.interaction.SelectEvent =
function(type, selected, deselected, mapBrowserEvent) {
ol.interaction.SelectEvent = function(type, selected, deselected, mapBrowserEvent) {
goog.base(this, type);
/**
@@ -86,7 +84,6 @@ ol.interaction.SelectEvent =
goog.inherits(ol.interaction.SelectEvent, goog.events.Event);
/**
* @classdesc
* Interaction for selecting vector features. By default, selected features are
@@ -175,23 +172,21 @@ ol.interaction.Select = function(opt_options) {
var layerFilter;
if (options.layers) {
if (goog.isFunction(options.layers)) {
layerFilter =
/**
* @param {ol.layer.Layer} layer Layer.
* @return {boolean} Include.
*/
function(layer) {
/**
* @param {ol.layer.Layer} layer Layer.
* @return {boolean} Include.
*/
layerFilter = function(layer) {
goog.asserts.assertFunction(options.layers);
return layer === featureOverlay || options.layers(layer);
};
} else {
var layers = options.layers;
layerFilter =
/**
* @param {ol.layer.Layer} layer Layer.
* @return {boolean} Include.
*/
function(layer) {
/**
* @param {ol.layer.Layer} layer Layer.
* @return {boolean} Include.
*/
layerFilter = function(layer) {
return layer === featureOverlay || ol.array.includes(layers, layer);
};
}
@@ -228,8 +223,7 @@ goog.inherits(ol.interaction.Select, ol.interaction.Interaction);
* @param {ol.layer.Layer} layer Layer.
* @private
*/
ol.interaction.Select.prototype.addFeatureLayerAssociation_ =
function(feature, layer) {
ol.interaction.Select.prototype.addFeatureLayerAssociation_ = function(feature, layer) {
var key = goog.getUid(feature);
this.featureLayerAssociation_[key] = layer;
};
@@ -433,8 +427,7 @@ ol.interaction.Select.prototype.removeFeature_ = function(evt) {
* @param {ol.Feature|ol.render.Feature} feature Feature.
* @private
*/
ol.interaction.Select.prototype.removeFeatureLayerAssociation_ =
function(feature) {
ol.interaction.Select.prototype.removeFeatureLayerAssociation_ = function(feature) {
var key = goog.getUid(feature);
delete this.featureLayerAssociation_[key];
};

View File

@@ -23,7 +23,6 @@ goog.require('ol.source.VectorEventType');
goog.require('ol.structs.RBush');
/**
* @classdesc
* Handles snapping of vector features while modifying or drawing them. The
@@ -200,7 +199,7 @@ ol.interaction.Snap.prototype.forEachFeatureRemove_ = function(feature) {
/**
* @return {ol.Collection.<ol.Feature>|Array.<ol.Feature>}
* @return {ol.Collection.<ol.Feature>|Array.<ol.Feature>} Features.
* @private
*/
ol.interaction.Snap.prototype.getFeatures_ = function() {
@@ -416,8 +415,7 @@ ol.interaction.Snap.prototype.updateFeature_ = function(feature) {
* @param {ol.geom.GeometryCollection} geometry Geometry.
* @private
*/
ol.interaction.Snap.prototype.writeGeometryCollectionGeometry_ =
function(feature, geometry) {
ol.interaction.Snap.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
var i, geometries = geometry.getGeometriesArray();
for (i = 0; i < geometries.length; ++i) {
this.SEGMENT_WRITERS_[geometries[i].getType()].call(
@@ -431,8 +429,7 @@ ol.interaction.Snap.prototype.writeGeometryCollectionGeometry_ =
* @param {ol.geom.LineString} geometry Geometry.
* @private
*/
ol.interaction.Snap.prototype.writeLineStringGeometry_ =
function(feature, geometry) {
ol.interaction.Snap.prototype.writeLineStringGeometry_ = function(feature, geometry) {
var coordinates = geometry.getCoordinates();
var i, ii, segment, segmentData;
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
@@ -451,8 +448,7 @@ ol.interaction.Snap.prototype.writeLineStringGeometry_ =
* @param {ol.geom.MultiLineString} geometry Geometry.
* @private
*/
ol.interaction.Snap.prototype.writeMultiLineStringGeometry_ =
function(feature, geometry) {
ol.interaction.Snap.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
var lines = geometry.getCoordinates();
var coordinates, i, ii, j, jj, segment, segmentData;
for (j = 0, jj = lines.length; j < jj; ++j) {
@@ -474,8 +470,7 @@ ol.interaction.Snap.prototype.writeMultiLineStringGeometry_ =
* @param {ol.geom.MultiPoint} geometry Geometry.
* @private
*/
ol.interaction.Snap.prototype.writeMultiPointGeometry_ =
function(feature, geometry) {
ol.interaction.Snap.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
var points = geometry.getCoordinates();
var coordinates, i, ii, segmentData;
for (i = 0, ii = points.length; i < ii; ++i) {
@@ -494,8 +489,7 @@ ol.interaction.Snap.prototype.writeMultiPointGeometry_ =
* @param {ol.geom.MultiPolygon} geometry Geometry.
* @private
*/
ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ =
function(feature, geometry) {
ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
var polygons = geometry.getCoordinates();
var coordinates, i, ii, j, jj, k, kk, rings, segment, segmentData;
for (k = 0, kk = polygons.length; k < kk; ++k) {
@@ -520,8 +514,7 @@ ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ =
* @param {ol.geom.Point} geometry Geometry.
* @private
*/
ol.interaction.Snap.prototype.writePointGeometry_ =
function(feature, geometry) {
ol.interaction.Snap.prototype.writePointGeometry_ = function(feature, geometry) {
var coordinates = geometry.getCoordinates();
var segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({
feature: feature,
@@ -536,8 +529,7 @@ ol.interaction.Snap.prototype.writePointGeometry_ =
* @param {ol.geom.Polygon} geometry Geometry.
* @private
*/
ol.interaction.Snap.prototype.writePolygonGeometry_ =
function(feature, geometry) {
ol.interaction.Snap.prototype.writePolygonGeometry_ = function(feature, geometry) {
var rings = geometry.getCoordinates();
var coordinates, i, ii, j, jj, segment, segmentData;
for (j = 0, jj = rings.length; j < jj; ++j) {
@@ -608,9 +600,9 @@ ol.interaction.Snap.handleUpEvent_ = function(evt) {
/**
* Sort segments by distance, helper function
* @param {ol.interaction.Snap.SegmentDataType} a
* @param {ol.interaction.Snap.SegmentDataType} b
* @return {number}
* @param {ol.interaction.Snap.SegmentDataType} a The first segment data.
* @param {ol.interaction.Snap.SegmentDataType} b The second segment data.
* @return {number} The difference in distance.
* @this {ol.interaction.Snap}
*/
ol.interaction.Snap.sortByDistance = function(a, b) {

View File

@@ -32,7 +32,6 @@ ol.interaction.TranslateEventType = {
};
/**
* @classdesc
* Events emitted by {@link ol.interaction.Translate} instances are instances of
@@ -67,7 +66,6 @@ ol.interaction.TranslateEvent = function(type, features, coordinate) {
goog.inherits(ol.interaction.TranslateEvent, goog.events.Event);
/**
* @classdesc
* Interaction for translating (moving) features.
@@ -195,8 +193,7 @@ ol.interaction.Translate.handleDragEvent_ = function(event) {
* @this {ol.interaction.Translate}
* @private
*/
ol.interaction.Translate.handleMoveEvent_ = function(event)
{
ol.interaction.Translate.handleMoveEvent_ = function(event) {
var elem = event.map.getTargetElement();
var intersectingFeature = event.map.forEachFeatureAtPixel(event.pixel,
function(feature) {

View File

@@ -5,7 +5,6 @@ goog.require('ol.PreRenderFunction');
goog.require('ol.animation');
/**
* @classdesc
* Implementation of inertial deceleration for map movement.

View File

@@ -23,7 +23,6 @@ ol.layer.HeatmapLayerProperty = {
};
/**
* @classdesc
* Layer for rendering vector data as a heatmap.
@@ -145,8 +144,8 @@ ol.layer.Heatmap.DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
/**
* @param {Array.<string>} colors
* @return {Uint8ClampedArray}
* @param {Array.<string>} colors A list of colored.
* @return {Uint8ClampedArray} An array.
* @private
*/
ol.layer.Heatmap.createGradient_ = function(colors) {
@@ -168,7 +167,7 @@ ol.layer.Heatmap.createGradient_ = function(colors) {
/**
* @return {string}
* @return {string} Data URL for a circle.
* @private
*/
ol.layer.Heatmap.prototype.createCircle_ = function() {

View File

@@ -3,7 +3,6 @@ goog.provide('ol.layer.Image');
goog.require('ol.layer.Layer');
/**
* @classdesc
* Server-rendered images that are available for arbitrary extents and

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