Skip to content

Instantly share code, notes, and snippets.

View jonybekov's full-sized avatar
💭
I may be slow to respond.

R4Y jonybekov

💭
I may be slow to respond.
View GitHub Profile
@jonybekov
jonybekov / polygon_split.js
Created February 28, 2024 13:16 — forked from iamgeoknight/polygon_split.js
Split Polygon by Line
onGeomChange = (e) => {
/*
This function will dynamically split the polygon into two parts by a line and will follow geometry change event.
*/
//Create jsts parser to read openlayers geometry
let parser = new jsts.io.OL3Parser();
//Creating line geometry from draw intraction
let linestring = new ol.Feature({