Mapbox-gl-js: setStyle on raster sources triggers a full reload under some circumstances in v0.39.1

Created on 2 Aug 2017  路  1Comment  路  Source: mapbox/mapbox-gl-js

Hello guys, this is (maybe) kind a continuation of the issue #3893 I'm still having this problem under some circumstances in v.0.39.1.

Updated fiddle here: https://jsfiddle.net/3s8gdhwr/
In the example I'm changing the layout.visibility on a single layer after a timeout and a full reload is triggered. This happen even if I comment the line that made the change (use setStyle with no style changes at all). Also the console shows this warning:

Unable to perform style diff: Unimplemented: setLayerProperty..  Rebuilding the style from scratch.

I suspect that the problem arise from this part of the style:

"sources": {
  "composite": {
    "url": "mapbox://mapbox.mapbox-streets-v7",
    "type": "vector"
  },
  "mapbox://mapbox.satellite": {
    "url": "mapbox://mapbox.satellite",
    "type": "raster",
    "tileSize": 256
  }

But i can't be sure though.

Most helpful comment

Remove the "interactive": true's from the layers. This property is not needed anymore.

>All comments

Remove the "interactive": true's from the layers. This property is not needed anymore.

Was this page helpful?
0 / 5 - 0 ratings