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
55 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
49 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
389 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
98 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
36 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
103 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
81 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 ...
1
vote
1answer
207 views

How do I add use a method to add a FeatureLayer to a Map?

I'm using Angular 6 with the ESRI API for JavaScript 4.9. I have a working application but now it's time to refactor and make this project more polished. I have a series of FeatureLayers added to the ...
0
votes
1answer
237 views

Printing secured services

ArcGIS Server Version: 10.4.0 ArcGIS JS API: 3.25 ArcGIS Desktop: 10.2.1 Browser: IE 11 In my web application, I am consuming secured services and have a requirement to print the map contents. ...
0
votes
1answer
147 views

Dynamically changing spatial reference using ArcGIS API for JavaScript?

We have a web application that has tiled layers published in GCS. We want to publish a replica of the layers in a different projection system such that : When a user is at a specific zoom level, ...
1
vote
1answer
250 views

How to use filter on the Search widget in ArcGIS JS API 4.9?

var searchWidget = new Search({ view: view, includeDefaultSources:false sources: [{ locator: new Locator({ url: "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"}), ...
0
votes
1answer
335 views

Limiting the search widget results to a country in ArcGIS JS API 4.9

I'm using the Search widget in the 4.9 version of the javascript API. Can I limit the results to a given country when using the default geocoding service?
0
votes
1answer
238 views

Creating animations with goTo and extents using ArcGIS API for JavaScript?

I am using the ArcGIS API for JavaScript. Right now, I am trying to change the extent of a view dynamically. <script> var view; var new_ext; require([ "esri/views/MapView",...
0
votes
1answer
79 views

ArcGIS server can not be used in Mobile browser and Firefox browser/ ArcGIS Javascript

I am using ArcGIS JavaScript API to develop a web page to consume services from ArcGIS Server. The page loaded good in Chrome browser but not work for Firefox, and also both Android and Safari mobile ...
2
votes
1answer
269 views

Using Esri Proxy for Javascript API?

I am using the Esri proxy to avoid CORS issues as I am testing against clients data held on another domain. The wierd issue I am having is that WFS data only seems to work via one route, whereas ...
0
votes
1answer
343 views

Using Extent and SpatialReference with ArcGIS API for JavaScript?

I am trying to display an ArcGIS Map on my webpage. Whenever I try to use the 'extent' Attribute next to the 'center' and 'zoom' Attributes, I get the following error: GET https://js.arcgis.com/4.8/...
1
vote
0answers
273 views

Getting ArcGIS API for JavaScript to work in Typescript application using Webpack?

I am trying to incorporate the arcgis-js-api into an Angular2/Typescript application I am developing in Visual Studio 2017 using Webpack. I have not been successful in getting it work. I've gone ...
0
votes
1answer
144 views

Cannot load MapService from ArcGIS Server in Javascript API

I am trying to put together a very basic sandbox app to load data from a public ArcGIS Server MapService using the Javascript 3.5 API. However I keep getting the a 400 return status with the error "...
0
votes
1answer
114 views

How can I publish a standard ArcGIS basemap on local server?

Is there a way to publish/install a standard basemap (topo, streets, etc.) to a local ArcGIS server? I have an app using the javascript API, that is running in an environment that cannot connect to ...
5
votes
1answer
290 views

Drawing geometrical shapes with dimensions using ArcGIS API for JavaScript?

I have to draw the geometrical shapes with their dimensions and show it with that shape. As in below images, I want to show the length and width of the rectangle, the radius of the circle and the ...
0
votes
1answer
93 views

ArcGIS Javascript API returning value to popup from function

I'm creating a custom pop-up where I send the attribute table value into a function to reformat it. It's called like so: var herbicide = '${Herbicide1:herbName}' It then enters the function like ...
1
vote
1answer
44 views

Add map layers during runtime ESRI Javascript API

I had a look through the ESRI js API (version:3/4) and examples on ESRI's page but I couldn't find something like an "add map layers from ", where the source is any reachable map service, WMS or ESRI ...
0
votes
0answers
146 views

How to Add Animation to ArcGIS JavaScript API Cluster Layer Breaks

Can you please take a look at this demo snippet and let me know how I can add animation to cluster breaks on zoom in out? As you can see in the demo cluster symbols disappear on zoom in, out and re ...
0
votes
1answer
50 views

Not able to render simple marker render on feature layer

Can you please take a look at this demo and let me know why I am not able to add the simple render / Simple Marker to the map for feature layers <script> require([ "esri/map", "esri/...
0
votes
1answer
116 views

ArcGIS: Adding labels to 2D FeatureLayer in JavaScript 3.25

Is it possible to add labels to a 2D FeatureLayer in ArcGIS using the JavaScript 3.25 API. I can only find examples that use Javascript 4.8 and 3D scenes. The following code doesn't show anything: ...
1
vote
0answers
291 views

Bring KML via localhost url into ESRI js app also hosted locally

I have brought over one of the demos ESRI javascript apps and hosted that on my local IIS instance. I also have a folder I have turned into an application via IIS, so I have the following: The file ...
0
votes
1answer
173 views

ArcGIS: Get layer by name using Javascript API and modify it

I'm very new to ArcGIS and I'm developing a custom widget in the ArcGIS WebApp Builder that will allow me to change the style attribute of a specific layer in my map. To manually change the style ...
1
vote
0answers
110 views

Feature Layer not showing up when adding an automatic rotation function to SceneView

I am building a simple web application using the ArcGIS API for JavaScript (4.x). I created a map with an associated FeatureLayer and then a SceneView and everything works fine. However, I'm trying to ...
0
votes
1answer
92 views

ArcGIS Server - Print Map aynschronously using Map_Only template

I'm trying to print a Map asynchronously using the ArcGIS printing tools. I'm successfully able to print the map using any template other than "MAP_ONLY". When i use "MAP_ONLY" template i get this ...
0
votes
1answer
740 views

Uncaught TypeError: FeatureLayer is not a constructor

I am trying to test adding a clickable layer to a web app. I am just using a test layer from arcgis online rest services shown in a tutorial. When I try to add the layer using esri/FeatureLayer I, get ...
1
vote
1answer
21 views

How to query areas from DynamicMapService Layer…?

I have two dynamicMapServiceLayers, I have to query the area where three dropdowns are there. From a districts dropdown I have to select one district according to that mandals should be loaded to the ...
0
votes
1answer
77 views

ArcGIS JavaScript choropleth map with custom data

I am using ArcGIS JS API for creating a different type of maps. I am pretty much clear on how do I create point maps using Lat/Long fields. But I don't seem to get a way to create choropleth map like ...
1
vote
0answers
26 views

Using ArcGIS API for JavaScript 3,X Directions widget?

Can I select only one country in the Directions widget in ArcGIS API for JavaScript 3,X? For example: I want to select only UK. If the user writes Spain he will find nothing.
0
votes
1answer
41 views

ArcGIS Routing service using two locations?

I was going through the routing example Simple Routing which works on map click event. I am bale to replicate the same but instead of click I want the routing to take place using 2 different x,y. Is ...
-1
votes
1answer
41 views

Unable to access the ArcGIS JavaScript application in local host

My organisation has multiple ArcGIS JS API (3.13) applications. Those are working fine and good. I am new to GIS technology and I want to add more features to the applications which are already ...
0
votes
1answer
105 views

How to implement search tool get values in dropdown ArcGIS JavaScript 3.x

How to get point? When search button clicked i am trying search button click to go to point in ArcGIS JavaScript my code is this. How to push the values into search button? <script type="text/...
0
votes
1answer
190 views

Adding multipoint to feature layer using ArcGIS API for JavaScript?

I want to display a marker whenever I receive websocket message but with this code I can only display the first point and then when I receive the second message I can't display it. socket.onmessage = ...
0
votes
1answer
83 views

ArcGIS JS API 3.x: How to open a Info Window programmatically

I'm working on a geographic application using the ArcGIS JavaScript API 3.x. I am looking for a method that runs when a user clicks on suggestion Menu in the Search Bar for showing a specific feature ...
0
votes
1answer
43 views

Nothing is highlighted using print service

I have an Esri map with print service enabled. I would like to print a map based on objectid of a feature layer. The following is my Web_Map_as_JSON. { "mapOptions": { "showAttribution": ...
0
votes
1answer
260 views

Using Vector Tile Maps Offline in a Hybrid App (ArcGIS API for JavaScript)

I will create a hybrid map by using ArcGIS API for Javascript. I want to use my own hosted vector tile basemap as offline. What do you advise? Are there any ways to use ESRI Vector Tile Package (....
0
votes
1answer
102 views

ArcGIS Server - Print Map Task result retrieving

I have an application where i'm printing a map on one page and would like to display the result in a PDF when the user goes to the summary page. The print task takes about 4-5 seconds to return the ...
0
votes
1answer
26 views

How to get the most current data from a Temporal Feature Service?

I have created a Temporal Feature Layer on our ArcGIS Server, which records all the locations, along with timestamp & other attributes of moving vehicles. I used the TimeSlider Sample, to create ...
-1
votes
1answer
25 views

What is the process for using data in various projections with the ESRI JS API v4.8?

We have an extensive collection of GIS data sitting in ArcSDE, exposed via map and feature services, and already in a regional (projected) coordinate system. We are starting to explore building web ...
1
vote
1answer
20 views

How do you retrieve a single attribute from a feature layer by clicking on it using ArcGIS Javascript API v3.2?

I am building a map that you can hover over and click on. I need to access a feature's project number (ProjectNum) when I click on it, but my click event on the layer doesn't seem to be firing. When I ...
0
votes
1answer
95 views

No manifest.json or widget.html file for WAB app

I want wanted to configure a select widget in my WAB code on my local to have only the selectBy Polygon instead of the out of the box SelectBy square settings. So I created a new WAB app with those ...
0
votes
1answer
443 views

Adding API JSON data to ArcMap [closed]

I want to add data from an API (census.gov - https://api.census.gov/data/2016/acs/acs5/variables.json) to ArcMap. How do I do that? If I have to publish it on ArcGIS Online first, I can do that but I ...
1
vote
1answer
55 views

ArcGIS JS - Printing with private layers

I have a map built using ArcGIS JS API v4.8. The map has a basemap and FeatureLayer that are both secured by a custom API and a server-side proxy. I'm looking to make use of the Printing widget, but ...
2
votes
1answer
68 views

Converting lats and longs to centerpoint in ArcGIS API for JavaScript?

I'm working on a angular 2 website using the Arcgis API 3.24. I'm fairly new to ESRI and I was wondering how I could convert a extent that has values of spatialReference : {wkid: 4326} xmax:...
3
votes
1answer
229 views

Add new fields to the FeatureLayer dynamically - arcgis JS API Version 4.7

I've uploaded GeoJSON to Esri cloud and created a feature layer. Now I'm able to plot the featurelayer into my map. I'm trying to color each feature based on measures which comes from my DB. Here ...
2
votes
1answer
201 views

Layer on click event not firing in Firefox but working fine in Chrome,Edge

I am using ESRI JS API 3.24 in my application. I am using following code to open specific URL within the application when click on the layer. var lyrUrl = "Path_To_Layer"; var myLyr = new ...