Remove use of goog.array.map

This commit is contained in:
Frederic Junod
2015-09-23 17:20:39 +02:00
parent 4e7f558234
commit 9e2a393426
16 changed files with 75 additions and 91 deletions

View File

@@ -3,7 +3,6 @@
goog.provide('ol.format.GeoJSON');
goog.require('goog.array');
goog.require('goog.asserts');
goog.require('goog.object');
goog.require('ol.Feature');
@@ -90,7 +89,7 @@ ol.format.GeoJSON.readGeometryCollectionGeometry_ = function(
object, opt_options) {
goog.asserts.assert(object.type == 'GeometryCollection',
'object.type should be GeometryCollection');
var geometries = goog.array.map(object.geometries,
var geometries = object.geometries.map(
/**
* @param {GeoJSONGeometry} geometry Geometry.
* @return {ol.geom.Geometry} geometry Geometry.
@@ -212,10 +211,9 @@ ol.format.GeoJSON.writeGeometryCollectionGeometry_ = function(
geometry, opt_options) {
goog.asserts.assertInstanceof(geometry, ol.geom.GeometryCollection,
'geometry should be an ol.geom.GeometryCollection');
var geometries = goog.array.map(
geometry.getGeometriesArray(), function(geometry) {
return ol.format.GeoJSON.writeGeometry_(geometry, opt_options);
});
var geometries = geometry.getGeometriesArray().map(function(geometry) {
return ol.format.GeoJSON.writeGeometry_(geometry, opt_options);
});
return /** @type {GeoJSONGeometryCollection} */ ({
type: 'GeometryCollection',
geometries: geometries