Introduce tile-pixels units
This commit is contained in:
@@ -2,10 +2,12 @@ goog.provide('ol.geom.Geometry');
|
||||
goog.provide('ol.geom.GeometryLayout');
|
||||
goog.provide('ol.geom.GeometryType');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.functions');
|
||||
goog.require('ol.Object');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.proj.Units');
|
||||
|
||||
|
||||
/**
|
||||
@@ -250,6 +252,9 @@ ol.geom.Geometry.prototype.translate = goog.abstractMethod;
|
||||
* @api stable
|
||||
*/
|
||||
ol.geom.Geometry.prototype.transform = function(source, destination) {
|
||||
goog.asserts.assert(
|
||||
ol.proj.get(source).getUnits() !== ol.proj.Units.TILE_PIXELS,
|
||||
'cannot transform geometries with TILE_PIXELS units');
|
||||
this.applyTransform(ol.proj.getTransform(source, destination));
|
||||
return this;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user