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

fix: change OSM tile link to unified format #375

Closed
wants to merge 1 commit into from
Closed

fix: change OSM tile link to unified format #375

wants to merge 1 commit into from

Conversation

LaoshuBaby
Copy link
Contributor

Hello, I noticed django-leaflet still using a/b/c subdomain when requesting OSM tiles, according to openstreetmap/operations#737, old format will stop working in the future, so I search all "{s}.tile.openstreetmap" in this repository and change them.

This was inspired by talk in thomersch/openstreetmap-calendar#146

If there are anything improper, please comment to me, thank you!

@claudep
Copy link
Contributor

claudep commented May 17, 2024

Could you tell what you changed in leaflet/static/leaflet/leaflet-src.map, as the format is diff-unfriendly and the file comes from upstream?

@LaoshuBaby
Copy link
Contributor Author

Could you tell what you changed in leaflet/static/leaflet/leaflet-src.map

replace("{s}.tile.openstreetmap","tile.openstreetmap")

As the title of this PR

the file comes from upstream?

This may be the key problem. I found it a bit like the build artifact of javascript, and thought that it might indeed be difficult to diff, so I am not very sure whether to replace the string in this file (but I did not see how it is built in this project, so I guess it is relatively stable because I replaced all such strings in text files in django-leaflet).

However, I really didn't expect it to come from an upstream project. Can you tell me which project it is? If so, I think this PR should be hold temporarily until the format replacement is done upstream.

@claudep
Copy link
Contributor

claudep commented May 17, 2024

Upstream is https://github.com/Leaflet/Leaflet. Looks like they fixed it in Leaflet/Leaflet@c2324e52e273

I just figured out that leaflet-src.map is an old file that was forgotten in the tree but is no longer used. I filed a PR to remove that file: #376

@Gagaro
Copy link
Member

Gagaro commented Jun 10, 2024

Thanks for the PR, I rebased it and merged it in 6d6eed7

@Gagaro Gagaro closed this Jun 10, 2024
@danieldegroot2
Copy link
Contributor

danieldegroot2 commented Jul 23, 2024

@Gagaro Could you use HTTPS instead of HTTP, please? (use https:// for the new url)
(unless some of your clients do not support this, but they should be able to overwrite it already.)

Leaflet/leaflet already do so.

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.

4 participants