Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

2
votes
1answer
14 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
0answers
23 views

ArcGIS JS API Info Popup [on hold]

I'm looking to make a pop up info window when a user click on a feature(polygon). The style I'm looking for, resemble the pop up that Google have when search for Speed Test in Google search and click ...
0
votes
2answers
44 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
18 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
58 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
0answers
12 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
27 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
44 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
25 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
38 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
15 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
21 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-...
0
votes
0answers
12 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
16 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
1answer
49 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
40 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
22 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
50 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
101 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
16 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
0answers
47 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
100 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
27 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
55 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
29 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
15 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
10 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
7 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
13 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
12 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
13 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
21 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
53 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
35 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 '...
1
vote
1answer
46 views

Failed to load ArcGIS JS API polar satellite map

I am trying to draw satellite map with polar (Arctic) projection using ArcGIS JS API. Firstly I load default (Mercator) satellite map and it works fine. Then I change map spatialReference to polar the ...
0
votes
1answer
9 views

Is it possible to put multiple pages in an InfoWindow - ArcGIS API 3.27

I noticed that when you use IdentifyTask to identify features at a given point on the map, it shows an InfoWindow with multiple pages. I was wondering if it was possible to add pages to an InfoWindow ...
0
votes
0answers
16 views

Using Identify with imported layers - ArcGIS API 3.27

I am trying to figure out how to use the Identify tool with imported layers from a computer. I have tried to see if it is possible to use IdentifyTask, but it requires a URL from the layer to use. I'...
0
votes
0answers
45 views

On click GeoServer WMS layer features in ArcGIS JS API

I am consuming a GeoServer WMS layer in ArcGIS JavaScript API. I am successfully able to display layer. Now I am not able to get layer info on map click or layer click. Below is code using to add ...
0
votes
0answers
14 views

Firing event after ElevationProfile has fully loaded - ArcGIS API 3.27

I am trying to avoid throwing errors when the widget is opened and closed too fast (doesn't get a chance to fully load, so the process gets interrupted and throws an error). However, I can't seem to ...
1
vote
1answer
59 views

Submitting job for GP Service?

I want to pass a feature service as an input(Input parameter type -GPFeatureRecordSetLayer) to a geoprocessing service. can anyone tell me a sample code? I read all the relevant questions available, ...
0
votes
1answer
39 views

Is there a way to remove a GraphicsLayer from the map? - ArcGIS JS API 3.27

I am attempting to remove a GraphicsLayer that was added into the map. This GraphicsLayer was added with var resultsGraphics = new GraphicsLayer({ id: 'resultsGraphics' }); after a map tool is opened, ...
1
vote
1answer
60 views

Selecting multiple features with rectangle using ArcGIS API for JavaScript?

I am using ArcGIS API for JavaScript 3.7. I am trying to see if I can select features in the same fashion that shift+click and dragging lets you zoom into the map by drawing a rectangle. The trouble ...
0
votes
0answers
10 views

InfoTemplate moving between features with arrows is not click event. How to handle?

I have a click event that fires and sets content for the InfoTemplate when the feature is clicked. When a feature that overlaps with another feature is clicked, the InfoTemplate appears the ...
0
votes
1answer
29 views

Dictate placement of InfoWindow - ArcGIS 3.27 API

Is there a way to dictate on which side of the point the InfoWindow shows up? I have tried using map.infoWindow.show(location, InfoWindow.ANCHOR_UPPERRIGHT) thinking that this would make the window ...
2
votes
1answer
109 views

ESRI Web Appbuilder developer edition vs JavaScript API

What is the benefit to using one over the other besides the out of the box widgets and functionality offered by Web AppBuilder? If you can customize the code in Web AppBuilder, what really is the ...
2
votes
1answer
36 views

ArcGIS Javascript API - Use array of values for breaks in Class Break renderer instead of a range for a Dynamic Layer

I'm trying to use ClassBreak renderer in ArcGIS API v3.27. I have a dynamic layer with ZIP as one of its fields. I would like to add breaks based on the ZIP value. But the class breaks usually don't ...
0
votes
1answer
31 views

Better way to change the color of a graphic without affecting future graphics - ArcGIS JSAPI 3.X

I am trying to see if there is a better way to highlight a graphic in the map when you click on it. I currently have a layer of railroad tracks in the US and the project is to come up with a way to ...
1
vote
1answer
51 views

Add link to function in InfoWindow without overriding 'Zoom to' - ArcGIS

I am trying to see if there is a way to add a link in the InfoWindow that fires a function in JavaScript. I'm working with a map that shows rail lines in the US and the idea is to store selected lines ...
0
votes
0answers
7 views

Feature is not visible on map via ArcGIS JS API

I can not see my feature on the map. What can be the problem? Here is my code. `layerDefinition = { "geometryType": "esriGeometryPolygon", "fields": [{ "name": "PROPIN", "...
5
votes
0answers
105 views

Authorizing a user logged in via ArcGIS Online/Javascript in a Python server [closed]

So, let's say I have this application built via WebAppBuilder, the user is already logged in via a ArcgisOnline organization, but I have a separate python server that does some custom geoprocessing ...