Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/layers/src/point-layer/point-layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,10 @@ export default class PointLayer extends Layer {
columns?: PointLayerColumnsConfig;
} = {
label:
Comment thread
lixun910 marked this conversation as resolved.
pair.defaultName ||
(typeof label === 'string' && label.replace(/\.[^/.]+$/, '')) ||
'Point'
// Skip the generic 'point' fallback from findPointFieldPairs and use the dataset label instead
pair.defaultName && pair.defaultName !== 'point'
? pair.defaultName
: (typeof label === 'string' && label.replace(/\.[^/.]+$/, '')) || 'Point'
};

// default layer color for begintrip and dropoff point
Expand Down
2 changes: 1 addition & 1 deletion test/node/utils/layer-utils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ test('layerUtils -> findDefaultLayer.1', t => {
}
}),
new PointLayer({
label: 'point',
label: 'Point',
dataId,
columns: {
lat: {
Expand Down