Questions tagged [arcgis-javascript-api]

For questions about ArcGIS API for JavaScript 2.x and 3.x. For 4.x use arcgis-javascript-api-4 instead

Filter by
Sorted by
Tagged with
0 votes
1 answer
15 views

ArcGIS: Fetching raster tiles that are custom desined

Is it possible to fetch tiles as bitmaps, that were designed in a map builder by ArcGIS, like it can be done in Mapbox?
user avatar
  • 123
0 votes
0 answers
9 views

ArcGIS JS API Sketch snappingOptions is not reacting to featureSources

I'm trying to set the Snapping options of the sketch widget, to snap only to a specific graphic layer, and not all others. It seems like the results " ignores" my settings, shows all the ...
user avatar
  • 123
0 votes
1 answer
17 views

Web AppBuilder DE - Use an uploaded shapefile to query

The shapfile is zipped and uploaded through the "Add Data" widget. I am looking to use an customized widget to read the feature layer from the upload and query another feature layer. Since ...
user avatar
  • 331
1 vote
1 answer
20 views

How to snap a graphic to a vector basemap layer

I'm using the Sketch Wdget in a map for drawing graphics. Is it possible to snap the drawings (polygons for example) to the roads that are part of the vector tile layer i'm using as a base map?
user avatar
  • 123
1 vote
0 answers
22 views

Create Extent to use in mapView.goto

