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
2
votes
0answers
33 views

Added time layer doesn't show

I'm adding a layer with time control through the widget "add Data" But this layer doesn't show in map. Could someone give me a clue as to why this happens?
0
votes
0answers
9 views

QNAN when snapped to Greenwich [closed]

I have an error returned when I try to alter spatial reference to a raster. I have a Raster dataset in WGS84 with arcsecond degree unit. I alter the spatial reference to use decimal degree and then it ...
0
votes
1answer
18 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
33 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 ...
1
vote
1answer
409 views

Uncaught (in promise) TypeError: GraphicsLayer is not a constructor

import Map from "esri/Map"; import MapView from "esri/views/MapView"; import Graphic from "esri/Graphic"; import GraphicsLayer from "esri/layers/GraphicsLayer"; import webMercatorUtils from "esri/...
2
votes
0answers
21 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
1answer
62 views

Align 2 maps in ArcGIS JS API and React

I am trying trying to build a web app using React. I have been using [this example][1]. I would like to have 2 maps aligned horizontally, Something that looks like [this way][2]. In the sandbox ...
0
votes
1answer
54 views

Not Able to Add Breaks For Feature Service Graphics

Using ArcGIS JavaScript API 3.24, can you please take a look at this snippet and let me know why I am not able to add Symbology to Feature Service out put by using ClassBreaksRenderer Here is the ...
0
votes
1answer
215 views

Using ArcGIS JavaScript to calculate length of line feature where clicked

I am working with arcgis JavaScript API and a linear referencing feature. I want to be able to click on a line of a feature and calculate the length from beginning of the line to where I clicked. Then ...
0
votes
0answers
8 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
1answer
611 views

Printing secured services

ArcGIS Server Version: 10.4.0 ArcGIS JS API: 3.25 ArcGIS Desktop: 10.2.1 Browser: IE 11 In my web application, I am consuming secured services and have a requirement to print the map contents. ...
1
vote
0answers
10 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
31 views

Adding feature layer in ArcGIS

