-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QrCode - a little investigation #1407
Comments
Great idea. I would suggest we use the functionality added in #1252 for this. Start by enabling With that enabled, you generate the QR code by taking the current value from |
Awesome! Thanks. I'll take a look at it.
Den tis 3 okt. 2023 kl 11:04 skrev Jacob Wodzyński ***@***.***
…:
Great idea.
I would suggest we use the functionality added in #1252
<#1252> for this. Start by enabling
enableAppStateInHash in all your maps (it's an Admin setting). (Ideally,
in future releases, this will be made the default functionality. I'm open
for enabling it by default. It's stable, we've been using it for 6+ months
in production.)
With that enabled, *you generate the QR code by taking the current value
from window.location.href*. That's it. 🚀
—
Reply to this email directly, view it on GitHub
<#1407 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2VNYU4YCQWPBNDRHZFAQ5LX5PIJ7AVCNFSM6AAAAAA5QSVGBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBUGU2DGMZVGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I think it would be worth the trouble, QR-codes are cool! |
I read this again and saw this from your initial post:
Are you sure about this? I had a look at this and the What else do you need? 😄 |
Yo yo! Im back, and here's a little update on qr code: Turns out the enableAppStateInHash worked perfectly. Me and Jesper talked about checking for this value to be true before enabling qr code client side. Otherwise it doesnt work with simply using the updated url. |
Welcome back! 😄 As for |
Thanks! Good to be back :) Maybe we dont need to check for enableAppState then? |
I think it's still a good idea to check, just as it's currently done elsewhere, see e.g. Hajk/new-client/src/components/App.js Line 576 in 1087aaa
|
Someone had the idea of adding a qr-code option for print in kommungis. The idea is to have an option for generating a qr-code here:
The option would be initially turned off, as to not overlap with logo, scalebar and north arrow. If turned on, the warning for overlapping icons would work the same, of course.
If chosen correctly, however, the qr-code would appear like this:
The qr-code is implemented by using
QrCode from "qrcode
.Link to library: https://www.npmjs.com/package/qrcode
And a possible logic for this in
PrintModel
would be this:However, in testing this, I encountered many problems with generating and updating the url. The
AppModel.anchorModel.getAnchor()
is not enough for correctly generating a updated url with every layer and and zoom an so on. I guess you would have to copy much of the logic fromAnchor
to keep it updated.I'm not sure what the best solution is. Further investigation is needed.
In conclusion, I would say this is a cool feature that is possible to implement. But, the question is if it's worth the trouble. Perhaps not.
The text was updated successfully, but these errors were encountered: