arcgis-parser
Version:
Parser for ArcGIS REST Services to human friendly JSON.
66 lines (51 loc) • 1.94 kB
Markdown
# ArcGIS Parser
[](https://travis-ci.org/DenisCarriere/arcgis-parser)
[](https://badge.fury.io/js/arcgis-parser)
[](https://coveralls.io/github/DenisCarriere/arcgis-parser?branch=master)
[](https://raw.githubusercontent.com/DenisCarriere/arcgis-parser/master/LICENSE)
[](http://kangax.github.io/compat-table/es5/)
<!-- Line Break -->
[](https://github.com/feross/standard)
> Parser for ArcGIS REST Services to human friendly JSON.
## Install
**npm**
```bash
$ npm install --save arcgis-parser
```
**web**
```html
<script src="https://wzrd.in/standalone/arcgis-parser@latest"></script>
```
## Quickstart
```javascript
const url = 'https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer?f=pjson'
const response = await fetch(url)
const json = await response.json()
const metadata = arcgisParser(url, json)
//=metadata
```
**MapServer?f=pjson**
```json
{
"currentVersion": 10.3,
"serviceDescription": "This map is in ...",
"mapName": "Layers",
"description": "This map presents low-resolution ...",
"copyrightText": "Copyright:© 2013 ESRI, i-cubed, GeoEye",
"supportsDynamicLayers": false,
"layers": [
{
"id": 0,
"name": "World Imagery",
"parentLayerId": -1,
"defaultVisibility": true,
"subLayerIds": null,
"minScale": 0,
"maxScale": 0
}
],
...
```
**capabilities**
```json
```