@geobox/geobox-js
v0.4.0
Published
JavaScript wrapper around Geobox REST API
Maintainers
Readme
Geobox Client API for JavaScript / TypeScript
Geobox® is a cloud-based GIS platform that enables users (local governments, companies and individuals) to easily upload their geo-spatial data, publish them as geo-services, visualize and analyze their geo-content (geo-data or -services) and share them with others. Geobox is a modern, world-class and cloud-ready geo-spatial platform that provides standard, safe, efficient and easy to use GI-Services.
Geobox TypeScript SDK provides seamless integration with the Geobox API, enabling developers to work with geospatial data and services programmatically in both Node.js and browser environments. This comprehensive toolkit empowers JavaScript and TypeScript applications to leverage advanced geospatial capabilities including data management, analysis, and visualization with full type safety and IntelliSense support.
Installation
npm i @geobox/geobox-jsExample
import { Geobox } from "@geobox/geobox-js";
// Authenticate with a JWT access token
const client = new Geobox.Client({
origin: 'https://api.geobox.ir',
accessToken: 'YOUR_ACCESS_TOKEN',
});
// ...or with an API key
// const client = new Geobox.Client({ origin: 'https://api.geobox.ir', apikey: 'YOUR_API_KEY' });
// ...or with a username and password (the access token is fetched automatically)
// const client = new Geobox.Client({ origin: 'https://api.geobox.ir', username: 'my_user', password: 'my_password' });
console.log(await client.getVectorLayers({q: "name = 'Tehran'"}));