I am trying to add client-side feature graphics to a feature layer in a map with a roadmap baselayer using the following code, but nothing seems to appear on the map: function CreateFeatureLayer() { ...
1
vote
1answer
1k views

ArcGIS JavaScript setRequestPreCallback is partially working?

I have an api sitting in front of AGS that requires it's own authentication. I am using setRequestPreCallback as stated by the ESRI docs. In the image below, you can see that the first 2 requests are ...
0
votes
1answer
279 views

ArcGIS server can not be used in Mobile browser and Firefox browser/ ArcGIS Javascript

I am using ArcGIS JavaScript API to develop a web page to consume services from ArcGIS Server. The page loaded good in Chrome browser but not work for Firefox, and also both Android and Safari mobile ...
0
votes
1answer
17 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
2k views

ArcGIS Javascript Map loads but doesn't display

I just started creating a very simple mobile GIS app using ArcGIS Javascript API, and I have experiencing a very peculiar issue. When the app loads, the basemap is white (not visible) until you use ...
1
vote
1answer
103 views

Getting email addresses of pointers after selection with JSON or array and ArcGIS API for JavaScript?

I am trying to create a map where I can create a selection area, and get info of all graphic pointers under it, I tried to modify with following example, but they are using web service and queries, ...
0
votes
1answer
37 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
2answers
789 views

ARCGIS-JS-API : featurelayer.queryFeatures() not returning results

I have a feature layer that is hosted on ArcServer. It has a field called document_num that is a string. I have a table of which one of the columns is a link that lets the user "view on map". When ...
3
votes
1answer
1k views

ESRI Javascript API QueryTask error handling

I'm struggling to find the proper way to handle errors in a QueryTask. Particularly if the user clicks outside the feature layer. My current QueryTask looks at a field (bare_earth) populated with ...
1
vote
1answer
143 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 ...
0
votes
1answer
90 views

How to hide feature layer outside of boundary feature layer using ArcGIS JavaScript API?

I am developing JavaScript application. I have two feature layers one for features with point symbol and one for boundary with line symbol. I have added these two layers on map like below image. I ...
0
votes
0answers
23 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
808 views

Selecting Polygon Feature using ArcGIS API for JavaScript?

I used ArcGIS JavaScript API 3.25 for developing. I want to select polygons within 1km radius. so I used a sample code that esri provides. But it works only for point features. I want to use that ...
2
votes
1answer
370 views

Cannot set map extent in ArcGIS JavaScript API 3.17

I have my map set to a custom projection SVY21/3414 This map service only supports Tiled and not Dynamic. I manually convert the projection coordinates using proj4 and it works fine for my graphics. ...
0
votes
1answer
14 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
1answer
154 views

Changing Data Types within the CMV Map Service

Is it possible to format fields that appear in tables within the map service? In the table results after a spatial query, date fields are converted to UTC rather than duplicating the values from the ...
0
votes
0answers
24 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 ...
4
votes
2answers
16k views

How to add or remove layers using ArcGIS API for JavaScript?

I want to use javascript and dojo to add and remove layers.
3
votes
1answer
245 views

Parameters for ArcGIS REST “…/MapServer?f=jsapi”?

What parameters can be used with .../MapServer?f=jsapi to alter the results, like turning on or off a single layer? Background: When browsing an ArcGIS REST Services Directory one of the options at ...
0
votes
1answer
95 views

applyEdits to FeatureLayer does not add geometry

I'm trying to add the feature into the layer with a geometry type polygon. When I call applyEdits it adds the feature attributes into the layer but not its geometry. Here is my dummy data object which ...
0
votes
3answers
253 views

Manually triggering delete using Sketch Widget for ArcGIS JavaScript API

I am using the sketch widget for ArcGIS JavaScript: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html There is a "delete" button after you have selected one or ...
2
votes
1answer
1k views

Perform change detection using LandTrendr in Google Earth Engine?

I am having very basic skills in LandTrendr. I want to make a map showing year of detection and another magnitude of change, but I keep getting errors. I suspect the problem to be with the image ...
0
votes
1answer
81 views

In ArcGIS Web appbuilder widget, how can i use a variable what is declared in another widget file?

In Edit widget, i modified the RelatedRecordsEditor.js to automatically upload input fields with data like webMapId. var mapid=dijit.byId("dijit_form_ValidationTextBox_1").attr("value"); ...
0
votes
1answer
79 views

ArcGIS ArcGISDynamicMapServiceLayer, setExtent

I have a layer made with ArcGISDynamicMapServiceLayer like this: return esriLoader.loadModules([ 'esri/layers/ArcGISDynamicMapServiceLayer', 'esri/layers/ImageParameters', 'esri/InfoTemplate' ])...
1
vote
2answers
569 views

How to apply a layer definition with a spatial query to a Dynamic layer?

Using the ArcGIS Server JavaScript API, it's possible to specify an attribute query in the form of a layerDefinition against a Dynamic layer. For example, the following query will restrict the layer ...
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
1answer
85 views

init.js:36 GET https://js.arcgis.com/3.28/esri/WebMap.js net::ERR_ABORTED 404

I got above error in my browser developer tools window. This happened when I added esri/WebMap to my widget.js file of custom widget I was building.
0
votes
0answers
38 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 ...
0
votes
1answer
228 views

Setting Custom Cluster Icon with Picture Marker Symbols using ArcGIS API for JavaScript

Problem: Unsure how to set a custom icon for the cluster symbol, not the individual points or even the label of the cluster but the symbology for the cluster icon itself. Context: A Feature Layer is ...
0
votes
1answer
322 views

Querying from dynamically-populated drop down list using ArcGIS API for JavaScript:

Using ArcGIS API for Javascript 4, I want to create a drop-down list in the view that is dynamically populated based on the values available in a layer. When users select a value from this drop down ...
3
votes
2answers
187 views

Snapping does not work for WFSLayer in ArcGIS JavaScript API 3

I have a web application that I now need to use WFSLayer for some of the map layers. The problem is that snapping does not seem to work for WFS layers. The layer I use for drawing is a FeatureLayer. ...
1
vote
0answers
46 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 ...
2
votes
0answers
226 views

ESRI IdentityManager.registerToken unable to register Multiple servers

I have multiple secured service that needs to be added to my map for which I need to register multiple servers using ESRi IdentityManager.registerToken method IdentityManager.registerToken({ ...
1
vote
1answer
58 views

Placing symbol at map extent center

I am using ArcGIS Web AppBuilder (Version 2.13 August 2019). I have a widget, and on button click, I need to place a symbol at the centre of the map. I tried using : selectFeatureService: function (...
0
votes
1answer
46 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
1answer
93 views

How to Specify Out Unit to Be in Decimal Degree in ArcGIS JS API

I am using a Map service on ArcGIS Server 10.4.1 which is in this format Spatial Reference: 102100 (3857) Single Fused Map Cache: false Initial Extent: XMin: -9819759.37726215 YMin: 5128008....
0
votes
0answers
14 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 ...
2
votes
1answer
433 views

ArcGIS JavaScript API popup-show all attributes

I'm publishing services to ArcGIS server and I want to test them out in a simple HTML web map. I would like to create a pop-up window to test if the attributes are coming through. Since I will be ...

1
2 3 4 5
40