Types
import type { ScreenPoint, LogInterceptor } from "@arcgis/core/core/types.js";Type definitions
ScreenPoint
Type definition
- Since
- ArcGIS Maps SDK for JavaScript 4.11
Point on the screen (x, y) in the DOM/CSS coordinate space. In this space, the origin is at the top/left corner and device pixel ratio scale is not taken into account (i.e. 1px in this space may make up multiple physical pixels).
- Example
- const sourcePoint = { x: 80, y: 1732 }
LogInterceptor
Type definition
- Since
- ArcGIS Maps SDK for JavaScript 5.0
A custom log interceptor function.
In 5.x, the module parameter uses esri.-style module identifiers (for example esri.layers.FeatureLayer) even when using the ESM build.
In 6.0, this will change to @arcgis/core/-style module identifiers (for example @arcgis/core/layers/FeatureLayer).
Parameters
- Returns
- boolean
Return true to indicate the log message has been handled and should no longer be processed (neither by other interceptors nor by the default handler which logs messages to the console).
- Example
- // Only show error messages, not warnings nor info messagesesriConfig.log.level = "error";esriConfig.log.interceptors.push(function(level, module, ...args) {// Send all messages to a REST end-pointrequest(loggingUrl, {method: "post",body: {level: level,module: module,details: JSON.stringify(args)}});// Return false so that the default log handler still writes log messages to the consolereturn false;});