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

[Bug] Missing tiles breaks Layer props update #2394

Closed
vnugent opened this issue May 22, 2024 · 1 comment
Closed

[Bug] Missing tiles breaks Layer props update #2394

vnugent opened this issue May 22, 2024 · 1 comment
Labels

Comments

@vnugent
Copy link

vnugent commented May 22, 2024

Description

I'm displaying custom tiles, a pmtiles file generated by Tippecanoe with max zoom = 8. Without overzoom setting, Source.maxzoom=8 I'm getting 404 errors at zoom level > 8, which breaks the Layer.visibility prop update logic.

<Map ...>
  <Source 
    id='my-source'
    type='vector'
    tiles='https://my-tile-server.com/areas/{z}/{x}/{y}.pbf'
    maxzoom={8} // removing this will cause 404, bre
  >
    <Layer
      id='my-layer'
      layout={{ visible: visibleFlag ? 'visible' : 'none' }}
    /> 
  </Source>
</Map>

When tiles are not found, the toggle button no longer works. I need to zoom/pan the map.

Screenshot 2024-05-22 at 12 18 34 PM

Expected Behavior

Since I can't easily catch exceptions generated by the tile requests, the Layer prop should handle the exception.

Steps to Reproduce

To reproduce you'll need a custom tile url with data capped at a zoom level.
https://codesandbox.io/p/sandbox/react-map-gl-404-props-4gn8cz

Environment

  • Framework version: Next 13.5.6
  • Map library: maplibre-gl 4.1.1, react-map-gl 7.1.7
  • Browser: all
  • OS: all

Logs

No response

@vnugent vnugent added the bug label May 22, 2024
@vnugent vnugent changed the title [Bug] Missing tiles break Source props update [Bug] Missing tiles breaks Source props update May 22, 2024
@vnugent vnugent changed the title [Bug] Missing tiles breaks Source props update [Bug] Missing tiles breaks Layer props update May 22, 2024
@Pessimistress
Copy link
Collaborator

Tile loading and rendering are not implemented in this library. You should report the bug to Maplibre instead.

@Pessimistress Pessimistress closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
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