keplergl / kepler.gl

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
http://kepler.gl
MIT License
10.41k stars 1.74k forks source link

Do we support dashed line (dotted line) in the layers which named "type": "line", #2555

Closed SincerelyUnique closed 6 months ago

SincerelyUnique commented 7 months ago

geo data

export function getRegionSplitLineData(){
  let lineDataRows = [
    [90, -4.696636, 66.181067, -4.696636, "AMER"], // north to iceland
    [66.181067, -4.696636, 60.181067, -25.696636, "AMER"], // north iceland to south iceland
    [60.181067, -25.696636, -90, -25.696636, "AMER"], // south iceland to south

    [90, 55.464810, -90, 55.464810, "EMEA"], // north to south

    [90, -171.439088, -90, -171.439088, "APAC"] // north to south
  ]
  return {
    fields: [
      {name: 'latTop', format: '', type: 'real'},
      {name: 'lonTop', format: '', type: 'real'},
      {name: 'latBottom', format: '', type: 'real'},
      {name: 'lonBottom', format: '', type: 'real'},
      {name: 'name', format: '', type: 'real'},
    ],
    rows: lineDataRows
  }
}

layer config

{
          "id": "prk7ck7",
          "type": "line",
          "config": {
            "dataId": "arc-line",
            "label": "Line Layer",
            "color": [
              166,
              165,
              165
            ],
            "highlightColor": [
              252,
              242,
              26,
              255
            ],
            "columns": {
              "lat0": "latTop",
              "lng0": "lonTop",
              "lat1": "latBottom",
              "lng1": "lonBottom"
            },
            "isVisible": true,
            "visConfig": {
              "opacity": 0.23,
              "thickness": 2,
              "colorRange": {
                "name": "Global Warming",
                "type": "sequential",
                "category": "Uber",
                "colors": [
                  "#C0C0C0"
                ]
              },
              "sizeRange": [
                0,
                10
              ],
              "targetColor": [
                166,
                165,
                165
              ],
              "elevationScale": 0,
              "dashArray": [5, 2], //  it is not work for me 
            },
            "hidden": false,
            "textLabel": [
              {
                "field": null,
                "color": [
                  255,
                  255,
                  255
                ],
                "size": 18,
                "offset": [
                  0,
                  0
                ],
                "anchor": "start",
                "alignment": "center",
                "outlineWidth": 0,
                "outlineColor": [
                  255,
                  0,
                  0,
                  255
                ],
                "background": false,
                "backgroundColor": [
                  0,
                  0,
                  200,
                  255
                ]
              }
            ]
          },
          "visualChannels": {
            "colorField": null,
            "colorScale": "quantile",
            "sizeField": null,
            "sizeScale": "linear"
          }
        }

Sorry to bother you , can u help me ? I want to show the dashed line in the map,

ibgreen commented 6 months ago

This is a question not an issue, you may have better luck in the GIthub Discussions tab.