Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mayadomi committed Jul 23, 2024
1 parent a0f4dbc commit 6eb3034
Show file tree
Hide file tree
Showing 26 changed files with 4,420 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules

dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# React + TypeScript + Vite + ArcGIS Maps SDK for JS

This template provides a rough and ready rudimentary example of how to use [ArcGIS Maps SDK for JS](https://developers.arcgis.com/javascript/latest/) with React and Typescript to display a simple map with points.

## Getting setup
Clone the repo and then run `npm install` to install the dependencies.

The ArcGIS SDK is huge and will take a while.

Run locally by `npm run dev` and you should see an interactive map and table.

## Data

The point data is mocked JSON for random location in the middle of WA desert.

## Other Learnings/Notes/Resources

Helpful documentation: https://developers.arcgis.com/javascript/latest/es-modules/

Samples from ESRI: https://github.com/Esri/jsapi-resources/tree/main/esm-samples/jsapi-esm-cdn

Prolific/very knowledgeable developer: https://odoe.net/blog/arcgis-jsapi-build-tips

13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 6eb3034

Please sign in to comment.