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
#legendDiv_graphicsLayer1_0 > table.esriLegendLayer > tbody > tr > td:nth-child(1) > div > svg > path { | |
marker-start: url(#marker_map_0_0_0_start); | |
marker-end: url(#marker_map_0_0_0_end); | |
} |
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
//Make sure the layer is loaded, the query all path elements and add the attribute to the specific path you want | |
fl.on("update-end", (e) => { | |
document.querySelectorAll("* path").forEach((e,i) => { | |
if(i === 3){ | |
e.setAttribute("marker-start", "url(#marker_map_0_0_0_start)"); | |
e.setAttribute("marker-end", "url(#marker_map_0_0_0_end)"); | |
} | |
console.log(e); | |
}); | |
}); |
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/layers/FeatureLayer", | |
"esri/renderers/ClassBreaksRenderer", | |
"esri/symbols/SimpleMarkerSymbol", | |
"esri/Color", | |
"esri/symbols/SimpleLineSymbol", | |
"esri/tasks/query", | |
"dojo/domReady!" | |
], function (Map, FeatureLayer, ClassBreaksRenderer, SimpleMarkerSymbol, Color, SimpleLineSymbol, Query) { |
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/layers/FeatureLayer", | |
"esri/renderers/ClassBreaksRenderer", | |
"esri/symbols/SimpleMarkerSymbol", | |
"esri/Color", | |
"esri/symbols/SimpleLineSymbol", | |
"esri/tasks/query", | |
"dojo/domReady!" | |
], function (Map, FeatureLayer,ClassBreaksRenderer,SimpleMarkerSymbol,Color,SimpleLineSymbol,Query) { |
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/arcgis/Portal", | |
"esri/urlUtils", | |
"esri/request", | |
"esri/config", | |
"dojo/domReady!" | |
], function (Map, arcgisPortal,urlUtils, Request, Config) { | |
//Push the server to the cors array to avoid CORS related errors. | |
Config.defaults.io.corsEnabledServers.push("FQDN of server"); |
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
//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", |
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) { |
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
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
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", |