UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 768 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{normalizeFieldName as e}from"./fieldUtils.js";function n(n,d,i){d=e(d)?.toLowerCase(),i=e(i)?.toLowerCase();const o=n.map((e=>e.toLowerCase())),a=d?n[o.indexOf(d)]:null,u=i?n[o.indexOf(i)]:null;return{longitudeFieldName:a||n[o.indexOf(t.find((e=>o.includes(e))))],latitudeFieldName:u||n[o.indexOf(l.find((e=>o.includes(e))))]}}const l=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],t=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"];export{n as inferLocationInfo,l as latitudeFieldNames,t as longitudeFieldNames};