> For the complete documentation index, see [llms.txt](https://harmoware-vis.gitbook.io/harmoware-vis-documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://harmoware-vis.gitbook.io/harmoware-vis-documents/layers/linemaplayer.md).

# LineMapLayer

LineMapLayer renders a line or area according to the information in latitude and longitude.\
Layer for HarmoVisLayers.

#### Examples

```javascript
<HarmoVisLayers ...
    layers={[
        new LineMapLayer( { data: this.props.linemapData } )
    ]}
/>
```

#### Properties

Inherits from Base Layer properties.

| Properties        | PropTypes       | Default                     | Description                                      |
| ----------------- | --------------- | --------------------------- | ------------------------------------------------ |
| id                | string option   | 'LineMapLayer'              | Layer id                                         |
| data              | Array required  | --                          | state `linemapData`                              |
| lineOpacity       | Number option   | 1.0                         | Line opacity                                     |
| polygonOpacity    | Number option   | 0.5                         | Polygon Opacity                                  |
| getWidth          | Function option | x => x.strokeWidth \|\| 1   | Line Width specification accessor.               |
| getColor          | Function option | x => x.color \|\| WHITE     | object color specification accessor.             |
| getSourcePosition | Function option | x => x.sourcePosition       | Line source position specification accessor.     |
| getTargetPosition | Function option | x => x.targetPosition       | Line target position specification accessor.     |
| getPath           | Function option | x => x.path \|\| \[]        | Connecting line position specification accessor. |
| getPolygon        | Function option | x => x.polygon \|\| \[]     | 3-D object position specification accessor.      |
| getCoordinates    | Function option | x => x.coordinates \|\| \[] | area position specification accessor.            |
| getElevation      | Function option | x => x.elevation \|\| 3     | 3-D object height specification accessor.        |
| getDashArray      | Function option | x => x.dash \|\| \[0,0]     | Dotted line pattern specification accessor.      |

#### The json format of the line data file

```javascript
// linemapData (Define as needed)
[  // line source & target
   { "sourcePosition": [999.9999, 999.9999, 999.9999], // line start position (long,Lati,height)
     "targetPosition": [999.9999, 999.9999, 999.9999], // line end position (long,Lati,height)
   },・・・・・・
   // Connecting line
   { "path": [[999.9999, 999.9999, 999.9999], // line path position (long,Lati,height)
              [999.9999, 999.9999, 999.9999]・・・・・・],
     "dash ": [5,2], // line pattern
   },・・・・・・
   // 3-D object
   { "polygon": [[999.9999, 999.9999, 999.9999], // polygon path position (long,Lati,height)
                 [999.9999, 999.9999, 999.9999]・・・・・・],
     "elevation ": 999, // 3-D object height
   },・・・・・・
   // Area object
   { "coordinates":[[999.9999, 999.9999, 999.9999], // coordinates path position (long,Lati,height)
                    [999.9999, 999.9999, 999.9999]・・・・・・],
   },・・・・・・
]
```

#### Reserved key name of simulation data file

```
sourcePosition, targetPosition, path, polygon, coordinates
```

**Display example**

<div align="left"><img src="/files/-LvE6XNy-Z-TyX0aSo_x" alt=""></div>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://harmoware-vis.gitbook.io/harmoware-vis-documents/layers/linemaplayer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
