Skip to content

Commit c30d75a

Browse files
committed
Fix Layer.toJSONString() method.
1 parent 00bf138 commit c30d75a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/groovy/geoscript/layer/Layer.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ class Layer {
859859
* @param out A GeoJSON String
860860
*/
861861
String toJSONString() {
862-
geoJSONWriter.write(layer)
862+
geoJSONWriter.write(this)
863863
}
864864

865865
/**

src/test/groovy/geoscript/layer/LayerTestCase.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ class LayerTestCase {
157157
String json = out.toString()
158158
assertNotNull json
159159
assertTrue json.startsWith("{\"type\":\"FeatureCollection\",\"features\":[")
160+
json = layer1.toJSONString()
161+
assertTrue json.startsWith("{\"type\":\"FeatureCollection\",\"features\":[")
160162
}
161163

162164
@Test void toKML() {

0 commit comments

Comments
 (0)