Revert "Function circular renamed to createCircularOnSphere"

This reverts commit ac8e7e16c2.
This commit is contained in:
Éric Lemoine
2014-09-23 09:41:03 +02:00
parent 04f5768c76
commit a94f02e463
2 changed files with 2 additions and 4 deletions

View File

@@ -63,8 +63,7 @@ var radius = 800000;
var x, y; var x, y;
for (x = -180; x < 180; x += 30) { for (x = -180; x < 180; x += 30) {
for (y = -90; y < 90; y += 30) { for (y = -90; y < 90; y += 30) {
var circle4326 = ol.geom.Polygon.createCircularOnSphere( var circle4326 = ol.geom.Polygon.circular(wgs84Sphere, [x, y], radius, 64);
wgs84Sphere, [x, y], radius, 64);
var circle3857 = circle4326.clone().transform('EPSG:4326', 'EPSG:3857'); var circle3857 = circle4326.clone().transform('EPSG:4326', 'EPSG:3857');
vectorLayer4326.getSource().addFeature(new ol.Feature(circle4326)); vectorLayer4326.getSource().addFeature(new ol.Feature(circle4326));
vectorLayer3857.getSource().addFeature(new ol.Feature(circle3857)); vectorLayer3857.getSource().addFeature(new ol.Feature(circle3857));

View File

@@ -359,8 +359,7 @@ ol.geom.Polygon.prototype.setFlatCoordinates =
* @return {ol.geom.Polygon} The "circular" polygon. * @return {ol.geom.Polygon} The "circular" polygon.
* @api stable * @api stable
*/ */
ol.geom.Polygon.createCircularOnSphere = ol.geom.Polygon.circular = function(sphere, center, radius, opt_n) {
function(sphere, center, radius, opt_n) {
var n = goog.isDef(opt_n) ? opt_n : 32; var n = goog.isDef(opt_n) ? opt_n : 32;
/** @type {Array.<number>} */ /** @type {Array.<number>} */
var flatCoordinates = []; var flatCoordinates = [];