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

[Mapbox China] Error: Source layer "china_island" does not exist on source "composite"

Open tomacadi opened this issue 8 years ago • 6 comments

mapbox-gl-js version: v0.44.2

I am using mapbox-gl-js with API_URL: 'https://api.mapbox.cn' https://github.com/mapbox/mapbox-gl-js/issues/6620

The map is intended for users in mainland China. The map loads and seems to work fine. The map error event is triggering with the following erros:

{error: Error: Source layer "china_island" does not exist on source "composite" as specified by style layer …, type: "error", target: e, style: r}
{error: Error: Source layer "china_boundary_global" does not exist on source "composite" as specified by sty…, type: "error", target: e, style: r}
{error: Error: Source layer "china_place_global" does not exist on source "composite" as specified by style …, type: "error", target: e, style: r}
{error: Error: Source layer "china_country_label" does not exist on source "composite" as specified by style…, type: "error", target: e, style: r}

Error: Source layer "china_island" does not exist on source "composite" as specified by style layer "china-boundary-island-fill" at r._validateLayer (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:381:4120) at r.<anonymous> (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:381:2375) at r.Evented.fire (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:521:844) at t.Evented.fire (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:521:1086) at t.Evented.fire (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:521:1086) at https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:231:1153 at u (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:207:441) at XMLHttpRequest.r.onload (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:503:1103)
message
:
"Source layer "china_island" does not exist on source "composite" as specified by style layer "china-boundary-island-fill""
stack
:
"Error: Source layer "china_island" does not exist on source "composite" as specified by style layer "china-boundary-island-fill"↵    at r._validateLayer (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:381:4120)↵    at r.<anonymous> (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:381:2375)↵    at r.Evented.fire (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:521:844)↵    at t.Evented.fire (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:521:1086)↵    at t.Evented.fire (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:521:1086)↵    at https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:231:1153↵    at u (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:207:441)↵    at XMLHttpRequest.r.onload (https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js:503:1103)"
__proto__
:
Object

###Question Is this intended behaviour given the China mainland traffic limitations?

tomacadi avatar May 30 '18 09:05 tomacadi

cc @chriswu42

jfirebaugh avatar Jun 01 '18 17:06 jfirebaugh

This is caused by gl js trying to find the names of features but returns errors because the names don't match up (new china features vs existing global features). Note that this does not affect how the map is rendered.

@zmofei is working on a fix to eliminate these debugging errors.

chriswu42 avatar Jun 04 '18 18:06 chriswu42

Thank you for the reply. Is there a specific place where progress on this fix is being tracked?

tomacadi avatar Jun 05 '18 06:06 tomacadi

Is there a specific place where progress on this fix is being tracked?

After further investigation this might be an issue on our api side - we're currently blocked on this due to a few technical dependencies, once we have a fix we'll post back.

chriswu42 avatar Jun 08 '18 17:06 chriswu42

Meanwhile I'll close this as something that's not actionable on the GL JS side.

mourner avatar Jul 25 '18 07:07 mourner

How can I solve these mistakes?

q869939686 avatar Aug 16 '18 06:08 q869939686