This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcgis | |
import json | |
from arcgis.gis import GIS | |
gis = GIS(None,'username', 'password', verify_cert=False) | |
# Download all data from a user | |
def downloadUserItems(owner, downloadFormat): | |
try: | |
#Search items by username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcgis | |
import json | |
from arcgis.gis import GIS | |
gis = GIS(None,'username', 'password', verify_cert=False) | |
#This function takes in a username and a item [type] for deletion | |
def deleteContent(owner, itemType): | |
try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcgis | |
import json | |
from arcgis.gis import GIS | |
from arcgis.features import FeatureLayerCollection | |
# Log into AGOL account [admin level] | |
gis = GIS(None,'username', 'password', verify_cert=False) | |
# Grab the feature layer item by id | |
featureLayerItem = gis.content.get('feature layer id') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcgis | |
from arcgis.gis import GIS | |
from arcgis.features import FeatureLayerCollection | |
# Log into AGOL account [admin level] | |
gis = GIS(None,'username', 'password', verify_cert=False) | |
# Grab the feature layer item by id | |
featureLayerItem = gis.content.get('feature layer id') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcgis | |
from arcgis.gis import GIS | |
import arcpy | |
import os | |
def createSDFiles(): | |
workSpace = 'C:/sdFiles/' | |
arcpy.env.workspace = workSpace | |
fileList = os.listdir(workSpace) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | |
"dojo/domReady!" | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require([ | |
"esri/Map", | |
"esri/views/MapView", | |
"esri/layers/CSVLayer", | |
"esri/config", | |
"esri/geometry/Polyline", | |
"esri/Graphic", | |
"esri/layers/GraphicsLayer", | |
"esri/layers/FeatureLayer", | |
"esri/layers/support/Field", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcgis | |
from arcgis.gis import GIS | |
try: | |
gis = GIS(None,"USERNAME", "PASSWORD", verify_cert=False) | |
featureLayer = gis.content.get('ID') | |
# A Query operation returns a FeatureSet (https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html?highlight=query#featureset) | |
featureSet = featureLayer.layers[0].query(where="1=1", out_fields="*") | |
#Use the featureSet to make a featureCollection | |
featureCollection = arcgis.features.FeatureCollection.from_featureset(featureSet) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require([ | |
"esri/Map", | |
"esri/views/MapView", | |
"esri/layers/FeatureLayer", | |
"esri/widgets/Popup", | |
"esri/Graphic", | |
"dojo/domReady!" | |
], | |
function (Map, MapView, FeatureLayer, Popup, Graphic) { |