Fix 'scale' and 'translate' tests
This commit is contained in:
@@ -94,7 +94,7 @@ ol.format.TopoJSON.concatenateArcs_ = function(indices, arcs) {
|
||||
ol.format.TopoJSON.readPointGeometry_ =
|
||||
function(object, scale, translate) {
|
||||
var coordinates = object.coordinates;
|
||||
if (goog.isDef(scale) && goog.isDef(translate)) {
|
||||
if (!goog.isNull(scale) && !goog.isNull(translate)) {
|
||||
ol.format.TopoJSON.transformVertex_(coordinates, scale, translate);
|
||||
}
|
||||
return new ol.geom.Point(coordinates);
|
||||
@@ -114,7 +114,7 @@ ol.format.TopoJSON.readMultiPointGeometry_ = function(object, scale,
|
||||
translate) {
|
||||
var coordinates = object.coordinates;
|
||||
var i, ii;
|
||||
if (goog.isDef(scale) && goog.isDef(translate)) {
|
||||
if (!goog.isNull(scale) && !goog.isNull(translate)) {
|
||||
for (i = 0, ii = coordinates.length; i < ii; ++i) {
|
||||
ol.format.TopoJSON.transformVertex_(coordinates[i], scale, translate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user