mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

GET tiles 404 (Not Found) and evented.js:104 Error

Open Roxyi opened this issue 9 years ago • 6 comments

mapbox-gl-js version: mapbox-gl.js v0.39.1

Steps to Trigger Behavior

  1. Upload a shapefile to Mabox Studio and it automatically converted my shapefile to vector tiles image

  2. Use mapbox gl js to add the vector tiles to the map example: js bin

  3. Continue zooming out the map

Expected Behavior

no error

Actual Behavior

image It gave me 404 and evented.js:104 error image

I guess when you zoom in and out the map, it sometimes returns empty content.

This is changed to Error: http status 200 returned without content, if I add a third party vector tile source.

Roxyi avatar Aug 03 '17 15:08 Roxyi

Update to this issue:

Hi guys, I think I solved this problem. First, I would like to apologize that I made a mistake in the previous issue report. The mbtiles is actually created by Mapbox Studio Classic not by Mapbox Studio.

I think the problem is caused by Mapbox Studio Classic. See these two mbtiles. image image

The first one is created by directly uploading shapefile to Mapbox Studio and the second one is created in Mapbox Studio Classic. The second one has more zoom level but a smaller size. So that's why there is empty content returned. I don't know why Mapbox Studio Classic cut the size of the mbtiles. I think engineers from Mapbox will help explain.

Also I tested the mbtiles created by tippecanoe, there is no error message. So I think if you want to adjust the zoom extent or host the mbtiles by yourself, tippecanoe is the best way.

Roxyi avatar Aug 03 '17 18:08 Roxyi

I did more tests with tiles created by Mapbox Studio and tippecanoe. There is still 404 error. I updated the js bin with the tiles created by Mapbox Studio.

Now it is not that easy to trigger the error. When you point your mouse at the west border of Manhattan and zoom in. The error will appear. Also, when you point your mouse outside the border, zoom in, the error will also appear.

Roxyi avatar Aug 03 '17 19:08 Roxyi

Hi @Roxyi, thanks for the report. This is expected browser behavior — see https://github.com/mapbox/mapbox-gl-js/issues/1800#issuecomment-310380381 for further explanation.

lbud avatar Aug 03 '17 19:08 lbud

Er, sorry, spoke too soon — Mapbox GL shouldn't be logging that as an error anymore, only the browser.

lbud avatar Aug 03 '17 19:08 lbud

@lbud Thanks for your help. I guess this is the browser behavior too. When I added mbtiles from a third party tile source. It will return Error: http status 200 returned without content,

These error messages do not affect the map. They are just annoying when you need to debug in the console.

Roxyi avatar Aug 03 '17 19:08 Roxyi

→ #5574

jfirebaugh avatar Jan 11 '18 00:01 jfirebaugh