Closed tsobuskerudbyen closed 2 months ago
Thinks that "eventuelt i en useEffect i React." possibly should be dropped so as not to scare anyone away from using it.
Sadly I do not get what do you think of here. Should we remove all logs from the console?
The problem is not the errors in the console, it is that the widget does not appear when it is embedded in the website.
The screenshot of errors in the console is only included to show what happens when we embed the widget it into the website.
@espenblaais There was indeed a problem with the widget and I believe I fixed it now. You have to change the calling code a little bit and it would look like this:
window.CyclingWidget({
dest: [ 10.202572, 59.740983 ],
destDescription: "Frivillig beskrivelse her",
zoom: 10,
width: "100%",
height: "100%",
});
Note that the dest field looks a bit different now.
In any case, you can head over to https://widget.sykkelveier.no/ and create the new widget code.
Let me know how you're getting on.
@leonardehrenfried It works fine with updated dest field!
That's great!
@espenblaais Any other functional comments on this widget now? I have some issues with texts and other minor issues, but from your side: Does it seems to be a okay widget to use?
@tsobuskerudbyen Otherwise this seems to work as I would expect from a widget/script available for embedding.
But one small detail: it seems to add url parameters to the page i have embedet the widget (?layers=anlegg%2Crute-nb%2Crute-lb%2Crute-no%2Crute-lo%2Cpoffentlig%2Cpprivat%2Cpskap%2Cphotell%2Cptak%2Crep%2Cbrøyting-ok%2Cbrøyting-senere%2Csnør%2Cpumpe%2Cbutikk%2Cpumptrack%2Cloype%2Cbikely%2Clavhastighet#10/59.7352/10.206), it becomes less tidy if the url is to be distributed to others. Few will be able to find out that it is just a matter of removing these parameters. I think it would be beneficial if this could be avoided.
@espenblaais Thanks. Yes, we agree there.
Got our marketing consultant to look at widget.sykkelveier.no, and here is the response:
Here, tags should be added to avoid completely obvious user errors. Thinks that "eventuelt i en useEffect i React." possibly should be dropped so as not to scare anyone away from using it.
Have looked here https://github.com/buskerudbyen/cycling-norway/tree/main, found little relevant documentation there for me who was only going to quickly put this into use. And not immediately any instructions on how to use the widget. Would consider putting this at the bottom in a separate block for more technical users.
Tested it here: https://buskerudbyen.no/widget-test, see that it was blocked by the Cookie Information solution used here. I do not have access to edit it, so I have only deactivated it for this specific subpage. But still getting error in Console and it doesn't show anything. See screenshot of error.
I have also tested embedding it here: https://blaais.no/sykkelveier_embed_demo, it looks like I get the same error in Console.