Remove unnecessary quotes around object keys
This commit is contained in:
@@ -198,8 +198,8 @@ ol.format.GeoJSON.writeGeometry_ = function(geometry, opt_options) {
|
|||||||
*/
|
*/
|
||||||
ol.format.GeoJSON.writeEmptyGeometryCollectionGeometry_ = function(geometry) {
|
ol.format.GeoJSON.writeEmptyGeometryCollectionGeometry_ = function(geometry) {
|
||||||
return /** @type {GeoJSONGeometryCollection} */ ({
|
return /** @type {GeoJSONGeometryCollection} */ ({
|
||||||
'type': 'GeometryCollection',
|
type: 'GeometryCollection',
|
||||||
'geometries': []
|
geometries: []
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -219,8 +219,8 @@ ol.format.GeoJSON.writeGeometryCollectionGeometry_ = function(
|
|||||||
return ol.format.GeoJSON.writeGeometry_(geometry, opt_options);
|
return ol.format.GeoJSON.writeGeometry_(geometry, opt_options);
|
||||||
});
|
});
|
||||||
return /** @type {GeoJSONGeometryCollection} */ ({
|
return /** @type {GeoJSONGeometryCollection} */ ({
|
||||||
'type': 'GeometryCollection',
|
type: 'GeometryCollection',
|
||||||
'geometries': geometries
|
geometries: geometries
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -235,8 +235,8 @@ ol.format.GeoJSON.writeLineStringGeometry_ = function(geometry, opt_options) {
|
|||||||
goog.asserts.assertInstanceof(geometry, ol.geom.LineString,
|
goog.asserts.assertInstanceof(geometry, ol.geom.LineString,
|
||||||
'geometry should be an ol.geom.LineString');
|
'geometry should be an ol.geom.LineString');
|
||||||
return /** @type {GeoJSONGeometry} */ ({
|
return /** @type {GeoJSONGeometry} */ ({
|
||||||
'type': 'LineString',
|
type: 'LineString',
|
||||||
'coordinates': geometry.getCoordinates()
|
coordinates: geometry.getCoordinates()
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -252,8 +252,8 @@ ol.format.GeoJSON.writeMultiLineStringGeometry_ =
|
|||||||
goog.asserts.assertInstanceof(geometry, ol.geom.MultiLineString,
|
goog.asserts.assertInstanceof(geometry, ol.geom.MultiLineString,
|
||||||
'geometry should be an ol.geom.MultiLineString');
|
'geometry should be an ol.geom.MultiLineString');
|
||||||
return /** @type {GeoJSONGeometry} */ ({
|
return /** @type {GeoJSONGeometry} */ ({
|
||||||
'type': 'MultiLineString',
|
type: 'MultiLineString',
|
||||||
'coordinates': geometry.getCoordinates()
|
coordinates: geometry.getCoordinates()
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -268,8 +268,8 @@ ol.format.GeoJSON.writeMultiPointGeometry_ = function(geometry, opt_options) {
|
|||||||
goog.asserts.assertInstanceof(geometry, ol.geom.MultiPoint,
|
goog.asserts.assertInstanceof(geometry, ol.geom.MultiPoint,
|
||||||
'geometry should be an ol.geom.MultiPoint');
|
'geometry should be an ol.geom.MultiPoint');
|
||||||
return /** @type {GeoJSONGeometry} */ ({
|
return /** @type {GeoJSONGeometry} */ ({
|
||||||
'type': 'MultiPoint',
|
type: 'MultiPoint',
|
||||||
'coordinates': geometry.getCoordinates()
|
coordinates: geometry.getCoordinates()
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -288,8 +288,8 @@ ol.format.GeoJSON.writeMultiPolygonGeometry_ = function(geometry, opt_options) {
|
|||||||
right = opt_options.rightHanded;
|
right = opt_options.rightHanded;
|
||||||
}
|
}
|
||||||
return /** @type {GeoJSONGeometry} */ ({
|
return /** @type {GeoJSONGeometry} */ ({
|
||||||
'type': 'MultiPolygon',
|
type: 'MultiPolygon',
|
||||||
'coordinates': geometry.getCoordinates(right)
|
coordinates: geometry.getCoordinates(right)
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -304,8 +304,8 @@ ol.format.GeoJSON.writePointGeometry_ = function(geometry, opt_options) {
|
|||||||
goog.asserts.assertInstanceof(geometry, ol.geom.Point,
|
goog.asserts.assertInstanceof(geometry, ol.geom.Point,
|
||||||
'geometry should be an ol.geom.Point');
|
'geometry should be an ol.geom.Point');
|
||||||
return /** @type {GeoJSONGeometry} */ ({
|
return /** @type {GeoJSONGeometry} */ ({
|
||||||
'type': 'Point',
|
type: 'Point',
|
||||||
'coordinates': geometry.getCoordinates()
|
coordinates: geometry.getCoordinates()
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -324,8 +324,8 @@ ol.format.GeoJSON.writePolygonGeometry_ = function(geometry, opt_options) {
|
|||||||
right = opt_options.rightHanded;
|
right = opt_options.rightHanded;
|
||||||
}
|
}
|
||||||
return /** @type {GeoJSONGeometry} */ ({
|
return /** @type {GeoJSONGeometry} */ ({
|
||||||
'type': 'Polygon',
|
type: 'Polygon',
|
||||||
'coordinates': geometry.getCoordinates(right)
|
coordinates: geometry.getCoordinates(right)
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -584,8 +584,8 @@ ol.format.GeoJSON.prototype.writeFeaturesObject =
|
|||||||
objects.push(this.writeFeatureObject(features[i], opt_options));
|
objects.push(this.writeFeatureObject(features[i], opt_options));
|
||||||
}
|
}
|
||||||
return /** @type {GeoJSONFeatureCollection} */ ({
|
return /** @type {GeoJSONFeatureCollection} */ ({
|
||||||
'type': 'FeatureCollection',
|
type: 'FeatureCollection',
|
||||||
'features': objects
|
features: objects
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user