# vallaris-js

> Package for easy to use Vallaris API

Latest version **1.0.18** (published 2023-03-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install vallaris-js
pnpm add vallaris-js
yarn add vallaris-js
bun add vallaris-js
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.18 |
| Published | 2023-03-31 |
| First published | 2023-03-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 2 |
| Unpacked size | 144.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jusmanz |

## Links

- npm: https://www.npmjs.com/package/vallaris-js
- Repository: https://github.com/istick15/vallaris-js
- Homepage: https://github.com/istick15/vallaris-js#readme
- Issues: https://github.com/istick15/vallaris-js/issues
- npm.io page: https://npm.io/package/vallaris-js

## Dependencies (2)

- [geojson](https://npm.io/package/geojson.md) ^0.5.0
- [dot-prop-immutable](https://npm.io/package/dot-prop-immutable.md) ^2.1.1

## Recent versions

- 1.0.18 (latest) — 2023-03-31
- 0.0.1-beta.1 (beta) — 2025-08-26
- 1.0.17 — 2023-03-31
- 1.0.16 — 2023-03-31
- 1.0.15 — 2023-03-31
- 1.0.14 — 2023-03-31
- 1.0.13 — 2023-03-20
- 1.0.12 — 2023-03-20
- 1.0.11 — 2023-03-20
- 1.0.1 — 2023-03-20
- 1.0.0 — 2023-03-17

## README

![Vallaris Logo](https://v2k-dev.vallarismaps.com/core/api/managements/1.0/files/63f347fcb8e142c8f4b5cfd0/view)

## Vallaris Maps

[Vallaris Maps](https://vallarismaps.com/) is Geospatial data platform that provides tools for stored, analysis and visualize spatial data with effortless. By following international standard especialy OGC API series and Open Data scheme.

## Installation

```bash
npm install vallaris-js
```

or

```bash
yarn add vallaris-js
```

## Retrieve Data Services from Vallaris

Data Services can be free or limit access to from Vallaris. All of data services such as location, events can inquiry from Vallaris. Moreover, services are compile to OGC API Standards.

```javascript
import { Initial } from "vallaris-js";

const vallaris = new Initial({
 apiKey: {{VALLARIS_API_KEY}},
 host: "https://cloud.vallarismaps.com" // default optional
})

const collection = await vallaris.features.get.collections({
  collectionId: {{VALLARIS_COLLECTION_ID}}
})

const data = await vallaris.features.get.data({
  collectionId: {{VALLARIS_COLLECTION_ID}},
  featureId: {{VALLARIS_FEATURE_ID}}
})

```

## Example Collection Return

```json
{
    "collections": [
        {
            "id": {ID},
            "title": "geoJson_input",
            "extent": {
                "spatial": {
                    "bbox": [
                        [
                            98.73183,
                            8.43718,
                            103.549,
                            16.5669
                        ]
                    ],
                    "crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
                },
                "temporal": null
            },
            "itemType": "Feature",
            "crs": [
                "http://www.opengis.net/def/crs/OGC/1.3/CRS84",
                "http://www.opengis.net/def/crs/EPSG/0/4326"
            ],
            "storageCrs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84",
            "storageCrsCoordinateEpoch": null,
            "public": false,
            "links": [
                {
                    "href": "{HOST}/core/api/features/1.0/collections/{ID}?api_key={API_KEY}",
                    "rel": "self",
                    "type": "application/json",
                    "title": "This document"
                },
                {
                    "href": "{HOST}/core/api/features/1.0/collections/{ID}/items?api_key={API_KEY}",
                    "rel": "items",
                    "type": "application/geo+json",
                    "title": "Access the features in this collection as GeoJSON"
                },
                {
                    "href": "{HOST}/core/api/features/1.0/collections/{ID}?api_key={API_KEY}",
                    "rel": "self",
                    "type": "application/json",
                    "title": "This document"
                },
                {
                    "href": "{HOST}/core/api/features/1.0/collections/{ID}/items?api_key={API_KEY}",
                    "rel": "items",
                    "type": "application/geo+json",
                    "title": "Access the features in this collection as GeoJSON"
                }
            ],
            "createdAt": "2021-08-18T03:49:42.398Z",
            "createdBy": "60f539a5a44d2d7219fac3e3",
            "updatedAt": "2021-10-20T11:53:50.843Z",
            "updatedBy": "60f539a5a44d2d7219fac3e3"
        }
    ],
    "links": [
        {
            "href": "{HOST}/core/api/features/1.0/collections?api_key={API_KEY}",
            "rel": "self",
            "type": "application/json",
            "title": "This document"
        },
        {
            "href": "{HOST}/core/api/features/1.0/collections?api_key={API_KEY}&itemType=Feature&limit=1&offset=1",
            "rel": "next",
            "type": "application/json"
        }
    ],
    "crs": [
        "http://www.opengis.net/def/crs/OGC/1.3/CRS84",
        "http://www.opengis.net/def/crs/EPSG/0/4326"
    ],
    "numberMatched": 21,
    "numberReturned": 1
}

```

## Example Data Return

```json
 {
    "type": "FeatureCollection",
    "features": [
        {
            "id": {FEATURE_ID},
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    99.678955078125,
                    12.993852961834985
                ]
            },
            "properties": {
                "_collectionId": {COLLECTION_ID},
                "_createdAt": "2021-08-18T09:50:36.534Z",
                "_updatedAt": "2021-08-18T09:50:36.534Z"
            }
        }
    ],
    "links": [
        {
            "href": "{HOST}/core/api/features/1.0/collections/{ID}/items?api_key={API_KEY}",
            "rel": "self",
            "type": "application/geo+json",
            "title": "This document"
        },
        {
            "href": "{HOST}/core/api/features/1.0/collections/{ID}/items?api_key={API_KEY}",
            "rel": "alternate",
            "type": "application/json",
            "title": "This document"
        },
        {
            "href": "{HOST}/core/api/features/1.0/collections/{ID}/items?api_key={API_KEY}&limit=1&offset=1",
            "rel": "next",
            "type": "application/geo+json"
        }
    ],
    "timeStamp": "2023-03-31T07:49:20.988Z",
    "numberMatched": 124,
    "numberReturned": 1
}

```

## Style Manage

```javascript
import * as vallaris from "vallaris-js";

import { group, layers } from "vallaris-js";

// Visible layers in group id airport
group.visibility({
  map: "yourMap",
  groupId: "airport",
  type: "visible",
});
//=>  visible layers by group

// Render layers with metadata key interactive
const InteractiveLayers = layers.selectWithMetadata({
  styles: "yourStyle",
  metadataKey: "interactive",
});
//=>  render list of layers with metadata key interactive
```

---
_Source: https://npm.io/package/vallaris-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
