Skip to content
import { isGeoRSSGraphicOrigin } from "@arcgis/core/graphic/isGeoRSSGraphicOrigin.js";
Since
ArcGIS Maps SDK for JavaScript 5.0

Provides a utility function to determine whether a graphic's origin is a GeoRSSGraphicOrigin.

Example
// Use hitTest() to get a graphic, then check whether it originated from a GeoRSSLayer.
view.hitTest(screenPoint).then((response) => {
const graphic = response.results[0]?.graphic;
if (!graphic) {
return;
}
if (isGeoRSSGraphicOrigin(graphic.origin)) {
// hitTest returned a graphic from a GeoRSSLayer.
// Use this info for your processing logic.
} else {
console.log("graphic's origin is NOT a GeoRSSLayer");
}
});

Functions

NameReturn TypeObject

isGeoRSSGraphicOrigin

Function

Utility function that determines whether a graphic’s origin is a GeoRSSGraphicOrigin.

Signature
isGeoRSSGraphicOrigin (origin: GraphicOrigin | null | undefined): origin is GeoRSSGraphicOrigin
Parameters
ParameterTypeDescriptionRequired
origin

The graphic origin to check.

Returns
origin is GeoRSSGraphicOrigin

Returns true if the graphic origin is of type GeoRSSGraphicOrigin, false otherwise.