Remove goog.isDefAndNotNull() from vector sources
This commit is contained in:
@@ -134,8 +134,7 @@ ol.source.TileVector.prototype.forEachFeatureAtCoordinateAndResolution =
|
|||||||
for (i = 0, ii = features.length; i < ii; ++i) {
|
for (i = 0, ii = features.length; i < ii; ++i) {
|
||||||
var feature = features[i];
|
var feature = features[i];
|
||||||
var geometry = feature.getGeometry();
|
var geometry = feature.getGeometry();
|
||||||
goog.asserts.assert(goog.isDefAndNotNull(geometry),
|
goog.asserts.assert(geometry, 'feature geometry is defined and not null');
|
||||||
'feature geometry is defined and not null');
|
|
||||||
if (geometry.containsCoordinate(coordinate)) {
|
if (geometry.containsCoordinate(coordinate)) {
|
||||||
var result = callback.call(opt_this, feature);
|
var result = callback.call(opt_this, feature);
|
||||||
if (result) {
|
if (result) {
|
||||||
|
|||||||
@@ -450,8 +450,7 @@ ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect =
|
|||||||
var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];
|
var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];
|
||||||
return this.forEachFeatureInExtent(extent, function(feature) {
|
return this.forEachFeatureInExtent(extent, function(feature) {
|
||||||
var geometry = feature.getGeometry();
|
var geometry = feature.getGeometry();
|
||||||
goog.asserts.assert(goog.isDefAndNotNull(geometry),
|
goog.asserts.assert(geometry, 'feature geometry is defined and not null');
|
||||||
'feature geometry is defined and not null');
|
|
||||||
if (geometry.containsCoordinate(coordinate)) {
|
if (geometry.containsCoordinate(coordinate)) {
|
||||||
return callback.call(opt_this, feature);
|
return callback.call(opt_this, feature);
|
||||||
} else {
|
} else {
|
||||||
@@ -533,7 +532,7 @@ ol.source.Vector.prototype.forEachFeatureIntersectingExtent =
|
|||||||
*/
|
*/
|
||||||
function(feature) {
|
function(feature) {
|
||||||
var geometry = feature.getGeometry();
|
var geometry = feature.getGeometry();
|
||||||
goog.asserts.assert(goog.isDefAndNotNull(geometry),
|
goog.asserts.assert(geometry,
|
||||||
'feature geometry is defined and not null');
|
'feature geometry is defined and not null');
|
||||||
if (geometry.intersectsExtent(extent)) {
|
if (geometry.intersectsExtent(extent)) {
|
||||||
var result = callback.call(opt_this, feature);
|
var result = callback.call(opt_this, feature);
|
||||||
@@ -645,7 +644,7 @@ ol.source.Vector.prototype.getClosestFeatureToCoordinate =
|
|||||||
*/
|
*/
|
||||||
function(feature) {
|
function(feature) {
|
||||||
var geometry = feature.getGeometry();
|
var geometry = feature.getGeometry();
|
||||||
goog.asserts.assert(goog.isDefAndNotNull(geometry),
|
goog.asserts.assert(geometry,
|
||||||
'feature geometry is defined and not null');
|
'feature geometry is defined and not null');
|
||||||
var previousMinSquaredDistance = minSquaredDistance;
|
var previousMinSquaredDistance = minSquaredDistance;
|
||||||
minSquaredDistance = geometry.closestPointXY(
|
minSquaredDistance = geometry.closestPointXY(
|
||||||
|
|||||||
Reference in New Issue
Block a user