MapboxOverlay interleaved and onClick argument #8885
-
I have some questions on MapboxOverlay having layers of PointCloudLayer instance. I use MapLibre-GL 4.2.0 and I am trying display point cloud with deck.gl 9.0.14. const deckOverlay = new MapboxOverlay({
interleaved: true,
layers: [
new PointCloudLayer({
id: "test",
data: {
length: n,
attributes: { ... },
},
material: false,
pointSize: 10,
coordinateOrigin: [ latitude, longitude ],
coordinateSystem: COORDINATE_SYSTEM.METER_OFFSETS,
getNormal: [ 0, 0, 1 ],
pickable: true,
})
],
onClick: ( d ) => {
console.log( d );
}
}); First question:Changing interleaved value to false, points were not displayed. Why ? Second question:Tell me aboud "onClick" argument "d". "d" has a property "color". I thought it is the color of clicked point but it seems different. When I draw 3 points, first point color is Uint8Array [ 1, 0, 0, 2 ], second is [ 2, 0, 0, 2 ], third is [ 3, 0, 0, 2 ]. Third question:"d" mentioned above has a property "index". Does it show the order of clicked point ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
All deck.gl cordinates are in [longitude, latitude] order.
Make sure you have Maplibre's CSS stylesheet attached.
|
Beta Was this translation helpful? Give feedback.
I found the cause of problem.
not displayed
Maybe the timing to create
deckOverlay._deck.device
.displayed
I tried to investigate the difference between pointed sample and my script, and found.
Tha…