gpt4 book ai didi

javascript - 来自插件的 dcjs.leaflet Choropleth 中的弹出窗口不起作用

转载 作者:行者123 更新时间:2023-11-28 05:49:36 24 4
gpt4 key购买 nike

在 dc.leaflet 版本 0.2.3 的 Choropleth 图表中,弹出窗口不起作用或无法渲染。是我错了还是其他人也遇到了这种情况?我很乐意解决这个问题,但我需要一些帮助。

  .renderPopup(true)
.popup(function(d,feature) {
return feature.properties.name+" : "+d.value;
});

无论如何,任何帮助将不胜感激

https://github.com/dc-js/dc.leaflet.js/issues/22

提前致谢

最佳答案

插件中的弹出窗口对我来说也不起作用。但是,您可以将相同的逻辑应用于标准 dc_leaflet.markerChart 函数并实现弹出窗口。

这是一个有效的示例用法:

  var marker = dc_leaflet.markerChart("#demo1 .map", groupname) //map formatting
.dimension(restaurantNames)
.group(restaurantsGroup)
.width(700) //was 600
.height(500)
.center([43.733372, -79.354782]) //was 42.69,25.42
.zoom(11) //was 7s
.cluster(true) //was true
.valueAccessor(function(kv) {
return kv.value.count;
})
.locationAccessor(function(kv) {
return [kv.value.latitude,kv.value.longitude] ;
})
.popup(function(kv,marker) {
return kv.value.name + " - " + kv.value.stars + " * - " +
kv.value.price_range + "$";
});

关于javascript - 来自插件的 dcjs.leaflet Choropleth 中的弹出窗口不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38188603/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com