I did pull request #17 more than month ago, and it really fixed problems described there, but after some recent experiments with GeoJSON in Dart I encountered another problem I created with this pull request: value null or just no value throws an error while creating GeoJSON Feature from Map.
It happens because method Map.castFrom requires a Map, but map['properties'] can contain also null value and it shouldn't throw an error in this case, because "properties" is not required by GeoJSON Feature schema. So I changed this:
It checks if original "properties" field is not null and if it is so, Map will returned, otherwise it will have null value. This fixes such problem without reverting my previous pull request, and I hope all problems about this field is over now.
I did pull request #17 more than month ago, and it really fixed problems described there, but after some recent experiments with GeoJSON in Dart I encountered another problem I created with this pull request: value
null
or just no value throws an error while creating GeoJSON Feature from Map.It happens because method
Map.castFrom
requires a Map, butmap['properties']
can contain alsonull
value and it shouldn't throw an error in this case, because "properties" is not required by GeoJSON Feature schema. So I changed this:into this:
It checks if original "properties" field is not null and if it is so,
Map
will returned, otherwise it will havenull
value. This fixes such problem without reverting my previous pull request, and I hope all problems about this field is over now.Here is my simple test for checking such casting: