chrisi
Christian Morgner
Did you know that Structr supports geometry operations out of the box? You can for example use the WKT (well-known-text) format to specify geometries and work with them:
let polygon = $.wktToGeometry('POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))');
let point = $.wktToGeometry('POINT (20 20)');
return polygon.contains(point);
39