UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 554 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{getMetersPerUnitForSR as e}from"../../../core/unitUtils.js";import r from"../../../geometry/Extent.js";import{getWebMercatorScalingFactor as t}from"../../../layers/orientedImagery/transformations/utils.js";function n(n,i){const{x:o,y:m,spatialReference:a}=n,s=i*t(m,a)/e(a);return new r({xmin:o-s,xmax:o+s,ymin:m-s,ymax:m+s,spatialReference:n.spatialReference})}export{n as createExtentAroundPoint};