Improve code and apidoc formating

This commit is contained in:
Frederic Junod
2014-02-27 10:20:56 +01:00
parent c6df670a55
commit 6ad63b113d
+5 -3
View File
@@ -28,8 +28,7 @@ goog.inherits(ol.format.Polyline, ol.format.Text);
* @param {number=} opt_dimension The dimension of the coordinates in the array. * @param {number=} opt_dimension The dimension of the coordinates in the array.
* @return {string} The encoded string. * @return {string} The encoded string.
*/ */
ol.format.Polyline.encodeFlatCoordinates = ol.format.Polyline.encodeFlatCoordinates = function(flatPoints, opt_dimension) {
function(flatPoints, opt_dimension) {
var dimension = goog.isDef(opt_dimension) ? opt_dimension : 2; var dimension = goog.isDef(opt_dimension) ? opt_dimension : 2;
return ol.format.Polyline.encodeDeltas(flatPoints, dimension); return ol.format.Polyline.encodeDeltas(flatPoints, dimension);
}; };
@@ -58,6 +57,7 @@ ol.format.Polyline.decodeFlatCoordinates = function(encoded, opt_dimension) {
* @param {number} dimension The dimension of the points in the list. * @param {number} dimension The dimension of the points in the list.
* @param {number=} opt_factor The factor by which the numbers will be * @param {number=} opt_factor The factor by which the numbers will be
* multiplied. The remaining decimal places will get rounded away. * multiplied. The remaining decimal places will get rounded away.
* Default is `1e5`.
* @return {string} The encoded string. * @return {string} The encoded string.
*/ */
ol.format.Polyline.encodeDeltas = function(numbers, dimension, opt_factor) { ol.format.Polyline.encodeDeltas = function(numbers, dimension, opt_factor) {
@@ -90,7 +90,7 @@ ol.format.Polyline.encodeDeltas = function(numbers, dimension, opt_factor) {
* @param {string} encoded An encoded string. * @param {string} encoded An encoded string.
* @param {number} dimension The dimension of the points in the encoded string. * @param {number} dimension The dimension of the points in the encoded string.
* @param {number=} opt_factor The factor by which the resulting numbers will * @param {number=} opt_factor The factor by which the resulting numbers will
* be divided. * be divided. Default is `1e5`.
* @return {Array.<number>} A list of n-dimensional points. * @return {Array.<number>} A list of n-dimensional points.
*/ */
ol.format.Polyline.decodeDeltas = function(encoded, dimension, opt_factor) { ol.format.Polyline.decodeDeltas = function(encoded, dimension, opt_factor) {
@@ -126,6 +126,7 @@ ol.format.Polyline.decodeDeltas = function(encoded, dimension, opt_factor) {
* @param {Array.<number>} numbers A list of floating point numbers. * @param {Array.<number>} numbers A list of floating point numbers.
* @param {number=} opt_factor The factor by which the numbers will be * @param {number=} opt_factor The factor by which the numbers will be
* multiplied. The remaining decimal places will get rounded away. * multiplied. The remaining decimal places will get rounded away.
* Default is `1e5`.
* @return {string} The encoded string. * @return {string} The encoded string.
*/ */
ol.format.Polyline.encodeFloats = function(numbers, opt_factor) { ol.format.Polyline.encodeFloats = function(numbers, opt_factor) {
@@ -145,6 +146,7 @@ ol.format.Polyline.encodeFloats = function(numbers, opt_factor) {
* *
* @param {string} encoded An encoded string. * @param {string} encoded An encoded string.
* @param {number=} opt_factor The factor by which the result will be divided. * @param {number=} opt_factor The factor by which the result will be divided.
* Default is `1e5`.
* @return {Array.<number>} A list of floating point numbers. * @return {Array.<number>} A list of floating point numbers.
*/ */
ol.format.Polyline.decodeFloats = function(encoded, opt_factor) { ol.format.Polyline.decodeFloats = function(encoded, opt_factor) {