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
0answers
10 views

Adding multipolygons to Graphic Object converts coordinates to longitude only using ArcGIS API for JavaScript?

I'm using an API to retrieve a multipolygon array where each element of the array is as follows: inZoneData[n] = { "geometry": { "coordinates": [[-108.42, 44.91], [-108.41, 44.87],...], "...
0
votes
1answer
28 views

ArcGIS JavaScript API Buffer Units from Dropdown

I am trying to create a buffer that will have the distance and units inputted by the user. I'm having trouble getting the JavaScript to recognize the which Unit of Measurement the buffer is being ...
1
vote
1answer
15 views

Why is the CSV Layer converting a Date-Time field to Unix Timestamps?

I am using the ArcGIS JavaScript API to add a dynamic map in my application. I am loading data through a csvLayer. The data looks something like this: Here's a snippet of me initiating the csvLayer: ...
0
votes
0answers
13 views

Display Feature Layer content on default popup ArcGIS Javascript API

I have a map that import a layer using the function var layer = new FeatureLayer( url: "https://xxxxxxxx" outfields: ["nom_cant", "nom_prov", "nom_distr"], ) Also I am using the default popup (...
0
votes
1answer
25 views

Map not centering on location after using search widget - ArcGIS API for JavaScript

Hello I am completely new to using the ArcGIS API for JavaScript 4.11. I am creating a basic app that uses a search widget. I use the search.on function to grab the latitude and longitude of the ...
1
vote
0answers
20 views

Access secure services from ArcGIS Portal with API JavaScript [closed]

I was reading this tutorial, that explains how to access secured services on ArcGIS Online. But I wonder if there is a way to do the same but with Portal and access my secured own data.
2
votes
1answer
45 views

Using Google Maps Restricting Bounds API with ArcGIS JavaScript API?

I am trying to make a map with ArcGIS 3.29, but in my map I need a bounding box. The ArcGIS API does not have a bounding box function, but the Google Maps API does. What I am having trouble with is ...
1
vote
0answers
20 views

Keeping TOC layers unchecked on first load in ArcGIS JavaScript API

I am new to ArcGIS and it's API. I am using NLiu's TOC widget for displaying the layers. It is working perfectly, however, I wanted to keep all layers unchecked when it is loading on the browser (for ...
1
vote
1answer
40 views

Unable to zoom using ArcGIS API 3.28

I've been trying to create a map and have it's initial zoom and center position be the query result's coordinates (a polygon, in this case) but it just refuses to zoom in, both using zoom in the ...
1
vote
1answer
33 views

ArcGIS JavaScript 3.28 extent not working

I'm trying to get an extent to work on a web map app but keep getting an error when trying to pass the extent parameter: <!DOCTYPE html> <html> <head> <meta http-equiv="...
0
votes
1answer
34 views

Creating bounding box in ArcGIS API for JavaScript?

I am trying to create a bounding box for my map in ArcGIS 3.28. I want the bounding box to stay in a given area based on the coordinates given. I found a class called Extent in the API Reference that ...
1
vote
0answers
46 views

ArcGIS-JS-API failed to execute query

I'm trying to execute this (it's JavaScript but it doesn't matter): queryTask.execute(query, function (results) { and I get an error: Failed to execute query These are the parameters: var ...
-1
votes
0answers
22 views

ArcGIS API for JavaScript - Transition from Scene View to Map View

I am working on development with the ArcGIS API for JavaScript 4x. I am seeking for a solution to improve the transition from a Scene View to a Map View? Could anyone please guide me how to have a ...
2
votes
1answer
33 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
vote
1answer
16 views

esri/dijit/editing/AttachmentEditor use proxy when viewing attachments

I'm trying to figure out why the ArcGIS JavaScript API AttachmentEditor does not use a proxy when viewing attachments. I have my proxy set up correctly, and it uses it in every other situation but ...
0
votes
1answer
30 views

How to filter a csvLayer based on attributes?

Ill start out by just explaining what I'm trying to achieve. I'm running an arcgis application based on the javascript API. I'm Rendering a CSVLayer into my SceneView like such: require(["esri/Map", ...
0
votes
0answers
14 views

Failed to complete the task about the ServiceAreaTask

When I am trying to do the task about the ServiceAreaTask, the callback can not be executed. This is my code: <html> <head> <meta charset="utf-8" /> <meta ...
2
votes
1answer
19 views

ArcGIS JS-API click on Graphic and exceute code

Currently I can click on the GraphicsLayer and I can see an array of all my Graphics added there. const layerMarkers = new GraphicsLayer({id: layerId}); this.map.addLayer(layerMarkers); const graphic ...
0
votes
2answers
101 views

How can I convert KMZ file to JSON?

I'm writing a ArcGIS JS project, in which user will upload KMZ which will be displayed on map, since ArcGIS doesn't have a magic trick to do it, I want to convert KMZ to JSON (or KML) and then display ...
0
votes
1answer
30 views

ArcGIS JavaScript API: map loads after pan

I'm using this.mapa.map.centerAndZoom(center, zoom); with 2 different zooms, 4 and 5. loadModules([ 'esri/geometry/Point', ]).then(([Point]) => { switch (evt....
1
vote
1answer
95 views

ArcGIS API 4.11 JavaScript - “Click” “drag” stopPropagation()

Using JavaScript in the ArcGIS API, I am querying a feature layer from a Map View, calculating points within a certain radius when the user "click" "drag" with the mouse. I want to be able to stop ...
0
votes
1answer
19 views

How to implement search in a graphics layer?

There is a method that accepts JSON data. Based on this data, points are created and added to the graphics layer. How to implement search in a graphics layer? I found an example of how to implement ...
0
votes
0answers
28 views

ArcGIS Map export fails with when using scaleDependentRenderer

I am using ArcGIS javascript API 3.11 so as to call a map export service (printTask). This used to work fine, until I decided to print a graphics layer with a scaleDependentRenderer. The ...
0
votes
1answer
65 views

Why does Uncaught TypeError: Cannot read property 'trim' of undefined occur in esriRequest

I am trying to use esri/request to pull in some data from an API. I am have two weird problems. First, when I try to run this, it doesn't complete and throws the following error in the browser console:...
2
votes
1answer
40 views

Web AppBuilder custom widget how to add third party node modules?

I know that ArcGIS Web AppBuilder Desktop is built using Node.js Is there any way we can add the third party node.js modules in Web AppBuilder Desktop using the npm command and then access these ...
0
votes
1answer
39 views

Creating\rendering a heatmap not showing up

I am having a problem rendering a heatmap. I am sure the heatmap is created but it doesnt display when I replace or add a renderer. var TF = new FeatureLayer({ url:"https://services3.arcgis.com/...
2
votes
0answers
18 views

Issues with ArcGIS Web AppBuilder creating custom widget by inheriting existing widget

I am trying to extend the inbuilt Select widget in the ArcGIS Web AppBuilder for Desktop using dojo. According to the documentation by ESRI we always inherit the 'dijit/_WidgetBase' module to create ...
1
vote
0answers
24 views

How to add GeoServer vector tiles in ArcGIS using ArcGIS JS API

I am trying to display vector tile layers from GeoServer in ArcGIS using JavaScript API. I have referred this.here they have used tegola service but i want to add "application/x-protobuf;type=mapbox-...
2
votes
1answer
18 views

Adding featureSet into a featureLayer (dynamic renderer)

I'm trying to use a renderer and a legend on data from a featureSet, it displayes symbols and popups but the renderer fails. The data comes from a featureLayer but I display it with view.graphics so ...
0
votes
1answer
19 views

Building a dynamic querytask 4.11

Learning the js api i tried to make a querytask that will query a layer and update graphics on change. I think the problem is in my success("succ") function. I made this codepen: https://codepen.io/...
3
votes
2answers
60 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
43 views

Adding ArcGIS JSAPI code to Existing Angular app?

I am new to web dev. coding. I managed to scrape together some code for a simple web GIS app. using ArcGIS Javascript API version 3.xx. The ArcGIS JSAPI app has some simple functionality like a click ...
0
votes
1answer
23 views

ArcGIS JavaScript API not drawing points at proper distance?

I have an ArcGIS map created using the JavaScript API (version 3.23). I have coded it so I can add points by clicking on the map (I simply create a point object at the mapPoint of the mouse event on ...
1
vote
1answer
76 views

ArcGIS API JavaScript 4.11 - Query Statistics Returning 0 Value

I'm using the Javascript example below from the Developers ArcGIS site (4.11), to feed in my own data. I've trimmed down the code to only populate the the titleContent (0), getting rid of all the ...
3
votes
2answers
105 views

Understanding Promises in JavaScript?

I have been using JavaScript for about a year and a half now, but I still have a fundamental misunderstanding of Promises and can never get them to work. Can someone tell me what is wrong with this ...
0
votes
0answers
23 views

How to execute event on dojo dialog created dynamically?

I am working on draw Tool add Text as graphics on Map.I have created tool and when user click on Map I am showing dialog on map screen. Now, I would like to get text values and dropdown select values ...
1
vote
1answer
92 views

Emitting map click using ArcGIS API for JavaScript?

I am trying to emit a map click from the MapView object using its emit method. I have successfully done this in the 3x API from the Map object. This same method, however, is not working for me in the ...
0
votes
1answer
167 views

ArcGIS JS API Failed to load feature layer

I want to add test feature on my ArcGIS map using feature layer. I create layer using Graphic as a source. After a lot of googling I create my point the following way: require([ "esri/Map", "esri/...
0
votes
1answer
33 views

Get extent from layer in ArcGIS MapServer - ArcGIS API 3.28

I was wondering if it is possible to retrieve the extent of a layer from an ArcGIS map server? I have already tried using the following code: var url = 'https://fragis.fra.dot.gov/fragis/rest/...
0
votes
1answer
78 views

ArcGIS JS API SimpleMarkerSymbol is not a subclass of Layer

I have polar ArcGIS map and want to display my own data on it. I will get data using AJAX REST queries to my server. As I understand, it isn't commonly used way to get data in ArcGIS, but presenting ...
1
vote
1answer
30 views

Get data from Esri ArcGIS MapServer API

I'm trying to get a list of the recent earthquakes, with latitude and longitude from this API: https://apps.pdc.org/msf/rest/services/global/pdc_active_hazards/MapServer/6 I can't rely on a server-...
0
votes
0answers
17 views

View the output of GP Server

My geoprocessing tool has 2 inputs 1 output. 1st input parameter type is a feature layer 2nd input parameter type is a String 3rd output parameter type is a shapefile when I run it, the window was as ...
0
votes
0answers
12 views

Why is my QueryTask not reflecting recent feature changes?

I am using ArcGIS for JavaScript v.3.27 with a REST server running v.10.31. I typically develop on Firefox 66 but I test on other browsers. The behavior I describe here has been verified in Firefox ...
0
votes
0answers
11 views

What could be causing my new Features to not have the event handling for that Layer (until reload of page)?

I am using ArcGIS for JavaScript v.3.27 with a REST server running v.10.31. I typically develop on Firefox 66 but I test on other browsers. The behavior I describe here has been verified in Firefox ...
0
votes
0answers
15 views

Automatically Panning Map using ArcGIS API for JavaScript?

I have a ArcGIS map loaded with some data. Right now to move the map to some location am updating x and y of event.mapPoint, this is affecting other functionality. Can you suggest any functionality ...
0
votes
1answer
13 views

How to find the size of the ArcGIS map when the map takes up less space than the containing div (zoom=0)

I've been digging through the ArcGIS map trying to figure out how to find the size of the map. The map object has width / height but those are the containing div and not the width / height of the ...
0
votes
0answers
16 views

ArcGIS toScreenPoint not working

I have a lat / long and I'm trying to convert that point to a screen point (the pixel location on the current map). Current version of arcgis-js-api: "3.24.0". Here is my implementation: var point = ...
0
votes
0answers
26 views

ArcGIS Javascript API - Service to delineate watershed and calculated zonal statistics won't draw results

I am trying to calculate the average raster value over a watershed boundary. I have published a geoprocessing service on geoserver that works when accessed in ArcMAP. The user clicks a point and then ...
0
votes
1answer
62 views

Is it possible to import a KML to the map? - ArcGIS API 3.27

I am trying to see if it is possible to upload a KML layer to display on the map. I have looked into using KMLLayer, but that requires a public URL to load in, and I can't use the file path of the ...
0
votes
0answers
44 views

'Cannot read property '_getInfo' of undefined' error when loading layers - ArcGIS API 3.27

I am having trouble diagnosing where this error is occuring. The error is thrown when you start the web application, while the ArcGIS API is loading in the map layers. It seems to be thrown in the '...