{"id":17123510,"url":"https://github.com/ralucanicola/code-snippets-arcgis-api-js","last_synced_at":"2025-10-24T13:05:39.220Z","repository":{"id":88188514,"uuid":"160030539","full_name":"RalucaNicola/code-snippets-arcgis-api-js","owner":"RalucaNicola","description":"A collection of code snippets for ArcGIS API for JavaScript","archived":false,"fork":false,"pushed_at":"2020-07-20T10:32:01.000Z","size":2805,"stargazers_count":17,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T05:44:55.041Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ralucanicola.github.io/code-snippets-arcgis-api-js/index.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RalucaNicola.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-12-02T09:08:18.000Z","updated_at":"2024-11-13T15:23:59.000Z","dependencies_parsed_at":"2023-04-16T14:53:23.766Z","dependency_job_id":null,"html_url":"https://github.com/RalucaNicola/code-snippets-arcgis-api-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RalucaNicola%2Fcode-snippets-arcgis-api-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RalucaNicola%2Fcode-snippets-arcgis-api-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RalucaNicola%2Fcode-snippets-arcgis-api-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RalucaNicola%2Fcode-snippets-arcgis-api-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RalucaNicola","download_url":"https://codeload.github.com/RalucaNicola/code-snippets-arcgis-api-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670520,"owners_count":21142901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T18:26:21.898Z","updated_at":"2025-10-24T13:05:34.198Z","avatar_url":"https://github.com/RalucaNicola.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# A collection of code snippets for ArcGIS API for JavaScript\n\nThis repository contains code snippets that might come in handy when programming 3D applications with ArcGIS API for JavaScript.\n\n## Development code snippets\n\nThese are the ones that you use often and that follow the same pattern: setting renderers, symbols, labels, visual variables etc. To avoid to always go to the documentation and copy the examples there is a [VSCode plugin](https://marketplace.visualstudio.com/items?itemName=Esri.arcgis-jsapi-snippets) that you can install.\n\n\u003cdetails\u003e\n\u003csummary\u003eHow to use it\u003c/summary\u003e\n\n![VSCode-demo](./code-snippet.gif)\n\u003c/details\u003e\n\nIn VSCode, go to Extensions, search for `arcgis api for javascript` and press the install button. Check out the list of code snippets that we added there. In your app, type in the prefix of the code snippet you want to add and press Tab . That should create the code snippet with the placeholders just like in the animated gif above.\n\n## Debugging code snippets\n\n[These code snippets](./debug-snippets/snippets.md) are useful to figure out what's going on in the browser. What is my camera position? Why is the layer not showing up? Getting access to the view will grant you super powers, like access to the layers and their views etc.\n\nYou will most likely use these code snippets in the browser. Therefore it's useful to also store them in the browser. Google Chrome has a useful feature in the dev tools called `Snippets`, where you can keep all of these snippets handy.\n\n\u003cdetails\u003e\n\u003csummary\u003eHere's how it works\u003c/summary\u003e\n\n![Chrome-demo](./debug-snippets/chrome-snippets.gif)\n\u003c/details\u003e\n\n## Fun code snippets\n\nThese are the code snippets that you use to spice up your app. You might only need them once every 10 apps or so, but they provide some nice effects. For example rotating the globe, fading layers in or out, animating between several points etc. View them all live [here](https://ralucanicola.github.io/code-snippets-arcgis-api-js/fun-snippets/index.html).\n\n[![fun-snippets](./fun-snippets/snippet-page.png)](https://ralucanicola.github.io/code-snippets-arcgis-api-js/fun-snippets/index.html)\n\nFeel free to make a PR to contribute with your own snippets or suggest\nnew code snippets with an [issue](https://github.com/RalucaNicola/code-snippets-arcgis-api-js/issues) :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fralucanicola%2Fcode-snippets-arcgis-api-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fralucanicola%2Fcode-snippets-arcgis-api-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fralucanicola%2Fcode-snippets-arcgis-api-js/lists"}