如何更新 kepler.gl 地图样式

How to update kepler.gl mapstyle

我正在制作 kepler.gl 地图,我有自定义地图样式,尝试使用 addCustomMapStyleloadCustomMapStyle 更新默认地图样式,但这两种方法没有更新地图样式我的配置是

    {
  "version": "v1",
  "config": {
    "visState": {

    },
    "mapState": {
      "bearing": -14.78125,
      "dragRotate": true,
      "latitude": 50.15584222999782,
      "longitude": 8.73812510739856,
      "pitch": 55.64219672692688,
      "zoom": 6.249643007871772,
      "isSplit": false
    },
    "mapStyle": {
      "styleType": "0.ek919ez82er",
      "topLayerGroups": {},
      "visibleLayerGroups": {
        "border": false,
        "building": true,
        "label": true,
        "land": true,
        "road": true,
        "water": true
      },
      "buildingLayer": {
        "color": [
          18,
          25,
          38
        ],
        "isVisible": false,
        "opacity": 0.7
      },
      "mapStyles": {
        "0.ek919ez82er": {
          "accessToken": "accessToken",
          "custom": true,
          "icon": "BASE64IMAGE",
          "id": "0.ek919ez82er",
          "label": "Basic Template New",
          "url": "mapbox://styles/stephanefoulard/cjnvki2i00s9v2sjrbzpssze0"
        }
      }
    }
  }
}

如何加载这个自定义地图样式,现在正在加载深色地图样式,请帮忙

嗨,经过长时间的 redux 调试,我发现参数 addCustomMapStyleloadCustomMapStyle 需要

this.props.dispatch(loadCustomMapStyle({ style: {},  error: false});
this.props.dispatch(addCustomMapStyle());

由于堆栈上的字符串限制,我没有 post 样式,稍后我会 post 它们在其他地方并更新答案