Skip to content

Commit

Permalink
Supports negative coordinates
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kastl <daniel@georepublic.de>
  • Loading branch information
dkastl committed Sep 13, 2022
1 parent 3470faf commit 43fe9ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/gtt-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ export class GttClient {
*/
parseHistory() {
document.querySelectorAll('div#history ul.details i').forEach((item: Element) => {
const regex = new RegExp(/\b(?:POINT|LINESTRING|POLYGON)\b\s?(\({1,}\d+(?:[,. ]\s?\d+)*\){1,})/g)
const regex = new RegExp(/\b(?:POINT|LINESTRING|POLYGON)\b\s?(\({1,}[-]?\d+([,. ]\s?[-]?\d+)*\){1,})/gi)
const match = item.innerHTML.match(regex)
if (match !== null) {
const feature = new WKT().readFeature(
Expand Down

0 comments on commit 43fe9ed

Please sign in to comment.