mapcomplete/src/test.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
832 B
TypeScript
Raw Normal View History

2023-09-15 01:16:33 +02:00
import { Utils } from "./Utils"
import SvelteUIElement from "./UI/Base/SvelteUIElement"
import PointRenderingConfig from "./Models/ThemeConfig/PointRenderingConfig"
import { UIEventSource } from "./Logic/UIEventSource"
import Marker from "./UI/Map/Marker.svelte"
2023-11-15 03:42:37 +01:00
import Qrcode from "qrcode-generator"
import { FixedUiElement } from "./UI/Base/FixedUiElement"
function generateQr(message: string, attachTo: string) {
const typeNumber = 0
const errorCorrectionLevel = "L"
const qr = Qrcode(typeNumber, errorCorrectionLevel)
qr.addData(message)
qr.make()
document.getElementById(attachTo).innerHTML = qr.createImgTag()
2023-03-28 05:13:48 +02:00
}
2023-11-15 03:42:37 +01:00
generateQr(
"http://127.0.0.1:1234/theme.html?layout=cyclofix&z=14&lat=51.21571770000094&lon=3.219866599996749&layer-range=true&layer-gps_location=false#theme-menu:download",
"qr"
)