Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Oct 10, 2024
1 parent 7625f85 commit af57eef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tasks/hooks/src/adaptors/arcgis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ export default async function arcgis(data: any): Promise<boolean> {

let geometry: Geometry;
if (data.feat.geometry.type === 'Point') {
let geom = geojsonToArcGIS(data.feat.geometry) as Point;
const geom = geojsonToArcGIS(data.feat.geometry) as Point;
if (!geom.x || !geom.y) throw new Error('Incompatible Geometry');

const proj = proj4('EPSG:4326', 'EPSG:3857', [ geom.x, geom.y ]);

geom.x = proj[0],
geom.y = proj[1],
geom.x = proj[0];
geom.y = proj[1];

geometry = geom;
} else if (data.feat.geometry.type === 'LineString') {
let geom = geojsonToArcGIS(data.feat.geometry) as Polyline;
const geom = geojsonToArcGIS(data.feat.geometry) as Polyline;

geom.paths = geom.paths.map((paths) => {
return paths.map((p) => {
Expand All @@ -58,7 +58,7 @@ export default async function arcgis(data: any): Promise<boolean> {

geometry = geom;
} else if (data.feat.geometry.type === 'Polygon') {
let geom = geojsonToArcGIS(data.feat.geometry) as Polygon;
const geom = geojsonToArcGIS(data.feat.geometry) as Polygon;

geom.rings = geom.rings.map((ring) => {
return ring.map((r) => {
Expand Down

0 comments on commit af57eef

Please sign in to comment.