Monday, 4 December 2017

Using WKT.writeGeometry for 'Circle' Geometry in OpenLayers?


In my application which I'm building using OpenLayers3, I'm trying to extract the geometry of a feature to WKT using

var format = new ol.format.WKT(); console.log(format.writeGeometry(geometry)); by following this docs.

It works great for Polygon as I have tested, i.e. returning the Geometry String (WKT) but it fails when I try to apply it to Circle Geometry. In particular the log is printed as

Assertion failed: geometryEncoder should be defined


So, is there any solution to this as why this is particularly happening with Circle geometries. And how to resolve it, i.e. where to define this geometryEncoder as suggested in log?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...