收藏
回答

map地图组件中使用marker的cover-view slot会导致碰撞检测失效吗?

回答关注问题邀请回答
收藏

2 个回答

  • 张振
    张振
    01-26
    marker 上的自定义气泡customCallout碰撞不生效。
    可复现,collisionRelation改为together同样不生效
    updateMarkers(stores: Store[]) {
            const markers = stores.map(store => ({
                id: store.id,
                latitude: store.latitude,
                longitude: store.longitude,
                title: store.name,
                rating: store.rating,
                iconPath: '/images/transparent_pixel.png',
                width: 1,
                height: 1,
                alpha: 1,
                // zIndex: 999,
                anchor: { x: 0.5, y: 0.5 },
                customCallout: {
                    display: 'ALWAYS',
                    anchorY: 0,
                    anchorX: 0,
                    collision: 'poi,marker',
                    collisionRelation: 'alone'
                }
            }));
            this.setData({ markers });
        },
    
    01-26
    有用
    回复
  • 智能回答 智能回答 本次回答由AI生成
    01-26
    有用
    回复
登录 后发表内容