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

NLS tiles not loading #775

Open
redheadkelly opened this issue Mar 20, 2024 · 4 comments
Open

NLS tiles not loading #775

redheadkelly opened this issue Mar 20, 2024 · 4 comments
Labels

Comments

@redheadkelly
Copy link

MediaWiki running on XAMPP for Windows

  • Maps version: 10.1.2 with leaflet-providers.js from 3/18
  • MW version:1.39.6
  • PHP version: 7.4.33
  • SMW version (if applicable): 4.1.3

Using layers=NLS.### and service=leaflet, the osgb1888, osgb63k1885, and oslondon1k1893 layers do not load.

{{#display_map: center=57.7683, -3.9723 | 57.8235,-4.2324~Little Daan; 57° 45′ 04″ N 4° 02′ 22″ W~Shandwick House; 57.6710,-4.1766~Balblair, Cromarty |layers=NLS.osgb1888,NLS.osgb63k1885,NLS.oslondon1k1893,NLS.osgb1919 |service=leaflet |zoom=9 }}

This includes the 3 that are not loading for me plus osgb1919, which does load for me, just as a comparison.

@D-Groenewegen
Copy link
Contributor

D-Groenewegen commented Oct 26, 2024

Hi, it's been a while! Are you sure that those services (osgb1888, osgb63k1885, and oslondon1k1893) are still accessible by those names? I'm asking because when they moved to MapTiler, some of them appear to have been renamed. For instance, instead of NLS.osgb1888, try NLS.osgb10k1888. It's also possible that some services are only commercially available. Log in to MapTiler to look for the terms and conditions.

@redheadkelly
Copy link
Author

Hi, it's been a while! Are you sure that those services (osgb1888, osgb63k1885, and oslondon1k1893) are still accessible by those names? I'm asking because when they moved to MapTiler, some of them appear to have been renamed. For instance, instead of NLS.osgb1888, try NLS.osgb10k1888. It's also possible that some services are only commercially available. Log in to MapTiler to look for the terms and conditions.

Checked again today.
MediaWiki | 1.41.4
Maps | 10.2.0

These are the maps provided for the UK.

United Kingdom  
UK Bartholomew Ireland Quarter-Inch 1940s https://api.maptiler.com/tiles/uk-baire250k1940/{z}/{x}/{y}.png?key=yaLOM7UkZgqqdRRm12S8
UK Great Britain, Ordnance Survey (1:1 million-1:10,560), 1900s https://api.maptiler.com/tiles/uk-osgb1888/{z}/{x}/{y}?key=yaLOM7UkZgqqdRRm12S8
UK Great Britain, Ordnance Survey One-Inch Seventh Series (1:63,360), 1955-1961 https://api.maptiler.com/tiles/uk-osgb63k1955/{z}/{x}/{y}.jpg?key=yaLOM7UkZgqqdRRm12S8
UK Great Britain, Ordnance Survey one-inch to the mile (1:63,360), 'Hills' edition, 1885-1903 https://api.maptiler.com/tiles/uk-osgb63k1885/{z}/{x}/{y}.png?key=yaLOM7UkZgqqdRRm12S8
UK Great Britain, Ordnance Survey 'Provisional' edition (1:25,000), 1937-1961 https://api.maptiler.com/tiles/uk-osgb25k1937/{z}/{x}/{y}.jpg?key=yaLOM7UkZgqqdRRm12S8
UK Great Britain, Ordnance Survey six-inch to the mile (1:10,560), 1888-1913 https://api.maptiler.com/tiles/uk-osgb10k1888/{z}/{x}/{y}.jpg?key=yaLOM7UkZgqqdRRm12S8
K London, Ordnance Survey Five-foot to the mile (1:1,056), 1893-1896 https://api.maptiler.com/tiles/uk-oslondon1k1893/{z}/{x}/{y}.jpg?key=yaLOM7UkZgqqdRRm12S8
UK Ordnance Survey Historical Maps from 1919-1947 https://api.maptiler.com/tiles/uk-osgb1919/{z}/{x}/{y}.jpg?key=yaLOM7UkZgqqdRRm12S8
UK OS Open Zoomstack https://api.maptiler.com/tiles/uk-openzoomstack/{z}/{x}/{y}.pbf?key=yaLOM7UkZgqqdRRm12S8

These match what is configured in leaflet-providers.js.
variants: {
osgb63k1885: 'uk-osgb63k1885',
osgb1888: 'uk-osgb1888',
osgb10k1888: 'uk-osgb10k1888',
osgb1919: 'uk-osgb1919',
osgb25k1937: 'uk-osgb25k1937',
osgb63k1955: 'uk-osgb63k1955',
oslondon1k1893: 'uk-oslondon1k1893'
}

And matches what I have called in the map on this page.
|layers=NLS.osgb1919,NLS.osgb1888,NLS.osgb10k1888,NLS.osgb25k1937,NLS.osgb63k1885,NLS.osgb63k1955,NLS.oslondon1k1893

It seems like that part of it is correct.

@D-Groenewegen
Copy link
Contributor

I think I found the cause of the issue. For each raster image that the extension tries to load, the browser's inspector complains that A resource is blocked by OpaqueResponseBlocking, please check browser console for details (Firefox). The image service API does not return an image and just says Invalid format (if you inspect the URL manually).

The problem to be addressed here is that different services come with slightly different expectations as to whether or not the file extension should be part of the URL - and if so, which one (jpg. png). When I tested uk-osgb1888, Maps tried to access images by using a format like https://api.maptiler.com/tiles/uk-osgb1888/14/8048/5106.jpg?key={keyhere}. But remove .jpg and it works again. Unfortunately, it is not the rule. For instance, uk-osgb63k1885 expects a .png file extension to be included in the URL.

I don't know if things changed on their (Maptiler's) end, but the important thing is to go back to the list and update everything.

@D-Groenewegen
Copy link
Contributor

I created a pull request. If you don't want to wait for the review process to run its course, which may take some time, and if you're not uncomfortable changing a few lines of code, you could go over to leaflet-extras/leaflet-providers#605, check file changes and replace the NLS section in your extension (extensions/Maps/resources/lib/leaflet-providers) with the new one.

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

No branches or pull requests

2 participants