cmarqu / hikebikemap-website

The website stuff for hikebikemap.org
http://hikebikemap.org
1 stars 1 forks source link

https://hikebikemap.com/ is not loading anymore #4

Open mspnr opened 3 years ago

mspnr commented 3 years ago

I don't know if this is the right place to put the issue as long as the source code of hikebikemap.com is not consistent with the repository, but anyway: I have an error on loading https://hikebikemap.com/

Blocked loading mixed active content “http://cdn.leafletjs.com/leaflet-0.7/leaflet.css”
Blocked loading mixed active content “http://cdn.leafletjs.com/leaflet-0.7/leaflet.js”

The cause of the error is loading resources from both HTTP and HTTPS: https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content

Also I noticed, that leaflet versions are not updated for a long time. So I tried to update the dependencies and it worked for me quite well, at least the map is displayed and functional and no error displayed in console.

Maybe you want to update the website too. Here is the code with dependencies:

<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-plugins/3.3.2/control/Permalink.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-plugins/3.3.2/control/Permalink.Marker.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-plugins/3.3.2/control/Permalink.Layer.min.js"></script>

<link rel="stylesheet" href="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.css" />
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
michaelblyons commented 3 years ago

I agree it'd be best that the CDN link was fixed. In the meantime, you can load from the tile server at http://www.mtbmap.cz/ and select the "Hike & Bike Map" layer instead.