You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello @gangxuexue
我是來自iOS频道的佈道助手,看到你問到這個問題,试着先帮你解答下。
你可以嘗試用一下方法來獲取feature elements
// Change the cursor style as a UI indicator.
map.getCanvas().style.cursor = 'pointer';
var feat = features[0]
//LOOKUP THE HOVERED CLUSTER FEATURES UNDERLYING DATA POINTS
var cluster_id = features[0].properties.cluster_id;
var all_features = cluster.getLeaves(cluster_id, Math.floor(map.getZoom()), limit = Infinity);
//DISPLAY THE HOVERED FEATURES IN THE POPUP
var features_to_display = []
all_features.forEach(function(f) {
features_to_display.push(f.properties["Primary ID"])
})
// Populate the popup and set its coordinates
// based on the feature found.
问题:如题,mapbox的聚合demo是用三层layer合起来的,如果我添加点击事件,点击聚合点,如何获取其中的组成的聚合点其中各个要素信息?
我要知道其中7个要素信息,如果过滤出来
The text was updated successfully, but these errors were encountered: