更新时间:2023-01-01 21:38:31
我'我有点困惑你正在尝试做什么(我不知道Chroma是什么),但看起来你正试图以某种方式动态更新Mapbox托管的矢量图块源的属性。你不能这样做。
I'm a bit confused about what you're trying to do (I don't know what Chroma is), but it looks like you are trying to somehow dynamically update properties of a vector tile source hosted on Mapbox. You can't do this.
你基本上有两个动态数据可视化选项:
You basically have two options for a dynamic data visualisation:
map.setData()
显示它。map.setData()
to display it.如果你已经拥有了瓷砖组中的所有数据和所有地理位置,那么我不清楚你的问题是什么,或者为什么你有刷新它的麻烦。只需调用 setPaintProperty
甚至 setStyle
即可更新可视化。
If you already have all the data and all the geographies in the tileset, then I'm not clear on what your problem is, or why you have trouble "refreshing" it. Just call setPaintProperty
or even setStyle
to update the visualisation.