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

leaflet 0.7.7 -> 1.9.4 #75

Merged
merged 1 commit into from
Jun 17, 2024
Merged

leaflet 0.7.7 -> 1.9.4 #75

merged 1 commit into from
Jun 17, 2024

Conversation

mtmail
Copy link
Contributor

@mtmail mtmail commented Jun 16, 2024

0.7.7 was released in year 2015. I expected more changes were needed but it's incredible backward compatible and everything still works. Minimum browser requirement is now MSIE11 but that's the same as the main openstreetmap.org website.

www/script.js Outdated
if (init_l0_map.force || !map.restoreView()) {
map.setView(init_l0_map.center.split(', '), init_l0_map.zoom);
}

L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png',
{ attribution: 'Map &copy; <a href="https://www.openstreetmap.org">OpenStreetMap contributors</a>' }).addTo(map);
{ attribution: 'Map © <a href="https://www.openstreetmap.org">OpenStreetMap contributors</a>' }).addTo(map);
L.control.attribution({ prefix: '<a href="https://leafletjs.com/">Leaflet</a>' }).addTo(map);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this Leaflet attribution. The map is pretty small as it is, and it's not commonly added.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Removed now
image

@@ -4,8 +4,8 @@
<title><?=_('Level0 OpenStreetMap Editor') ?></title>
<meta charset="utf-8">
<meta name="generator" content="<?=GENERATOR ?>">
<link rel="stylesheet" href="https://unpkg.com/leaflet@0.7.7/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@0.7.7/dist/leaflet.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do those integrity and crossorigin things actually work? My vim editor highlights those as warnings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works. Change the integrity hash and the script will refuse to load. https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity

@mtmail mtmail force-pushed the leaflet-1-dot-9 branch from 370c38c to fcc1e32 Compare June 17, 2024 16:31
@mtmail mtmail force-pushed the leaflet-1-dot-9 branch from fcc1e32 to 120ffb0 Compare June 17, 2024 16:38
Copy link
Owner

@Zverik Zverik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay thanks :)

@Zverik Zverik merged commit 8e32eb4 into Zverik:master Jun 17, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants