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
1
vote
1answer
275 views

Esri js api 4.6 fires animation event on fast drag

We are having a problem with fast drag event on the new esri js 4.6 api. When a user drags the map too fast, the map extent's changes rapidly. I've detected that on a fast drag, there's an animation ...
1
vote
1answer
122 views

Authorize app but also sign in user into ArcGIS online

I request authorization for my app through OAuth as described here: https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/browser-based-user-logins/ The sign in dialog ...
1
vote
1answer
91 views

How to add a few points to an external esri map using iframe and javascript

There is an external map on : https://gis.apcrda.org/lps/index.html i have iframed it using this code in my html page :- <iframe id="crdamap" width="500" height="...
0
votes
1answer
456 views

message: “string.substitute could not find key \”loadingState\“ in template” esri javascript 3.23

I am trying to add a measure widget from the esri samples and I get the following error. I am using boostrap.css and I am wondering if this has an effect on widget loading. <div class="container-...
1
vote
1answer
259 views

Extending line by specified distance in ArcGIS javascript

I have a web application where I need some functionality to draw two points that is the start of a line, and then extend that line to a given length (that is given by a number in meters). I know how ...
0
votes
2answers
169 views

Client-side 3D surface generation in ArcGIS JS API

Is there any way to create some sort of 3D surface (mesh, TIN, elevationLayer) from contour lines on the client side with ArcGIS JS API? Or alternatively edit a hosted 3D surface (any format)? In our ...
1
vote
1answer
104 views

ArcGIS Print Javascript API return syntax error after installing SSL certificate

I've been facing problems with my printing service using ArcGIS JavaScript API 3.22 and ArcGIS server 10.1 after installing SSL certificate on the ArcGIS server. The printing service return the ...
1
vote
1answer
38 views

How can I further query the result of an Esri REST endpoint query in JavaScript?

I am querying Esri REST endpoint to get features from a dataset, but how can I further query the resultset that comes back without making a call back out to the server? I make an initial js call very ...
0
votes
1answer
652 views

How to trigger a Graphic's click event when it gets added to map?

I'm using Esri Javascript API 4.5 When the map loads, I'm fetching point coordinates from external source and then plotting it on the map using Graphic class and assigning a PopupTemplate to that ...
1
vote
0answers
171 views

gpTask: ERROR 000735 Value is required (Input KML, DataFile)

I have a Python script tool running perfectly on the ArcGIS server. Trying to run the tool in a web application (JS API 4.6) with the same input KML-file (published on a publicly available webserver). ...
1
vote
1answer
150 views

Adding Animation/Smooth Pan On Setting New Center on ArcGIS JS API Map

Can you please take a look at this demo and let me know how I can add smooth animation or Pan function to move to the destination? As you can see I am trying to re-center the map center by map....
2
votes
1answer
233 views

ESRI JavaScript API - Using WebGL

I am building a dojo app using the ESRI JavaScript version 4.5. I built it using these instructions from ESRI: https://developers.arcgis.com/javascript/latest/guide/using-bower/ I'm trying to ...
0
votes
1answer
76 views

Add Photo Image to ArcGIS Online, need to format the url

I would like to delete the last 10 letters of a URL to use in ArcGIS online to show photos in the popup. Any suggestions? I have seen people put JavaScript in the image configuration settings to get ...
1
vote
1answer
158 views

How To Display Service Flow Direction Graphics on User Side( JS API or AGO)

Using ArcGIS Server 10.4.1 I am publishing a Service which has Flow Directions on it like but when consuming in ArcGIS online or even on ArcGIS for JavaScript API Application I am getting lines ...
0
votes
1answer
608 views

How to Select Graphics From Graphics Layer Inside a Clicked Circle

