Skip to content

Latest commit

 

History

History
93 lines (75 loc) · 2.03 KB

README.md

File metadata and controls

93 lines (75 loc) · 2.03 KB

Format ArcGIS Online Item

formatItem

format ArcGIS Online Portal Item by adding extra properties to it (e.g. thumbnailUrl, itemIconUrl, agolItemUrl and etc).

formatItem(options:FormatItemOptions) : AgolItem

Example

import { 
    getItem 
} from "@esri/arcgis-rest-portal";

import {
    IItem
} from "@esri/arcgis-rest-types";

import {
    formatItem,
    AgolItem
} from '@vannizhang/arcgis-rest-helper';

getItem("ae7")
  .then((item:IItem)=>{
        const formattedItem:AgolItem = formatItem({
            item
        })
  });

Parameters

Parameter Type Default Note
options FormatItemOptions

FormatItemOptions

Property Type Note
item IItem
agolHost optional Text default value is "https://www.arcgis.com"
thumbnailWidth optional number default value is 200

Returns

AgolItem


AgolItem

Formatted ArcGIS Online Portal Item.

import {
    AgolItem
} from '@vannizhang/arcgis-rest-helper';

Properties

Property Type
created number
id string
modified number
numViews number
owner string
size number
tags string[]
title string
type string
protected boolean
categories string[]
culture string
description string
documentation string
extent number[]
properties any
snippet string
spatialReference ISpatialReference
typeKeywords string[]
url string
isSubscriberContent boolean
isPremiumContent boolean
isAuthoritative boolean
thumbnailUrl string
agolItemUrl string
itemIconUrl string
typeDisplayName string