Skip to content
This repository was archived by the owner on Dec 7, 2025. It is now read-only.

Commit 4e5dc1a

Browse files
committed
feat: added geo plugin
1 parent ce77a7c commit 4e5dc1a

File tree

4 files changed

+128
-41
lines changed

4 files changed

+128
-41
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ COPY package*.json ./
99

1010
# Install dependencies
1111
RUN npm install
12+
RUN npm install git+https://github.com/Thib-G/yasgui-geo-tg.git
1213

1314
# Copy the rest of the application code
1415
COPY . .

package-lock.json

Lines changed: 115 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
"@testing-library/react": "^13.4.0",
88
"@testing-library/user-event": "^13.5.0",
99
"@zazuko/yasgui": "^4.4.3",
10+
"leaflet": "^1.9.4",
1011
"react": "^18.3.1",
1112
"react-dom": "^18.3.1",
1213
"react-scripts": "5.0.1",
13-
"web-vitals": "^2.1.4"
14+
"web-vitals": "^2.1.4",
15+
"wellknown": "^0.5.0"
1416
},
1517
"scripts": {
1618
"start": "react-scripts start",

src/App.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import React, { useEffect } from "react";
22
import Yasgui from "@zazuko/yasgui";
33
import "@zazuko/yasgui/build/yasgui.min.css";
44

5+
import GeoPlugin from "yasgui-geo-tg";
6+
Yasgui.Yasr.registerPlugin("geo", GeoPlugin);
7+
58
export default function App() {
69
useEffect(() => {
710
var config =
@@ -52,7 +55,12 @@ export default function App() {
5255
contentDiv.innerText = data.value.endpoint;
5356
source.appendChild(contentDiv);
5457
}
55-
}
58+
},
59+
60+
yasr: {
61+
pluginOrder: ['table', 'response', 'geo'], // Enable geo plugin alongside default table
62+
defaultPlugin: 'geo',
63+
},
5664
};
5765

5866
const yasgui = new Yasgui(document.getElementById("yasgui"), config);

0 commit comments

Comments
 (0)