Skip to content
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

Problem with Unicode characters in leaflet-velocity.js #108

Open
g4gene opened this issue Oct 15, 2023 · 0 comments
Open

Problem with Unicode characters in leaflet-velocity.js #108

g4gene opened this issue Oct 15, 2023 · 0 comments

Comments

@g4gene
Copy link

g4gene commented Oct 15, 2023

There are Unicode variables in leaflet-velocity.js that cause errors in some circumstances.
The Web Inspector of the browser shows errors like "Invalid character '\u00b"
This results in the .js file not being loaded and more errors when
L.velocityLayer() is used saying the invalid function because the .js file wasn't loaded.
Problem occured in both Safari and Firefox browsers.

The strange part, which I don't fully understand, is that this only occurs when
served from the cgi-bin folder. It will work when used outside of that folder.
I think this may be related to some sort of security filter being applied by
the Apache server for things in the cgi-bin folder.

The server is a standard instance Amazon Web Services "Linux 2023" server
running an Apache server, all provided as standard installations by Amazon.
I've found their default configuration to be very tight on security. So far
all my problems in migrating things to this server have all be to accomodate
their security restrictions about what can or cannot do this or that.

I resolved the problem by creating a duplicate file named leaflet-velocity_fixed.js
and replacing the Unicode characters with ascii variables as follows;

λ0=x1
φ0=x2
Δλ=x3
λ0=x4
λ=x5
φ=x6
hλ=x7
pλ=x8
pφ=x9
hφ=x10
τ=x11

Then of course I changed the html code to the new name;
<script src="../js/leaflet-velocity_fixed.js"></script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant