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

1
vote
0answers
12 views

Emit map click using Esri 4x JS API

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
23 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
15 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
21 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
23 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
10 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
9 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
12 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
9 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
9 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
15 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
33 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
15 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
33 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
6 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
10 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
25 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
13 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
53 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
27 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
29 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
8 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
25 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
79 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
31 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
30 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
38 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
6 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
98 views

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

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 ...
1
vote
2answers
29 views

Retrieve coordinates of selected feature with the ArcGIS API for JavaScript

I am currently working with the the ArcGIS API for JavaScript and I have delved into ArcGIS API for JavaScript currently for a weeks, so I am not that familiar with the ArcGIS API for JavaScript. ...
0
votes
1answer
31 views

Getting MapView to stay within bounds

Working with a map to only allow panning within a certain set bounds. In my case I want the application to allow the user to pan around just within the bounds of a specific Island. So far I can only ...
0
votes
1answer
34 views

How to convert graphic to JSON string [closed]

I draw the circle on the map. The circle tool is taken from ArcGIS API for JavaScript draw tool. How can I convert that circle into JSON string.
0
votes
1answer
8 views

JoinDataSource ArcGIS Javascript API, how to do it?

I'm looking to join a table to a polygon layer and I can't get the fields to transfer over. I'm sure there's something in my syntax that's messed up, but I can't figure out what it is. The goal of ...
0
votes
0answers
26 views

Loop through all Entities in Layer

Lets assume we have a layer of parks. i was looking at a feature which allows me to iterate through all parks using next button. Actually the next button would loop through all parks one by one in ...
1
vote
1answer
34 views

Retrieve selected feature on ArcGIS Online as string?

For now I am trying to create a webmap with the ArcGIS API (4.x) for JavaScript. I have a bit understanding of the workings of JavaScript, however I couldn't find code in which it's possible to select ...
1
vote
0answers
30 views

ArcGIS JS API Popup does not show properly

This is regarding arcgis js api popups. when viewed in web the popups appear in good way, but when the browser is changed to mobile, the popups submerge below the screen. I would like to know how to ...
0
votes
0answers
49 views

WMSLayer not showing, ArcGIS JavaScript API

I've started to dabble in the JavaScript API for ArcGIS and I am having an issue with a layer I want to display. It's this WMS Layer: In the following code (mostly taken from the ESRI tutorial here), ...
0
votes
1answer
57 views

Custom pop-up for multiple results in ArcGIS Online application

I have a point layer that contains business locations where the businesses offer services from different providers. i.e. competing businesses. A customer is requesting a modified pop-up to display, ...
0
votes
0answers
25 views

Using ArcGIS API for JavaScript?

I recently started a project on MVC 5 and I am trying to use the javascript API from Arcgis. I used the API before in webforms in aspx pages and just normal html and it worked as expected. I amnow ...
1
vote
1answer
81 views

Getting halfway point in Polyline in ArcGIS API for JavaScript?

I would like to reach the mid point of a polyline. I just tried the centroid and realcentroid properties but I only got a soluction in ArcPy with the code below: Midpoint = geometry....
0
votes
1answer
47 views

How do I get the population by country when using the Esri Demographics Geoprocessing Service?

I am using the ArcGIS JavaScript API and Geoprocessing Services to get population. The service takes an input circle and returns the population inside. Some times, a circle can cover cover more than ...
1
vote
0answers
39 views

How to parse a shapefile with Esri JavaScript API and/or ArcGIS Server?

I'm developing a webapp that uses the Esri JavaScript API 3.xx (Dojo 1.x) together with an ArcGIS Server 10.6.xx. Until now I was parsing shapefiles in my Java backend that makes use of an offical ...
3
votes
1answer
140 views

HTTP Basic Auth Failure: Esri JS API

I am unable to prompt the Basic Authorization popup to appear using the Esri JS API with a Secured OGC WMS service. A concise description: Using a basic fetch request, with credentials: "include" ...
0
votes
0answers
31 views

Creating map based on image using ArcGIS API for JavaScript?

I want to make an image as a background map to my application. I am using ArcGIS API with JavaScript and all I could do is to add an Image Layer to this map map = new Map("map"); // create and ...
1
vote
1answer
69 views

Toggle ArcGIS Online WebMap Layers using Javascript?

I am taking an intro course on webmapping and am having some trouble figuring out how to set up a layer list and toggle layers on/off. I have already preconfigured 2 layers in a WebMap using ArcGIS ...
-1
votes
1answer
17 views

Using attribute inspector for ArcGIS JavaScript API?

I'm using the attribute inspector for ArcGIS JavaScript API. I don't know what code will I use, I want to have a dropdown box that is editable with options of red and green, if I select a box, the ...
0
votes
1answer
22 views

Hot spot analysis widget application programmed in JavaScript API is having trouble connecting to my portal

//Define the default inputs for the Hot Spot widget var hotSpotParams = { id: "analysisTool", analysisLayer: sex_offenders, portalUrl: "http://utdepps.maps....
1
vote
1answer
62 views

Set extent in a webmap Esri

I'm creating a storymap from a developers tutorial I found on Esri. The point of the tutorial is to insert an additional reference map. Everything is working well but I want the extent to closely ...
0
votes
1answer
36 views

ESRI JS API hosted locally but requests still go to https://js.arcgis.com?

In my current project we have hosted the ESRI JS API within the organisation's IIS. For most of the part the deployed application works fine, but we notice that certain calls are being made to ...