"Format.GeoJSON does not parse features with null geometries", r=elemoine
(Closes #1145) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7689 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -204,6 +204,9 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, {
|
||||
* {<OpenLayers.Geometry>} A geometry.
|
||||
*/
|
||||
parseGeometry: function(obj) {
|
||||
if (obj == null) {
|
||||
return null;
|
||||
}
|
||||
var geometry;
|
||||
if(obj.type == "GeometryCollection") {
|
||||
if(!(obj.geometries instanceof Array)) {
|
||||
@@ -532,6 +535,9 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, {
|
||||
* {Object} An object representing the geometry.
|
||||
*/
|
||||
'geometry': function(geometry) {
|
||||
if (geometry == null) {
|
||||
return null;
|
||||
}
|
||||
if (this.internalProjection && this.externalProjection) {
|
||||
geometry = geometry.clone();
|
||||
geometry.transform(this.internalProjection,
|
||||
|
||||
Reference in New Issue
Block a user