Accept null crs

This commit is contained in:
Tim Schaub
2013-08-27 10:54:00 -06:00
parent 6b6639f620
commit 0c555e6e7d
2 changed files with 66 additions and 1 deletions

View File

@@ -150,7 +150,7 @@ ol.parser.GeoJSON.prototype.parseAsFeatureCollection_ = function(json,
}
}
var projection = 'EPSG:4326';
if (goog.isDef(json.crs)) {
if (goog.isDefAndNotNull(json.crs)) {
var crs = json.crs;
if (crs.type === 'name') {
projection = (/** GeoJSONCRSName */ (crs.properties)).name;