[Feature Request] Allow optional columns
- 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:

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.