I would like to use the goTo() method of the mapview, and pass it an Extent that I construct in the code. I created the extent by: const extent = new Esri.Extent({ xmax: maxX, xmin: minX, ...
user avatar
  • 123
0 votes
2 answers
35 views

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

I'm using arcGis on the web with js api. I'm creating a new map: new Map({ basemap: 'topo-vector', } when i observe the map, i see that besides the 'topo-vector' the is another layer: "world ...
user avatar
  • 123
1 vote
0 answers
28 views

Grouping icons/ tools in Esri Expand Widget

I am currently adding multiple icons to an Angular based Esri Web Map. My current approach is: defining the icon in app.component.html: <div id="flyToNextExtent" class="...
user avatar
  • 2,534
0 votes
0 answers
42 views

ArcGIS API for JavaScript 4.23 : Cannot use SQL CAST function with layer.definitionExpression but it work fine with query builder

I'm working with features which needs to be filtered. I need to use the definition expression : https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#definition... ...
user avatar
  • 71
0 votes
0 answers
17 views

ESRI JS API 4x Graphics layer on load function

I am working on developing a webapp using ESRI JS API 4.x. My main requirement is to search some address, zoom on the address, create a buffer, using that that buffer query data from a feature layer ...
user avatar
  • 1,027
0 votes
0 answers
67 views

Adding angular component to MapView.UI ESRI JS API

Stack: (Angular 13.x, ESRI JS API 4.22) I have three components Form (first thing the users see when the app loads) Dashboard component ( it contains the component bellow ) mapview.component.ts (this ...
user avatar
0 votes
0 answers
23 views

Get boundary coordinates of the current user view ArcGIS JavaScript API

Looking at the example: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=overview-map The Overview map knows exactly the location of the user, and changes the grey square ...
user avatar
0 votes
1 answer
37 views

Creating polygons that follow the curvature of the Earth in ArcGIS JS

I am trying to divide a globe into equally sized squares and render them using ArcGIS JS where the rendered polygons follow the curvature of the earth. So far, I've made an algorithm to divide a ...
user avatar
  • 51
0 votes
0 answers
22 views

t.slice() is not a function error when adding shapefile to map via ArcGIS Javascript API

I am trying to allow a user to add a shapefile to our web mapping application via an uploaded shapefile (Shapefile or GeoJSON), similar to the example here: https://developers.arcgis.com/javascript/3/...
user avatar
  • 1
0 votes
1 answer
43 views

Manage data versions using JavaScript for ArcGIS Enterprise

I developed a small web application that contains a Map view, and is loaded with features that were published. So I have (FeatureServer, VersionManagementServer). I decided to to add the functionality ...
user avatar
  • 592
0 votes
0 answers
23 views

Adding a specific layer to ArcGIS Online WebMap/API Application via GeoServer WFS

I am hosting a few different workspaces and layers on my GeoServer WFS, and would like to add a specific layer from that collection to my ArcGIS Online WebMap and also a simple web mapping application ...
user avatar
  • 1
1 vote
0 answers
26 views

ArcGIS: restrict FeatureLayer SQL access based on token

I am working on a web app using the ArcGIS API for JavaScript that fetches a FeatureLayer from ArcGIS Online. The web app has users with many different permission roles and I want users to be able to ...
user avatar
0 votes
0 answers
64 views

Get selected Features in LayerView

I am currently developing 2 widgets in the Experience Builder. In one of the two widgets I have implemented the Esri search widget and mark the feature in the LayerView via the search result. Now I ...
user avatar
  • 1
1 vote
1 answer
182 views

Get features onclick ArcGIS JavaScript API

I am new to JavaScript and to JavaScript APIs as well, I am trying to get all the attributes of a feature that is clicked on the webmap, and I don't want to use the default pop up so I disabled it, ...
user avatar
  • 592
0 votes
1 answer
80 views

HitTest with MapImageLayer not returning sublayers

I'm new in ArcGIS, and what am I doing is viewing MapImageLayer with all of sublayers. But, when clicking on point and running hitTest it returns 0 results. Below the code: <script> require([...
user avatar
0 votes
1 answer
100 views

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

I recently started working on ArcGIS JS to query with API from another site. I want to get the rasterized outputs by calling the API. It would work the way of EOS's real-time crop analysis. I am ...
user avatar
0 votes
1 answer
48 views

Displaying all layers in ArcGIS feature service in Angular application

As you can see in the below living atlas layer, there are multiple layers inside (state,county,tract etc..) But when I add https://services2.arcgis.com/FiaPA4ga0iQKduv3/arcgis/rest/services/...
user avatar
0 votes
1 answer
161 views

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

I am trying to set the extent for my ArcGIS map using the JavaScript API built in. Here's my code: const [Extent] = await loadModules(["esri/geometry/Extent"]); ...
user avatar
  • 51
0 votes
0 answers
155 views

Toggling Layer Visibility in Web Map using ArGIS API for JavaScript

I have an Esri Web Map which consists of multiple layers. In the application UI there are some checkboxes for each layer which the user can change the each layer's visibility on the map. How do I ...
user avatar
1 vote
1 answer
86 views

Error Handling Geoprocessing Service in ArcGIS JavaScript API

I am using ArcGIS JavaScript API 4.21 (with TypeScript). @arcgis/core/tasks/Geoprocessor is deprecated since version 4.20. So I am using @arcgis/core/rest/geoprocessor instead. import JobInfo from &...
user avatar
  • 1,316
0 votes
1 answer
80 views

Displaying in-memory GeoJSON in ArcGIS API for JavaScript

Right now I have a GeoJSON hosted on Azure so I can download it by URL like so: const geojsonLayer = new GeoJSONLayer({ url: "www.url.from.azure.com, copyright: "USGS Earthquakes", ...
user avatar
0 votes
1 answer
780 views

Auto-populating field from another feature layer in Survey123 using JavaScript

I'm creating a survey where the collector can drop a point and several fields auto-populate from another feature layer. For example, an inspector is at a property and finds a code violation. Hence, ...
user avatar
1 vote
1 answer
25 views

Get Directions details from Directions Widget

I have created a Directions Widget as below var directionsW = new Directions({ map: map, routeTaskUrl: "https://xxxxxxxxxxxx/arcgis/rest/services/...
user avatar
0 votes
0 answers
14 views

Add ShowSaveButton in Directions widget arcgis api 3.38

I am working with Directions Widget with arcgis JS version 3.38 and want to display the Save button on the widget, so I have added the ShowSavsButton parameter. But still can't displayed on the widget!...
user avatar
0 votes
0 answers
10 views

Update Directions Widget SearchOptions/geocoderOptions Parameters

How can I change the Directions GeoCoder Service to let him point on my own Geocoder service I have declared My directions as below, with the routeTaskURL var directionsW = new Directions({ ...
user avatar
0 votes
1 answer
30 views

Hiding/Displaying dashboard content (tiles) based on user or group logging in using ArcGIS JavaScript API

I want to know if it is possible to either hide or display the content of an Esri webapp, dashboard, or experience (tiles, widgets, data layers, filters) depending on which Portal user is accessing ...
user avatar
  • 1
0 votes
0 answers
90 views

Intersect two feature layers with ArcGIS API for JavaScript

I'm working to develop a spatial intersect between multiple featureLayers with ArcGIS API for JavaScript, and then I want to display just the intersected part on the map. I have two featureLayers (...
user avatar
0 votes
0 answers
87 views

How to open an attribute table via actions in ArcGIS JS API 4.x?

let layerList = new LayerList({ view: view, container:"sideDiv", listItemCreatedFunction: defineActions }); function defineActions(...
user avatar
  • 471
0 votes
1 answer
52 views

Esri JavaScript API WMS GetFeautureInfo response example

I am serving WMS from MapServer to the Esri JavaScript API client. Can someone show me what an example of what a response GetFeatureInfo request should look like (how it needs to be formatted)? The ...
user avatar
0 votes
1 answer
71 views

Accessing ArcGIS JS API outside of require callback

I am trying to figure out how I can access the ArCGIS JS API from a map after the map has been rendered, outside of require (ArcGIS JS API uses Dojo). For example, so I can do stuff like add (or ...
user avatar
  • 125
1 vote
1 answer
39 views

editingEnabled Property is always return as True for feature layers

I have hosted two feature layers in ArcGIS Online 10.8 and consumed it as portal items in my webmap application using ESRI Javascript API 4.19. I have enabled editing for one feature layer and not ...
user avatar
  • 973
1 vote
1 answer
251 views

Mouse-over event behavior problem when browser window is in focus

I have an ESRI Web Appbuilder web app with custom widgets and am having a weird issue when trying to register mouse-over events on a feature layer. I noticed that when the Chrome Dev Tools are closed ...
user avatar
  • 53
1 vote
1 answer
282 views

Looping through all FeatureLayers in map using ArcGIS API for JavaScript

I have featurelayers and I need to loop through all my featurelayers (in my map), to apply the Editor widget "esri/widgets/Editor", to the layers in my map (uploaded from ArcGIS Server ...
user avatar
0 votes
1 answer
321 views

view.map.loadAll is not a function (Arcgis API for JavaScript)

I wrote this code (below) to use the Editor widget of Arcgis API for JavaScript, knowing that before this code I defined my featurelayers (links to shapfiles uploaded on Arcgis server online Arcgis ...
user avatar
2 votes
1 answer
59 views

How to build only custom AMD modules with dojo build system?

Over the last few years, my team has developed a web app with web maps using ArcGIS JS version 3. We opted to use the CDN (script src https://js.arcgis.com/3.36/) instead of hosting the entire SDK ...
user avatar
  • 133
1 vote
0 answers
297 views

Getting Uncaught SyntaxError: Unexpected token { error when using downloaded ArcGIS API in PC without internet)

I am trying to implement ArcGIS API offline. I have downloaded the zip file from the site and followed the following changes, changed the baseUrl to my Apache IP copied the files to /var/www/html/ and ...
user avatar
0 votes
1 answer
31 views

ArcGIS API GraphicsLayer is not visible on map

I'm creating an onClick eventhandler to create a point on every click on the map, but the Graphics layer is not visible; Has anyone else encountered this? Is there something special I'm supposed to do ...
user avatar
  • 179
0 votes
1 answer
45 views

Web AppBuilder Developer Edition - on(someNode, "click", someFunction) Executes N Times When Widget Opened for the N-th Time

I have an on(someNode, "click", someFunction) in the onOpen() of Widget.js. The problem is that if the widget is closed then reopened (2nd open), the click event on someNode fires twice. If ...
user avatar
  • 331
0 votes
1 answer
201 views

ArcGIS JavaScript query task not returning feature

I am using query task to do a attribute query for features with a where clause. I have verified that the specific layer I am querying has the field LK_ID_NUM. My query task do not return an error, but ...
user avatar
  • 11
0 votes
1 answer
41 views

vertexInfo properties in ArcGIS JS 4x API for event when reshaping polygon

When dragging a polygon vertex using the Sketch class, the update event is fired, with a type of "reshape". 4X: sketch.on("update", onGraphicUpdate); function onGraphicUpdate(...
user avatar
1 vote
0 answers
184 views

Error loading dojo file locally: "Loading failed for the <script> with source ..."

I'm attempting to add ArcGIS maps to a website that's on a restricted network (and therefore needs to work offline). I've been trying to get the ArcGIS ESRI maps running offline, but I'm not sure how ...
user avatar
0 votes
1 answer
281 views

How to make the Polygon tool the active tool when the Sketch widget opens?

Using the ArcGIS Server JavaScript API v4.18, I am adding the Sketch widget. My goal is to have the Polygon tool as the only available tool, and to have this tool active when the widget opens. I've ...
user avatar
  • 20.5k
2 votes
0 answers
98 views

Squared buffered polygon based on polyline

I'm using ArcGIS Javascript API to allow users to draw polylines and polygons onto a map. Now when a user draws a polyline, this should result in a polygon surrounding the polyline at a fixed width: (...
user avatar
  • 121
1 vote
1 answer
380 views

Legend not showing properly in LayerList

In my web app using ArcGIS API for Javascript 4.18, I am bringing in 3 layers served from a mapServer REST Service using MapImageLayer. I also have a LayerList widget to display these layers. My ...
user avatar
  • 1,679
2 votes
1 answer
196 views

Widget Expand is not functioning correctly

I have placed 2 widgets (baseMapGallery, LayerList) inside a small map in a rather large popup. To keep it from crowding out the view, I am trying to use an Expand to launch it from a small icon ...
user avatar
  • 1,679
0 votes
2 answers
453 views

lang.hitch use in ArcGIS API for JavaScript [closed]

Can someone explain lang.hitch() function use in ArcGIS API for JavaScript?
user avatar

1
2 3 4 5
41