searchAnnotations

Function
import { searchAnnotations } from "@esri/hub-annotations";
//
searchAnnotations({ url: annotationsUrl + "/0" })
  .then(response => {
    // {
    //   data: [{
    //     id: "User1",
    //     type: "annotations",
    //     attributes: {description: "Great place!", ...}
    //   }],
    //   included: [{
    //     id: "User1",
    //     type: "users",
    //     attributes: { firstName: "User", lastName: "Name", ...}
    //   }]
    // }
  });

Query for annotations from ArcGIS Hub.

Parameters

Parameter Type Default Notes
requestOptions Required IQueryFeaturesOptions

request options that may include authentication

Available requestOptions

Property Type Notes

Returns

A Promise that will resolve with decorated features from the annotation service for a Hub enabled ArcGIS Online organization.

Promise<{
data:
IResourceObject[]
included:
IResourceObject[]
}>

Function defined in packages/annotations/src/search.ts:49