Open plgagnon2 opened 3 years ago
Indeed, CartoLayer
inherits from MVTLayer
.
Did you try to specify uniqueIdProperty
? Needed for highlighting a feature split across two or more tiles if no feature id is provided. More info here.
You have to options:
CartoLayer
prop:new CartoLayer({
...
uniqueIdProperty: 'your_unique_id_prop',
autoHighlight: true,
highlightColor: [0, 0, 255],
});
useCartoLayerProps
hook like:const uniqueIdProperty = 'your_unique_id_prop';
const cartoLayerProps = useCartoLayerProps({ source, uniqueIdProperty });
Check CARTO docs for more info here.
This doesnt seem to work. But CartoLayer inherit from MVTLayer which inherit from Layer in the end (I think) https://deck.gl/docs/api-reference/core/layer#highlightcolor