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
1answer
11 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
19 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
57 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
16 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
65 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
54 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
94 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
135 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
37 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
32 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
60 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
47 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
32 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
84 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
12 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
36 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
36 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
146 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
89 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
40 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
134 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
51 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
72 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
189 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
88 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
18 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
105 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
49 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
67 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
73 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
86 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
50 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
85 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
93 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 ...
1
vote
1answer
172 views

Is it possible to add vector tile layer published by GeoServer layer using ArcGIS JS API?

GeoServer can publish vector tile layer in format of “application/x-protobuf;type=mapbox-vector”, and I believe the ArcGIS JavaScript API supports this format. So is it possible to add vector tile ...
1
vote
1answer
89 views

Proxy serverUrl with GP Service that has parameters?

I have a proxy that requests for services get routed through. This is working great for my map services, however I have geoprocessing services as well that must be accessed using the proxy. These ...
0
votes
1answer
50 views

How to push objectIds' array to RelationshipQuery's object in ArcGIS API JavaScript 4.9?

I need to push array of the object IDs to RelationshipQuery's object using executeForIds that generates the array. I also used executeRelationshipQuery that executes the query. I don't not why, but ...
1
vote
1answer
43 views

Stuck on getting proxy to work

I'm using JavaScript API 3.24 for reference. I want my application to automatically allow users to access secured services based on background authentication via a token (this way they don't need to ...
3
votes
1answer
370 views

Feature Layer will not refresh ArcGIS Javascript API

I am trying to integrate live point data (worker locations) from Workforce for ArcGIS into a Javascript web app that I am building. The layer loads fine and displays on the map properly, it even ...
0
votes
1answer
94 views

Using ArcGIS JavaScript to calculate length of line feature where clicked

I am working with arcgis JavaScript API and a linear referencing feature. I want to be able to click on a line of a feature and calculate the length from beginning of the line to where I clicked. Then ...
1
vote
0answers
30 views

How to Get Client Credentials When User is Already Logged Into Server Directory (ArcGIS JavaScript 3.25)?

I'm working on an ESRI JavaScript App. My app needs to support OAuth2 authentication. The code below shows how the client logs in and how I get the client's credentials. What I need is the token ...
2
votes
1answer
102 views

ESRI ArcGIS routing API extremely slow compared to other providers

I'm implementing a wrapper that requests route information from different geospatial / GIS API providers. Input is always two or more waypoints (latitude, longitude pairs). It is not my goal to do a ...
1
vote
1answer
71 views

Displaying WMS sublayers on ArcGIS JavaScript

I want to display layers of a WMS service containing sublayers on ArcGIS using JavaScript 3. No layers appear, but the WMSLayer is marked as loaded. the WMS is described here: data shom WMS My code ...