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
1
vote
1answer
40 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, ...
0
votes
1answer
18 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([...
0
votes
1answer
26 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 ...
0
votes
0answers
19 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/...
0
votes
1answer
68 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"]); ...
0
votes
0answers
24 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 ...
1
vote
1answer
32 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 &...
0
votes
1answer
37 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", ...
0
votes
1answer
174 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, ...
1
vote
1answer
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/...
0
votes
0answers
13 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!...
0
votes
0answers
8 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({ ...
0
votes
1answer
25 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 ...
0
votes
0answers
47 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 (...
0
votes
0answers
36 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(...
0
votes
1answer
31 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 ...
0
votes
1answer
29 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 ...
1
vote
1answer
29 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 ...
0
votes
1answer
117 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 ...
1
vote
1answer
128 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 ...
0
votes
1answer
157 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 ...
2
votes
1answer
45 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 ...
0
votes
0answers
48 views

multipleDefine error when loading ArcGISImageServiceLayer

This error is becoming a major problem and I am completely mystified on what to do about it. I already addressed the issue with the arcgis javascript loading before the JQuery libraries, so I know ...
1
vote
0answers
21 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 ...
0
votes
1answer
29 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 ...
0
votes
1answer
23 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 ...
0
votes
1answer
111 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 ...
0
votes
0answers
90 views

Trying to add user’s Portal content to map with ESRI API 4.19. Function Errors

Why is the addLayer() function is not working in my code? In the console it says it is not defined. I am a bit new to JS and self-taught coder. So please bear with me. I can only get the addLayer() ...
0
votes
1answer
22 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(...
0
votes
0answers
112 views

WebGL Issues with popup in ArcGIS API 4.17 for JavaScript

In addition to the main map view in my app, I have a popup that has 2 distinct map views. The popup is launched when ever the use clicks on the map. I am using ArcGIS API 4.17 for JavaScript for my ...
0
votes
0answers
9 views

What does graphic.resLayer mean in ArcGIS API for JavaScript

There is a property called reslayer in Graphic of ArcGIS JavaScript API. What does it mean? I have gone through the documentation and there wasn't any information about it.
0
votes
0answers
79 views

Setting start point of line drawn with SketchViewModel in ArcGIS API for JavaScript

I'd like to be able to programmatically set the start point of a new line drawn using SketchViewModel.create('polyline') so that the new line starts from the endpoint of a previously drawn line. I'm ...
1
vote
0answers
126 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 ...
0
votes
0answers
21 views

How to show labels for dynamicLayerInfo in ArcGISDynamicMapServiceLayer

Does anyone know how to show labels for dynamic layers I have used below code for show dynamic layers which is working fine and now I have to display labels for that dynamic layers. var dataSource ...
0
votes
0answers
85 views

Overview map not syncing with main map

I have created an overview map widget for my web app using arcGIS API for Javascript version 4.17. My overview map is separate from my main map as I don't want to bring in all the layers from my main ...
0
votes
1answer
175 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 ...
0
votes
0answers
75 views

Using UniqueValueRenderer on Point Feature Layer of ArcGIS API for JavaScript

I am currently working on adding layer legend to Map But I am not able to execute it completely. I have 2 feature Layers one of which is a point feature layer. And on the point feature layer I need ...
0
votes
0answers
33 views

Source for JavaScript SketchViewModel

I'm new to ArcGIS/Esri. I have a working sandbox example using SketchViewModel, but need to change that to: I want to customize the drag and drop/resizing points on the surrounded graphic I want to ...
0
votes
0answers
59 views

ArcGIS JS API 3 Add protected WMS services from Geoserver

How to add WMS service protected with basic authentication from Geoserver using ArcGIS Api 3? I have tried authentication with ArcGIS Proxy, something like this: <serverUrl url="Geoserverurl/...
2
votes
0answers
62 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: (...
1
vote
1answer
212 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 ...
2
votes
1answer
106 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 ...
0
votes
2answers
285 views

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

Can someone explain lang.hitch() function use in ArcGIS API for JavaScript?
1
vote
1answer
51 views

Adding multiple Dom Nodes in Content

I am using a popup on my mapView from arcGIS API for Javascript 4.17. When the user opens the popup, I have set the following attributes: view.popup.open({ // Set the popup's title to the ...
1
vote
1answer
115 views

How to limit legend to show only the features currently visible in the view?

Using ArcGIS Server JavaScript API v4.x and the Legend Widget, is it possible to limit the legend to only those features which are currently visible? For example, in the Legend Widget Sample, only ...
0
votes
0answers
57 views

Large dataset clip (in visualization) API Javascript ArcGIS

I'm working on a project in which I need to integrates features from our ArcGIS server and display them in a mobile application. Using the ArcGIS API for Javascript I'm having issues to understand if ...
1
vote
0answers
87 views

Does ESRI ArcGIS API for JavaScript support vector tiles with fill-extrusion Style Property?

ESRI ArcGIS API For JavaScript’s support GL JSON Stylesheets/Vector Tiles that use fill-extrusion property? https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#fill-extrusion { "id": &...
1
vote
0answers
68 views

Updating URL in GeoJSONLayer using ArcGIS JS API

I am working on a simple node/react application that allows for the the request of data using the URL parameter in GeoJSONLayer. The way that I set up the API I need to be able to change the url to ...
5
votes
1answer
349 views

How to grey-out area outside of a Polygon?

I have a Polygon on a Map which serve as "Area of Interest", how do I "grey-out" the area outside of the Polygon? (highlighted in pink) Here's my codes: require(["esri/Map&...
2
votes
1answer
468 views

CORS issues when trying to access NASA layers from ArcGIS JS API

I am trying to bring an ImageMapLayer into an ArcGIS JS API project. The layer is here: https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer I am creating the layer ...

1
2 3 4 5
40