keplergl / keplergl/kepler.gl

[Feature Request] Allow optional columns

Open
#1,019 0 comments 1 reaction 1 assignee Claimed by @heshan0131 View on GitHub
Dominant language
TypeScript
Stars
12k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
66

Description

**Is your feature request related to a problem? Please describe.**
Currently each layer requires 1 set of columns to draw geometry. Point requires latitude and longitude column. It should also be possible to draw point based on a GeoJson feature geometry: `{type: 'Point', coodinates: [-127.23255, 31.1293847]}`. This will allow people to draw point layer based on GeoJson data, which includes feature type `Point`

Currrent layer `get requiredLayerColumns` returns an array of column keys: `['lat0', 'lng0', 'lat1', 'lng1']`, to support different column options and alternative columns, I propose to change the returned structure to be:

current:
```js
layer.requiredColumns = ['lat', 'lng'];
layer.optioanlColumns = ['altitude']
layer.columnLabels = {
lat: 'latitude',
lng: 'longitude'
};

```

proposed structure:
```js
layer.requiredColumns = [
// option 1
{
lat: {label: 'latitude'},
lng: {label: 'longitude'},
altitude: {optional: true, label: 'altitude'}
},
// option 2
{geojson: {label: 'geojson'}
]
```

**Describe the solution you'd like**
The UI should also support column options like:
Screen Shot 2020-03-22 at 5 57 14 PM

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.