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

Map Makers are blocked #2

Closed
Fiddlewood opened this issue Jul 6, 2019 · 2 comments

Comments

@Fiddlewood
Copy link

commented Jul 6, 2019

I uploaded the code to two different hosters, but on booth, the markers (and somethimes the map too) are blocked.

It actually didnt make sense due the fact that they are not from others servers or something else,
Unbenannt
so I dont know how to fix this. Updating to the latest leatlet didnt fix it.

@asmaloney

This comment has been minimized.

Copy link
Owner

commented Jul 6, 2019

  1. The map example works fine for me locally and the ones I use "live" work as well.
  2. Your browser's console should tell you if something is blocking assets like the JavaScript files or if there are other errors.
  3. When you open the index.html file locally instead of trying it from a server what do you see?
@Fiddlewood

This comment has been minimized.

Copy link
Author

commented Jul 6, 2019

  1. The map example works fine for me locally and the ones I use "live" work as well.
  2. Your browser's console should tell you if something is blocking assets like the JavaScript files or if there are other errors.
  1. When you open the index.html file locally instead of trying it from a server what do you see?

1.: It works locally perfect
2.: I will check this
3.: Everything works fine.
On gitpages, the map loads, the marker not, on my other webspace, the map and markers didnt load.

Error log:

Mixed Content: The page at 'https://xxx.de/zero/' was loaded over HTTPS, but requested an insecure script 'http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js'. This request has been blocked; the content must be served over HTTPS.

xxx.de/:1 Refused to execute script from 'https://xxx.de/zero/maps/markers.json' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.
leaf.js:12

Uncaught ReferenceError: jQuery is not defined
at leaf.js:12

Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure image ''. This content should also be served over HTTPS.


Fixed some with changing http:// to https:// in index and leat.js
But some are still there.

Refused to execute script from 'https://xxx.de/zero/maps/markers.json' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.
leaf.js:22

Uncaught ReferenceError: markers is not defined
at leaf.js:22

The last error link to

for ( var i=0; i < markers.length; ++i )


Edit again:
Fixed another one in index.html
application/json is the mime for the markers.json nowadays.

Still have the markers problem and the titles didnt load over https, no matter if I changed it to https or not.


The titles load normaly now. Thanks to browsercache >.>
Still one error left.

@asmaloney asmaloney closed this Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.