Skip to content

Commit 43fe9ed

Browse files
committed
Supports negative coordinates
Signed-off-by: Daniel Kastl <[email protected]>
1 parent 3470faf commit 43fe9ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/gtt-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ export class GttClient {
937937
*/
938938
parseHistory() {
939939
document.querySelectorAll('div#history ul.details i').forEach((item: Element) => {
940-
const regex = new RegExp(/\b(?:POINT|LINESTRING|POLYGON)\b\s?(\({1,}\d+(?:[,. ]\s?\d+)*\){1,})/g)
940+
const regex = new RegExp(/\b(?:POINT|LINESTRING|POLYGON)\b\s?(\({1,}[-]?\d+([,. ]\s?[-]?\d+)*\){1,})/gi)
941941
const match = item.innerHTML.match(regex)
942942
if (match !== null) {
943943
const feature = new WKT().readFeature(

0 commit comments

Comments
 (0)