Can you please take a look at This Demo and let me know how I can get geometry of selected Graphics which are inside the clicked circle extent var map; var baseCircle; require([ "esri/map", "esri/...
0
votes
1answer
76 views

Edited features only store edits upon map refresh

I am setting editing toolbars for features on my map as follows: for (var graphicNum = 0; graphicNum < graphicList.length; graphicNum++) { if (graphicList[graphicNum].symbol != undefined) ...
0
votes
1answer
965 views

Calculating Distance Between Two Give Points using ArcGIS API for JavaScript 3? [duplicate]

Using ArcGIS API for JavaScript 3.22 and having two given Points as var pt1 = new Point(-106.61, 35.1107, new SpatialReference({ wkid: 4326 })); var pt2 = new Point(-108.61, 35.1107, new ...
0
votes
2answers
147 views

Displaying a line-chart along with some text fields inside a popUpTemplate.

I am building a sample web-mapping application using the ESRI 4.5 API. I have a single marker with a popUp on it. When an user clicks on the pop-up I want some text fields along with a line chart ...
1
vote
1answer
130 views

How to set Barriers route parameters

I am using the ArcGIS Javascript3.22 API routeTask to determine the route around polygon barriers. How do I properly define the polygon barriers? What I have tried is: routeTask = new RouteTask("...
-1
votes
1answer
190 views

Graphic Is Not Adding to The Exact Snapping Point

Can you please take a look at this demo and let me know why the added graphic to the snapping feature is not exactly added on top of the feature. Please try the fiddle and add a Point to the map by ...
1
vote
1answer
302 views

Not Able to Enable Snapping Management on top of a feature service

Can you please take a look at This Demo and let me know why I am not able to set up and enable Snapping on top of following feature Service? What I need is snapping to all features in mouse hover/over ...
0
votes
1answer
83 views

Deactivating editing toolbar for multiple features

I am creating a toolbar for a number of features as follows: for (var graphicNum = 0; graphicNum < graphicList.length; graphicNum++) { if (graphicList[graphicNum].symbol != undefined) { ...
2
votes
0answers
297 views

Using a widget outside of web app builder

I am building a simple mapping application using the ArcGIS-JS-API 4.X. Here, is my sample code which plots a marker on the map. require([ "esri/Map", "esri/views/SceneView", "esri/...
0
votes
1answer
68 views

How to Specify Out Unit to Be in Decimal Degree in ArcGIS JS API

I am using a Map service on ArcGIS Server 10.4.1 which is in this format Spatial Reference: 102100 (3857) Single Fused Map Cache: false Initial Extent: XMin: -9819759.37726215 YMin: 5128008....
0
votes
1answer
32 views

Output Geometry From ArcGISDynamicMapServiceLayer Coordinate System

Using ArcGIS for JavaScript 3.22 I am overlaying an ArcGISDynamicMapServiceLayer from a ArcGIS Server on top of ESRI basemap. While the service is published in the projected coordinate system with ...
1
vote
1answer
1k views

Multiple markers with specific infowindow content

When I'm looping through a list of addresses, I'm able to plot the markers for all the addresses fine. But when I click on any marker, the infowindow content shows data of only the last marker. How do ...
1
vote
0answers
153 views

Arcgis JS API 4.x how to localize?

I'm looking for ways to customize built in widgets, but couldn't find anything in version 4.x. In version 3.x you can do it in following way as mentioned in doc https://developers.arcgis.com/...
1
vote
0answers
154 views

Moving multipoint using ArcGIS API for JavaScript?

I am trying to move a multipoint object using the edit toolbar, but I keep getting the below error: > Uncaught Error: [esri.toolbars.Edit::activate] Unable to activate the > tool. Check if the ...
1
vote
1answer
346 views

Unable to get Feature Layer to apply Unique Value Renderer in ArcGIS Javascript API

I am trying to make a unique value renderer on a map using the JavaScript API. I am using a layer that represents continents. I have used the samples and modified the code for my own layer, but I can ...
1
vote
2answers
247 views

Using Snapping Manager with ArcGIS Dynamic Map Service Layer?

Using ArcGIS API for JavaScript 3.22 I am trying to add Snapping Function on adding Point to a Graphic Layer but bases on an existing ArcGISDynamicMapServiceLayer (snapping to Edges and Vertex in the ...
3
votes
1answer
258 views

Elevation profile from existing lines

I am trying to pass the geometry of a polyline from a map service layer to the elevation profile widget. Normally, when using a polyline generated from the Draw tool, we can grab the event geometry ...
0
votes
1answer
167 views

Stack draw toolbars with ArcGIS API for JavaScript

I want to stack two different geometry draw toolbars with the ArcGIS API for JavaScript namely a point and a polyline. The goal is to create a point with the first click and simultaneously start the ...
1
vote
1answer
152 views

Getting “isWebMercator” Error When Trying To Draw a Circle On Graphics Layer

can you please take a look at this snippet and let me know why I am getting this Error message Uncaught TypeError: Cannot read property 'isWebMercator' of undefined from the Circle.js module? ...
1
vote
1answer
40 views

Updating job of workflow manager using ArcGIS API for JavaScript?

I'm trying update the name of a job: updateJob: function (jobId, workArea) { let loParameters = new JobUpdateParameters(); loParameters.jobId = jobId; loParameters.name = "Updated"; ...
0
votes
1answer
25 views

Implementing WebAtlas_DE is failing due to Content-Type

I am trying to implement the German WebAtlas_DE.light WMS into one of our applications using the ArcGIS JS api. The scenario is to load it in tandem when the dark-gray basemap is loaded. We have ...
1
vote
1answer
679 views

Make a query to get extent from a set of features

I need to get the extent of a set of filtered features on a feature layer and zoom to that. I tried the queryExtent method on the layer object, but with no success. The promise got back with an ...
1
vote
2answers
351 views

Need dojo array.map to wait for feature layer query to complete

I am executing an IdentifyTask and then using dojo array.map to create an array of Features to pass to an InfoWindow. The stripped down version of my code follows. var deferred = ...
0
votes
1answer
31 views

Set Default File Format on ESRI Print Widget

I'm using the Print widget in the ArcGIS JavaScript API (4.4) and would like to set the File format to default to PDF instead of PNG8. I've read through the documentation and don't see a ...
1
vote
0answers
21 views

What causes these ServiceArea artifacts?

I'm building a bus service coverage tool, using ESRI's javascript API with NetworkAnalyst Route and Service Area tools on ArcGIS Server 10.2.1 doing the heavy lifting. Workflow: Identify 2 or more '...
2
votes
1answer
225 views

Getting directions using routes in ArcGIS API for JavaScript?

I am creating several routes, these routes represent the public transportation network of a city. Now I want to calculate the best combination to go from a point A to a point B using those routes. ...
2
votes
0answers
131 views

Handling “exact” scale close to layer's minScale/maxScale in ArcGIS js api

We deliver web apps for our customer based on common platform which in turn is developed on top of ArcGIS JS API 3. Customers publish their map layers to get whatever maps they need. Customers have ...
0
votes
1answer
107 views

Not Able To See Buffer on Click Event On Graphics Layer

Using ArcGIS JavaScript API 3.21 and This Demo Fiddle I am trying to create a bufferd area on click event but apparently this is not showing any graphic on bufferLayer graphics Layer require([ "...
0
votes
1answer
57 views

ArcGIS Javascript Click Returning Invalid Coordinates

I am using ArcGIS Javascript SDK 3.17 to display some points on a map, and when the user selects the point it takes them to Google Maps driving directions. The points are displaying in the correct ...
3
votes
1answer
157 views

Parameters for ArcGIS REST “…/MapServer?f=jsapi”?

What parameters can be used with .../MapServer?f=jsapi to alter the results, like turning on or off a single layer? Background: When browsing an ArcGIS REST Services Directory one of the options at ...
5
votes
3answers
973 views

ArcGIS Portal use server-side obtained authorization in the client / JavaScript

I have an ASP.NET MVC web application that is authenticating users server-side against ArcGIS Portal successfully using Owin.Security.Providers.ArcGISPortal. I would like to use the granted ...
1
vote
2answers
208 views

Query (Return) All Points In Query Task and Query Object

Using ArcGIS JavaScript API 3.21 I need to grab all Points on a Server. The code works for me with Query.where clause at query.where = "FeederID = 'RMT001'"; but as I said I need to get all ...
1
vote
0answers
25 views

Saving user-imported shapefile to geodatabase

Is there any API or service out there that can do this? We have a SQL Server managed geodatabase (ArcSDE). It would be ideal to be able to create a web application where someone can upload a ...
0
votes
0answers
71 views

how focus a widget on screen?

I'm open a lot of widgets programmatically. So I need focus a widget when it's opened. The first time that widget it's open, automatically set focus, but the second time it doesn't. updated Code to ...
0
votes
1answer
154 views

How to use dojo or esriRequest object to get pdf that is stream in a byte array

I have an SOE that creates a pdf and streams it back in the response and it works great.  How can I call it using dojo or the esriRequest object to call the SOE and display the resulting pdf in a ...
1
vote
2answers
299 views

How to apply a layer definition with a spatial query to a Dynamic layer?

Using the ArcGIS Server JavaScript API, it's possible to specify an attribute query in the form of a layerDefinition against a Dynamic layer. For example, the following query will restrict the layer ...