Account for null or undefined geometry

The change in #2098 made it so a feature's geometry could be undefined.  This is consistent with the return type for the getGeometry method.  Where calling code needs to ensure that it has a geometry instance, it can use instanceof, goog.isDefAndNotNull(), or test for a truthy value.
This commit is contained in:
Tim Schaub
2014-05-23 10:00:15 -06:00
parent 0e7f86ea17
commit 097909516a
6 changed files with 11 additions and 11 deletions

View File

@@ -105,7 +105,7 @@ ol.renderer.vector.renderFeature = function(
ol.renderer.vector.renderFeature_ = function(
replayGroup, feature, style, squaredTolerance, data) {
var geometry = feature.getGeometry();
if (goog.isNull(geometry)) {
if (!goog.isDefAndNotNull(geometry)) {
return;
}
var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);