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

WebTileLayer Hosted Tile Server 204 No-Content Response #543

Open
2 tasks done
Apesosmarc opened this issue Nov 6, 2024 · 1 comment
Open
2 tasks done

WebTileLayer Hosted Tile Server 204 No-Content Response #543

Apesosmarc opened this issue Nov 6, 2024 · 1 comment

Comments

@Apesosmarc
Copy link

IMPORTANT

  • My question is related to the samples and content within this repository. For all other issues, open a ticket with Esri Technical Support or post your question in the community forum.
  • I have checked for existing issues to avoid duplicates. If someone has already opened an issue for what you are experiencing, please add a 👍 reaction and comment as necessary to the existing issue instead of creating a new one. You can also refer to this repo's troubleshooting guide for hints and suggestions.

Actual behavior

Using the a WebTileLayer pointing to a hosted tile server using the urlTemplate property. My server returns tiles as expected. However when the requested tile does not exist I return a 204, and get an error in the browser saying the tile was unable to be loaded.

I can send a blank_tile.png back to the server when the asset is not found to avoid this error but this seems redundant when the map is requesting a multitude of files that don't exist.

Expected behavior

The frontend should ideally render a blank tile when receiving a 204 network status request rather than trying and throwing an error when loading an image that doesn't exist in the request.

Browser Error Example:

{
    "name": "request:server",
    "message": "Unable to load tile 17/49193/38845",
    "details": {
        "error": {
            "stack": "Error: The source image could not be decoded."
        },
        "level": 17,
        "row": 49193,
        "col": 38845
    }
}

Reproduction sample

https://codesandbox.io/p/sandbox/x7jt94

Reproduction steps

  1. Integrate web server that returns 204 at line 46 in index.html
  2. Open devtools, observe unable to load/render error being thrown in map.

Reproduction browser

Chrome 130 on Windows 10

Operating System (check https://whatsmyos.com)

Windows 10* 64-bit

@andygup
Copy link
Member

andygup commented Nov 6, 2024

Hi @Apesosmarc for questions about SDK functionality such as WebTileLayer, we recommend closing this issue and posting your question on the community site for the most visibility: https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bd-p/arcgis-api-for-javascript-questions

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

No branches or pull requests

2 participants