Mapbox is missing the “source-layer” property

Hello,

I’m experiencing an issue with the Mapbox plugin in my WeWeb project. Despite correctly configuring my map element, I keep receiving the following error:

Error: layers.simple-layer: layer “simple-layer” must specify a “source-layer”

Here are the details of my minimal setup:

Tileset: I created a public tileset from a GeoJSON file in Mapbox Studio. The tileset is published and accessible via the public URL (mapbox://petrissa-eckle.cm8ymlkk4ecai1onbw5rpog99-107ro).

GeoJSON:
{
“type”: “FeatureCollection”,
“features”: [
{
“type”: “Feature”,
“geometry”: {
“type”: “Polygon”,
“coordinates”: [
[
[-77.03653, 38.897676],
[-77.03383, 38.897676],
[-77.03383, 38.900676],
[-77.03653, 38.900676],
[-77.03653, 38.897676]
]
]
},
“properties”: {
“name”: “Test Polygon”
}
}
]
}

Source Configuration:

  • Unique Id: simple
  • Type: Vector
  • URL: Set to the public tileset URL as above.

Source configuration happens without any error displayed in the console.

Layer Configuration:

  • Unique Id: simple-layer
  • Type: Fill (to render polygons)
  • Source: Set to the vector source configured above.
  • Source Layer: I have entered the vector layer name exactly as it appears in Mapbox Studio (i.e., “simple”).

Despite ensuring that all fields are filled correctly, the error persists, which leads me to believe that the final configuration passed to Mapbox is missing the “source-layer” property for my layer “simple-layer”.

I noticed additional console warnings (such as “wwLib.wwCollection.getCollectionData is DEPRECATED, use wwLib.wwUtils.getDataFromCollection instead”), but I don’t believe these are causing the issue.

Could you please help me diagnose this problem or provide guidance on ensuring that the “source-layer” property is properly passed to Mapbox?

I noticed that this issue has been raised before but remained unanswered (Mapbox plugin - Layers tool).

I would really appreciate any assistance!

@Joyce @Alexis

Best regards.

Hello @Matthew_S @Joyce

Could you please take look at this post and provide an answer?

The mapbox element doesn’t get much love from you guys, many questions left unanswered about it ! :frowning:

It’s a super cool thing to have in WeWeb but you guys need to help us set it up correctly to unlock its full potential !

Thanks a lot in advance <3

Hello WeWeb Community !

If anyone has an answer on this issue, it’d be awesome as it is quite urgent on my side to know if source-layer is just buggy or usable.

Thanks again to anyone who can provide some help!

Hello, we don’t have many reports on this from other users and I couldn’t replicate the issue. Can you please try this outside WeWeb with CodePen or Jsbin and let me know if it works there? If it works there, then the issue might be coming from us. Feel free to reach out to our support team via chat so we can understand why it’s not working in WeWeb.

Hi again! Thanks for the reports so far. Our team is investigating this.

1 Like

Hello Daniel :waving_hand:

Do you know if/when this will be fixed?

Thanks again for your help.

Will

Hello @WilliamB, a fix will be released tomorrow :slight_smile:

1 Like

Hi Mael, incredible news! I needed it badly. You guys are awesome, thank you !! <3

@WilliamB it’s in production, please let us know if your problem is fixed :slight_smile:

1 Like

Hi Mael, it’s working perfectly! I’ve added 2 tilesets with different source layers and they are displayed as intended :slight_smile: It’s a game changer if we want to display lots of vector shapes. Amazing work guys, thank you so much !!

2 Likes