arcgis-parser
Version:
Parser for ArcGIS REST Services to human friendly JSON.
45 lines (39 loc) • 820 B
TypeScript
export type BBox = [number, number, number, number]
export type Protocol = 'http' | 'https'
export interface URL {
getCapabilities: string
slippy: string
world: string
host: string
}
export interface Service {
type: string
version: string
title: string
}
export interface Layer {
title: string
identifier: string
author: string
abstract: string
attribution: string
category: string
keywords: string
format: string
formats: string
minzoom: number
maxzoom: number
bbox: BBox
}
export interface Metadata {
service: Service
layer: Layer
url: URL
}
/**
* Parser for ArcGIS REST Services to human friendly JSON.
*
* @param url ArcGIS REST service url
* @param json MapServer or ImageServer JSON
*/
export default function arcgisParser(url: string, json: object): Metadata