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
36 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
620 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
169 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
140 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
226 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
150 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
581 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
73 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
900 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
141 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
126 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
186 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
290 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
77 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
288 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
65 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
29 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
146 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
146 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
322 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
241 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
245 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
155 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
144 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
39 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
628 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
328 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
216 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
122 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
106 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
52 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
146 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
896 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
196 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
70 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
146 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
274 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 ...
-1
votes
1answer
36 views

Understanding Javascript Query error?

function querySchools() { var query = quakesLayer.createQuery(); query.where = "District = '" + dom.byId("district").value + "'"; return quakesLayer.queryFeatures(...
0
votes
0answers
26 views

Changing the color of scale and rotation points when editing a feature

When selecting a feature in my application and selecting the edit button the selected features become editable. This means that the points for scaling and rotation of that feature are made visible as ...
0
votes
1answer
413 views

Calling a function after map display rather than map load

I have the following method which I am calling on load of the map. However when I try to turn on a particular layer within this code I am unsuccessful as although the map would have been loaded it ...
2
votes
0answers
53 views

wkid error using buffer GeometryService - ArcGIS JS API 3.2

First of all, going to this url for the geometry service referenced in the documentation shows it's been deactivated so I instead chose this url - both with /GeometryServer and /GeometryServer/buffer. ...
1
vote
0answers
316 views

Using Secure WFS Layers in AGOL/ArcGIS Web App Builder

I am working on an ArcGIS WAB app that needs to reference proprietary lightning strike data which is only provided through the vendor as a secured WFS service. Ideally, this would be a layer inside a ...
-2
votes
1answer
408 views

draw shape in map and save to server [closed]

I am new to ArcGIS JavaScript API. I want to draw a polygon in map (with javascript in the ArcGIS web map) and then edit data for that polygon and then save in a existing layer in ArcGIS Server.
2
votes
1answer
112 views

How show a new feature layer in map?

I'm creating a new feature layer like that: createNewFeature: function (layer, geometry, layerInfo) { var loJsonFS = { "displayFieldName": layer.displayFieldName, "fieldAliases": ...