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
11 views

Installing JavaScript locally on federated ArcGIS Server

I am installing JavaScript locally on an ArcGIS Server that is federated with Portal and uses the Web Adaptor on the Portal machine. I am following the instructions here: https://support.esri.com/en/...
0
votes
1answer
17 views

Group layers in layer list

I'm new to ArcGIS API for Javscript V3, and trying to dynamically create group layers and add layers together in a existing layer list. I'm not sure how to get this done.
0
votes
0answers
23 views

Customizing legend in layerlist widget of ArcGIS API for JavaScript?

Here is an example code that I use in my work. There are a few issues with this: The layer title appears one more time in the legend of layerlist. How can I remove it or change to other text? ...
0
votes
0answers
8 views

Route Planning Tool for Runners When Given Start Point, End Point, and Distance [closed]

My orgnization has ArcGIS Enterprise 10.6.1. I also have ArcGIS Pro 2.4.1 and ArcMap 10.5.1. I also have most extentions available such as Network Analyst and Spatial Analyst. I would like to ...
1
vote
0answers
36 views

Using ArcGIS Online for public-facing site, while keeping source datasets private?

I would like to build a public-facing map using the ArcGIS Server JavaScript API, which will display datasets stored in ArcGIS Online. ArcGIS Online seems to work on the premise that all users have a ...
0
votes
2answers
38 views

Select all features from current map extent ArcGIS JavaScript 3.29

I am trying to select all the features which are present in the current extent of map i.e which are visible on screen. I find this link helpful but it iterates through all the graphics and check if ...
0
votes
0answers
37 views

esriRequest error No 'Access-Control-Allow-Origin' header is present on the requested resource

I have an API that uses Basic Authentication (Username, Password). I am trying to use this in an esriRequest to pull back the JSON data object from the GET request. To test this (and potentially avoid ...
1
vote
0answers
18 views

GeoJSON Layer - ArcGIS JS API - External URL with oAuth2.0

I am using ArcGIS JS API and connecting to an external GeoJSON service for my GeoJSON Layer. However, for security reasons oAuth2.0 has been enabled on the service. So now I am lost as to how to ...
2
votes
0answers
60 views

Esri mapview USGS earthquake trigger popup from outside of map

I am trying to show some recent earthquake information in Esri maps using USGS earthquake API data. I am able to fetch the list from API data and also I got the map with those listed information ...
1
vote
1answer
25 views

ArcGIS JavaScript API set size of CSV Marker by attribute

Using ArcGIS Javascript API 3.29 is it possible to set the size of a CSV Layer marker using a field value through the renderer? Using this EXAMPLE in their samples, they add a CSV layer to the map ...
0
votes
1answer
34 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
19 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
15 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
35 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
24 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
53 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
22 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
45 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
36 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
41 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
52 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 ...
2
votes
1answer
38 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
19 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
33 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
203 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
31 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....
2
votes
1answer
128 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
22 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
29 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
132 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
57 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
40 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
23 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
23 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
68 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

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
24 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
87 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
111 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
27 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 ...
2
votes
1answer
145 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
241 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
38 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
102 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
31 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 ...