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

Unhandled Exception: Cannot retrieve tile: HTTP 204 #40

Closed
zjyhll opened this issue Apr 15, 2022 · 4 comments
Closed

Unhandled Exception: Cannot retrieve tile: HTTP 204 #40

zjyhll opened this issue Apr 15, 2022 · 4 comments

Comments

@zjyhll
Copy link

zjyhll commented Apr 15, 2022

I can not load this
https://dev-tile.terraqt.com/tile/xyz/{z}/{x}/{y}.pbf?path=cfa08636-3d72-439c-a3be-de686f1ef9e1/cor101/202010/CN-511403/vectortiles

center LatLng(30.253362,103.879004)

maybe it load succeed,but not shown

E/flutter (11409): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Cannot retrieve tile: HTTP 204: https://dev-tile.terraqt.com/tile/xyz/13/6639/3156.pbf
E/flutter (11409): #0 NetworkVectorTileProvider.provide (package:vector_map_tiles/src/vector_tile_provider.dart:56:7)
E/flutter (11409):
E/flutter (11409): #1 MemoryCacheVectorTileProvider.provide (package:vector_map_tiles/src/vector_tile_provider.dart:95:15)
E/flutter (11409):
E/flutter (11409): #2 VectorTileLoadingCache._loadBytes (package:vector_map_tiles/src/cache/vector_tile_loading_cache.dart:85:15)
E/flutter (11409):
E/flutter (11409): #3 VectorTileLoadingCache._loadTile (package:vector_map_tiles/src/cache/vector_tile_loading_cache.dart:65:15)
E/flutter (11409):
E/flutter (11409): #4 VectorTileLoadingCache.retrieve (package:vector_map_tiles/src/cache/vector_tile_loading_cache.dart:38:12)
E/flutter (11409):
E/flutter (11409): #5 CachesTileProvider.provide (package:vector_map_tiles/src/stream/caches_tile_provider.dart:30:35)
E/flutter (11409):
E/flutter (11409): #6 VectorTileModel.startLoading. (package:vector_map_tiles/src/grid/tile_model.dart)
E/flutter (11409):
E/flutter (11409):

@ibrierley
Copy link

A 204 error typically means that there was no content in the response from the http server. Clicking on the url shown, it doesn't seem to return any content, so first place I would look is why isn't the server returning any protobuf / .pbf content.

@zjyhll
Copy link
Author

zjyhll commented Apr 15, 2022

A 204 error typically means that there was no content in the response from the http server. Clicking on the url shown, it doesn't seem to return any content, so first place I would look is why isn't the server returning any protobuf / .pbf content.

https://dev-tile.terraqt.com/tile/xyz/12/3231/1681.pbf?path=8d3dc176-7f8a-4e08-a8c6-08e798deb999/eve1.e/20210517/1ba522c3-4612-4a28-bf78-454bcf67075c/vectortiles

Only some places have data,do I need to modify VectorTileLayerOptions‘s theme

@greensopinion
Copy link
Owner

modifying the theme likely won't help

I think what we need is something like this: https://github.com/greensopinion/flutter-vector-map-tiles/blob/main/lib/src/cache/vector_tile_loading_cache.dart#L67
Currently if we try to load a tile that's not present, we ignore it by creating an empty tile.

Feel free to submit a PR

@greensopinion
Copy link
Owner

fixed in commit 022580f

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

3 participants