Skip to content

Instantly share code, notes, and snippets.

@nommuna2
nommuna2 / Readme.md
Last active December 25, 2023 16:42
(ArcGIS API for JavaScript) Add Shapefile from disk to a map in 4.x
@nommuna2
nommuna2 / index.html
Last active January 8, 2020 17:55
(ArcGIS API for JavaScript) Sample of using chart.js with the Esri 4.7 API (Typescript version)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
<title>ArcGIS JSAPI 4.6 TypeScript Demo</title>
<style>
html,
body,
#viewDiv {
@nommuna2
nommuna2 / Sample.js
Last active January 8, 2020 17:29
(ArcGIS API for JavaScript) Sample of using chart.js with the Esri 4.7 API
//Please go to the following jsbin for a working sample: https://jsbin.com/nejolahicu/1/edit?html,js,output
//Depending on server load, it may take awhile for the feature layer to load and be displayed on the map.
require([
"esri/Map",
"esri/views/MapView",
"esri/PopupTemplate",
"esri/layers/FeatureLayer",
"esri/widgets/Popup",
"esri/tasks/support/Query",
"https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.js",
@nommuna2
nommuna2 / Readme.md
Last active May 17, 2019 22:16
(ArcGIS API for JavaScript) Custom GL layer for a Feature Layer
@nommuna2
nommuna2 / Sample.js
Last active April 26, 2019 22:06
(ArcGIS API for JavaScript) Sample of using promises and the goTo method
require([
"esri/Map",
"esri/views/SceneView",
"esri/layers/FeatureLayer",
"dojo/domReady!"
],
function (Map, SceneView, FeatureLayer) {
// Code to create the map and view will go here
var featureLayer = new FeatureLayer({
@nommuna2
nommuna2 / Sample1.js
Last active April 26, 2019 22:05
(ArcGIS API for JavaScript) Creating a feature set and making a new feature layer with extra query parameters
//Version using featurelayer query
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
"esri/tasks/support/Query",
"esri/tasks/QueryTask",
"dojo/domReady!"
],
function (Map, MapView, FeatureLayer, Query, QueryTask, SimpleFillSymbol, Renderer) {
@nommuna2
nommuna2 / Sample.js
Last active April 26, 2019 22:04
(ArcGIS API for JavaScript) Sample of simplifying polygons using 4.x
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
"esri/tasks/support/Query",
"esri/tasks/QueryTask",
"esri/geometry/geometryEngineAsync",
"dojo/domReady!"
],
function (Map, MapView, FeatureLayer, Query, QueryTask, geometryEngineAsync) {
@nommuna2
nommuna2 / Sample.cs
Last active April 26, 2019 22:03
(ArcGIS Runtime SDK for .NET) Sample of adding layer to the map and doing a query
using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Symbology;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@nommuna2
nommuna2 / Sample.cs
Last active April 26, 2019 22:02
(ArcGIS Runtime SDK for .NET) Practice of the .NET API. Buffering and using geometry engine
using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Geometry;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Symbology;
using Esri.ArcGISRuntime.UI;
using Esri.ArcGISRuntime.UI.Controls;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
@nommuna2
nommuna2 / Sample.js
Last active April 26, 2019 21:58
(ArcGIS API for JavaScript) Break Renderer/Query in 3.x
require(["esri/map",
"esri/layers/FeatureLayer",
"esri/tasks/query",
"esri/renderers/ClassBreaksRenderer",
"esri/symbols/SimpleMarkerSymbol",
"esri/Color",
"dojo/domReady!"],
function (Map, FeatureLayer, Query, ClassBreaksRenderer, SimpleMarkerSymbol, Color) {
var featureLayer = new FeatureLayer("url to feature layer", {