protomaps / PMTiles

Cloud-optimized + compressed single-file tile archives for vector and raster maps
https://protomaps.com/docs/pmtiles/
BSD 3-Clause "New" or "Revised" License
2.11k stars 125 forks source link

PMTiles.io demo site fails in Safari Browser running iOS 15.5 in a Simulator #497

Open roblabs opened 4 days ago

roblabs commented 4 days ago

Issue

While navigating to https://pmtiles.io on very old Safari on iOS versions, the PMTiles demo page does not work.

Background

While randomly testing one of the National Park Service pages that makes use of PMTiles, we found that the PMTiles data was not getting rendered on an iOS 15.5 simulator. Safari on iOS 18.1 simulators & Safari running macOS work fine.


Steps to Reproduce

This is reproducible outside of the NPS infrastructure:

  1. In Xcode, configure & launch simulator running iOS 15
  2. Go to https://pmtiles.io
  3. Pick the first demo PMTiles from the list
  4. Error as in Figure 1
  5. You should also test Raster data from the list of sample PMTiles

Safari Inspector to the Simulators browser shows this error:

[Error] Preflight response is not successful. Status code: 403 [Error] Fetch API cannot load https://demo-bucket.protomaps.com/v4.pmtiles due to access control checks. [Error] Failed to load resource: Preflight response is not successful. Status code: 403 (v4.pmtiles, line 0) [Error] Unhandled Promise Rejection: TypeError: Load failed. (anonymous function) (mapview.1000a05f.js:646:904675)


Figure 1: Screen capture of iOS 15.5 at the https://pmtiles.io site image


Notes Our PMTiles file, canmex.pmtiles, is served via our NPS fleet of servers. We use CanMex as a way to gray out non-US states & territories, as in Figure 2

Figure 2: CanMex grays out other countries image

roblabs commented 4 days ago

I normally would consider this a "don't care". I am looking out for any other issues with the PMTiles stack (pmtiles generation, data, server, etc etc)


Yes, iOS 15.5 is old. See https://developer.apple.com/support/app-store for the latest data on "iOS and iPadOS usage".

bdon commented 4 days ago

Confirmed I can reproduce in BrowerStack on iOS 15 and a different failure mode 16, for the specific backend demo-bucket.protomaps.com ; others seem to work