3 votes

How to snap a graphic to a vector basemap layer

It is not possible to snap to Vector Tile Layers right now. The types of layers you can snap to are defined in the type of the layer property of FeatureSnappingLayerSource: FeatureLayer GraphicsLayer ...
  • 41
2 votes
Accepted

Error Handling Geoprocessing Service in ArcGIS JavaScript API

Use try/catch if you are using async/awaits. I think that @arcgis/core/rest/geoprocessor could use some (more) examples. Hope that this helps someone else. import JobInfo from "@arcgis/core/rest/...
  • 1,475
2 votes

Using event listeners such as Polygons, polylines and point for API query with ArcGIS JS

if I'm not mistaken, you want to take the coordinates of the drawing and send it to a service after the drawing on the map is finished. If you take a look at the Sketch's events, it is clearly ...
2 votes

ArcGIS javascript api - layer reordering - how to add new layers?

In ArcGIS JS API version 4.22, you can give layer index while adding layer. map.add(layer, 0); The index "0" defines the lowest layer. Source
1 vote
Accepted

Select by rectangle or by click using ArcGIS JavaScript API

The default "create" behavior is to allow both "single-click" (click) to create a fixed-size rectangle AND "Left-click+Drag" (freehand) to draw it whatever size you want. ...
1 vote
Accepted

JavaScript ArcGIS: Update scene clipping area after creation

Is the spatial reference of the numbers you are using correct? You may want to create the extent and pass the spatialReference: const extent = { // autocasts as new Extent() xmax: -10850000, ...
  • 83
1 vote
Accepted

Get feature id onclick using ArcGIS JavaScript API (from vector tile layer)

ESRI currently doesn't support attributes included in vector tiles as per the mapbox vector tile spec. https://community.esri.com/t5/arcgis-online-ideas/query-vector-tile-layers-for-feature-attributes/...
1 vote

Loading WebMap using ArcGIS API for JavaScript

There are two way to specify the portalURL. Does it work if you change it from using the global esriConfig variable and instead do: esriConfig.portalUrl = "https://domain/portal/"; https://...
1 vote

Deploy Custom ArcGIS API for JavaScript App (NOT a Web App Builder or Experience Builder App) to Portal for ArcGIS or ArcGIS Online

I think you mixed up some concepts here. You cannot deploy apps to Portal for ArcGIS or ArcGIS Online. Only apps created inside the software are hosted there. What you can do is deploying your app in ...
  • 1,006
1 vote
Accepted

Disable "world hillshade" layer from esri/map in JS

The definition of "topo-vector" is at https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemaps-for-others. If you don't want the hillshade you can create a ...
1 vote

Disable "world hillshade" layer from esri/map in JS

Create your own basemap style based on the Topo Basemap with the Hillshade disabled using the ArcGIS Vector Tile Style Editor then use that in your application.
  • 54.2k
1 vote
Accepted

Manage data versions using JavaScript for ArcGIS Enterprise

I found what I am looking for right here, https://www.youtube.com/watch?v=P0TkcMs8U6Y To summarise, you will have to make HTTP requests to full fill the versioning cycle. Lets say you want to Create a ...
  • 604
1 vote

How to set extent of map for list of coordinates using ArcGIS JavaScript API

You can expand your Extent a little to make sure that it zooms out a bit more. See https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#expand viewRef.current.goTo(...
1 vote
Accepted

Displaying in-memory GeoJSON in ArcGIS API for JavaScript

You can take advantage of createObjectURL to create a URL object that you can set the GeoJSONLayer.url parameter to. function createGeoJSONURL(yourgeojson) { return URL.createObjectURL( ...
1 vote

Legend not showing properly in LayerList

I assume you've already found another solution or given up on this task by now, but for future reference this has been a known issue in the 4.x api for quite a while. The only solution I've come ...

Only top scored, non community-wiki answers of a minimum length are eligible