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
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
19 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
29 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
74 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
57 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
62 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
13 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
21 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
91 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
18 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
66 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
69 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
122 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
12 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
30 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
164 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
44 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
34 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
72 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
106 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 ...
1
vote
2answers
66 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
39 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
117 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
14 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
50 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
42 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 ...
1
vote
0answers
166 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
113 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
43 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
2answers
157 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
52 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
79 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
203 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
32 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
95 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
20 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
26 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
107 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
50 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 ...
2
votes
1answer
72 views

ESRI Search Widget - Alter Search Parameters (ArcGIS JS v4.9)

The Search widget within the ArcGIS JavaScript API (v 4.9) works by returning all records that contain your search string. In other words, if you search for "123" You'll get "123 S Main St", "5123 W ...
2
votes
1answer
80 views

Chart JS chart not rendering in ArcGIS popup when using navigation arrows

I'm putting a chart in the popup of my points. On the initial click, the popups display the chart and if I use the forward navigation arrow on the popup, the next chart renders. However, if I use the ...
0
votes
1answer
95 views

Setting up localhost in proxy service for ArcGIS Javascript API 3.x

I have a proxy service (DotNet) that works great in my production environment but I can't use it in my development environment. Obviously I really need it to work in my development environment because ...
0
votes
1answer
52 views

Mixing a base map with a layer

I am trying to load a base map (streets) and have a feature layer from the arcGIS online system. I can view the base map, but I am receiving a few errors when i try to combine the base map and ...
-1
votes
1answer
105 views

Turn visible feature layers to invisible in ArcGIS-JS-API 3.x

I'm trying to turn all visible feature layers to invisible in a map using Javascript and jQuery by clicking into an element. What is wrong with the following code? $("#grayPic").click(...
2
votes
1answer
102 views

How to get mapPoint z coordinate by Lat and Lon

Please see the map on: https://codepen.io/stzdzyhs/pen/WamYav the whole code is also inserted below. When click on the scene(A IntegratedMeshLayer), it can show the Lon, Lat, and Z values in the ...