Skip to content

Instantly share code, notes, and snippets.

@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", {
@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.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.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 / 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: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({