The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
16 views

Map Extent and center points

I am using ArcGIS Web AppBuilder(Current Version). I have a widget, and on button click I need to place a symbol at the center of the map. I tried using : selectFeatureService: function (...
0
votes
0answers
15 views

Passing shapefile as argument in ee.feature collection [closed]

I am trying to pass area of interest shapefile as argument to ee.featurecollection but i am failed to do in each attempt.
-1
votes
1answer
20 views

Manually triggering delete using Sketch Widget for ArcGIS JavaScript API

I am using the sketch widget for ArcGIS JavaScript: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html There is a "delete" button after you have selected one or ...
-1
votes
0answers
32 views

Selecting and removing graphic (by rings array) in ArcGIS API for JavaScript

I am using JSAPI 3.x. I have graphic layer in Feature Layer and I want to select and remove graphic (by rings) one by one. How can I achieve that? As of now when I select graphic, it select the ...
-1
votes
1answer
35 views

Get existing layer by name from map having multiple map/feature services in ArcGIS Javascript API 3.x

I want to get existing layers from map and toggle on the visibility of the layers. The map has multiple services. I have the rest url for the service or the layer. And able to access the layer by ...
-1
votes
0answers
16 views

Refining Features from ArcGIS for Portal Webmap

I have a portal webmap with a few layers that i need to query so only matching results are displayed to the user. Portal webmap is accessed from a javascript webpage. I have found where the layers ...
0
votes
0answers
17 views

ArcGIS JS-API, zoom to extent

I want to move the zoom to an extent. I have this var: var extentGeo = esri.geometry.webMercatorToGeographic(map.extent); console.log('extentGeo', extentGeo); // { cache: undefined // ...
0
votes
0answers
11 views

getTileUrl from S3

I am having a hard time figuring out how to calculate the row and column after my tiles were put in an S3 bucket using ArcGIS Server. An example row column is _alllayers/L05/R0002807b/C000136c6.png. ...
0
votes
1answer
19 views

Attaching dojo events in ArcGIS Javascript API 3.29

I am trying to do same job for two different events on map using dojo on() function. map.on('extent-change', function (event) { //code goes here } and map.on('zoom-end', function () { //same code ...
0
votes
1answer
29 views

Authenticating using only token in ArcGIS API for JavaScript?

I am trying to embed a web map from ou ArcGIS Online on our corporate web app. I implemented a server-side token generator, since our app users do not have (and should not have) an ArcGIS Online ...
0
votes
2answers
40 views

Map contents don't print when using CSS media print queries in a Bootstrap modal

My goal is to show an ArcGIS Server JavaScript v4 map in a Bootstrap modal popup (displayed over a page containing other content), and to print only the contents of the Bootstrap modal popup. I'm ...
0
votes
2answers
48 views

Add a local GeoJSON file as a layer with GeoJsonLayer

I turned a state boundary feature class into a geojson file called region2_boundary.json: { "type" : "FeatureCollection", "crs" : { "type" : "name", "properties" : { "name" : "...
1
vote
2answers
57 views

Using field from another table in popup of ArcGIS Web AppBuilder

I have an Web AppBuilder application, in popup windows it shows up to 10 fields. For one field of it, can I get a value from another service/SQL table by customizing application. I tried to ...
1
vote
1answer
47 views

ArcGIS Server Featurelayer: Error on adding features via JavaScript API after switch from Oracle db to PostGIS

We have a webapp which consumes services published on ArcGIS Server. All database relevant operations are done with ESRI ArcGIS abilities. We now switched from Oracle 11g to PostgreSQL 9.4 with ...
0
votes
1answer
43 views

Using ExtractData in ArcGIS API for Javascript?

I cannot find any sample using ExtractData API. I am trying to extract data from hosted feature layers using ExtractData JS API (not widget). The job that I submit fail with the following message. ...
0
votes
2answers
45 views

ArcGIS API JavaScript error to add layer

I'm developing a custom widget for WebApp Builder. The widget calls a Geoprocessing service and the result must be added to map, but when I call a function this.map.addLayer() I receive the error ...
0
votes
0answers
33 views

Pass coordinates to recenter google map iframe from parent page

Can somebody tell me where my code is wrong? Here is the code block to pass from the parent to the iframe: document.getElementById('street').contentWindow.map.setCenter({lat:latt, lng:lon}); This ...
0
votes
2answers
39 views

Using ColorPicker in ArcGIS JavaScript API 4.12?

I can only find ColorPicker in ArcGIS JavaScript API 3.X, but I'm working on a project using 4.12. I'm trying to implement ColorPicker to my map to let users to choose colors for Sketch objects. I'...
0
votes
0answers
23 views

Installing JavaScript locally on federated ArcGIS Server

I am installing JavaScript locally on an ArcGIS Server that is federated with Portal and uses the Web Adaptor on the Portal machine. I am following the instructions here: https://support.esri.com/en/...
0
votes
1answer
23 views

Group layers in layer list

I'm new to ArcGIS API for Javscript V3, and trying to dynamically create group layers and add layers together in a existing layer list. I'm not sure how to get this done.
0
votes
1answer
69 views

Customizing legend in layerlist widget of ArcGIS API for JavaScript?

Here is an example code that I use in my work. There are a few issues with this: The layer title appears one more time in the legend of layerlist. How can I remove it or change to other text? ...
1
vote
1answer
63 views

Using ArcGIS Online for public-facing site, while keeping source datasets private?

I would like to build a public-facing map using the ArcGIS Server JavaScript API, which will display datasets stored in ArcGIS Online. ArcGIS Online seems to work on the premise that all users have a ...
0
votes
2answers
66 views

Select all features from current map extent ArcGIS JavaScript 3.29

I am trying to select all the features which are present in the current extent of map i.e which are visible on screen. I find this link helpful but it iterates through all the graphics and check if ...
0
votes
0answers
60 views

esriRequest error No 'Access-Control-Allow-Origin' header is present on the requested resource

I have an API that uses Basic Authentication (Username, Password). I am trying to use this in an esriRequest to pull back the JSON data object from the GET request. To test this (and potentially avoid ...
1
vote
0answers
24 views

GeoJSON Layer - ArcGIS JS API - External URL with oAuth2.0

I am using ArcGIS JS API and connecting to an external GeoJSON service for my GeoJSON Layer. However, for security reasons oAuth2.0 has been enabled on the service. So now I am lost as to how to ...
2
votes
0answers
65 views

Esri mapview USGS earthquake trigger popup from outside of map

I am trying to show some recent earthquake information in Esri maps using USGS earthquake API data. I am able to fetch the list from API data and also I got the map with those listed information ...
1
vote
1answer
30 views

ArcGIS JavaScript API set size of CSV Marker by attribute

Using ArcGIS Javascript API 3.29 is it possible to set the size of a CSV Layer marker using a field value through the renderer? Using this EXAMPLE in their samples, they add a CSV layer to the map ...
0
votes
1answer
34 views

ArcGIS JavaScript API Buffer Units from Dropdown

I am trying to create a buffer that will have the distance and units inputted by the user. I'm having trouble getting the JavaScript to recognize the which Unit of Measurement the buffer is being ...
1
vote
1answer
23 views

Why is the CSV Layer converting a Date-Time field to Unix Timestamps?

I am using the ArcGIS JavaScript API to add a dynamic map in my application. I am loading data through a csvLayer. The data looks something like this: Here's a snippet of me initiating the csvLayer: ...
0
votes
0answers
25 views

Display Feature Layer content on default popup ArcGIS Javascript API

I have a map that import a layer using the function var layer = new FeatureLayer( url: "https://xxxxxxxx" outfields: ["nom_cant", "nom_prov", "nom_distr"], ) Also I am using the default popup (...
0
votes
1answer
41 views

Map not centering on location after using search widget - ArcGIS API for JavaScript

Hello I am completely new to using the ArcGIS API for JavaScript 4.11. I am creating a basic app that uses a search widget. I use the search.on function to grab the latitude and longitude of the ...
1
vote
0answers
28 views

Access secure services from ArcGIS Portal with API JavaScript [closed]

I was reading this tutorial, that explains how to access secured services on ArcGIS Online. But I wonder if there is a way to do the same but with Portal and access my secured own data.
2
votes
1answer
67 views

Using Google Maps Restricting Bounds API with ArcGIS JavaScript API?

I am trying to make a map with ArcGIS 3.29, but in my map I need a bounding box. The ArcGIS API does not have a bounding box function, but the Google Maps API does. What I am having trouble with is ...
1
vote
0answers
26 views

Keeping TOC layers unchecked on first load in ArcGIS JavaScript API

I am new to ArcGIS and it's API. I am using NLiu's TOC widget for displaying the layers. It is working perfectly, however, I wanted to keep all layers unchecked when it is loading on the browser (for ...
1
vote
1answer
45 views

Unable to zoom using ArcGIS API 3.28

I've been trying to create a map and have it's initial zoom and center position be the query result's coordinates (a polygon, in this case) but it just refuses to zoom in, both using zoom in the ...
1
vote
1answer
45 views

ArcGIS JavaScript 3.28 extent not working

I'm trying to get an extent to work on a web map app but keep getting an error when trying to pass the extent parameter: <!DOCTYPE html> <html> <head> <meta http-equiv="...
0
votes
1answer
67 views

Creating bounding box in ArcGIS API for JavaScript?

I am trying to create a bounding box for my map in ArcGIS 3.28. I want the bounding box to stay in a given area based on the coordinates given. I found a class called Extent in the API Reference that ...
1
vote
1answer
80 views

ArcGIS-JS-API failed to execute query

I'm trying to execute this (it's JavaScript but it doesn't matter): queryTask.execute(query, function (results) { and I get an error: Failed to execute query These are the parameters: var ...
2
votes
1answer
53 views

ArcGIS JavaScript API popup-show all attributes

I'm publishing services to ArcGIS server and I want to test them out in a simple HTML web map. I would like to create a pop-up window to test if the attributes are coming through. Since I will be ...
1
vote
1answer
21 views

esri/dijit/editing/AttachmentEditor use proxy when viewing attachments

I'm trying to figure out why the ArcGIS JavaScript API AttachmentEditor does not use a proxy when viewing attachments. I have my proxy set up correctly, and it uses it in every other situation but ...
0
votes
1answer
39 views

How to filter a csvLayer based on attributes?

Ill start out by just explaining what I'm trying to achieve. I'm running an arcgis application based on the javascript API. I'm Rendering a CSVLayer into my SceneView like such: require(["esri/Map", ...
0
votes
0answers
16 views

Failed to complete the task about the ServiceAreaTask

When I am trying to do the task about the ServiceAreaTask, the callback can not be executed. This is my code: <html> <head> <meta charset="utf-8" /> <meta ...
2
votes
1answer
19 views

ArcGIS JS-API click on Graphic and exceute code

Currently I can click on the GraphicsLayer and I can see an array of all my Graphics added there. const layerMarkers = new GraphicsLayer({id: layerId}); this.map.addLayer(layerMarkers); const graphic ...
0
votes
2answers
506 views

How can I convert KMZ file to JSON?

I'm writing a ArcGIS JS project, in which user will upload KMZ which will be displayed on map, since ArcGIS doesn't have a magic trick to do it, I want to convert KMZ to JSON (or KML) and then display ...
0
votes
1answer
35 views

ArcGIS JavaScript API: map loads after pan

I'm using this.mapa.map.centerAndZoom(center, zoom); with 2 different zooms, 4 and 5. loadModules([ 'esri/geometry/Point', ]).then(([Point]) => { switch (evt....
2
votes
1answer
205 views

ArcGIS API 4.11 JavaScript - “Click” “drag” stopPropagation()

Using JavaScript in the ArcGIS API, I am querying a feature layer from a Map View, calculating points within a certain radius when the user "click" "drag" with the mouse. I want to be able to stop ...
0
votes
1answer
27 views

How to implement search in a graphics layer?

There is a method that accepts JSON data. Based on this data, points are created and added to the graphics layer. How to implement search in a graphics layer? I found an example of how to implement ...
0
votes
0answers
35 views

ArcGIS Map export fails with when using scaleDependentRenderer

I am using ArcGIS javascript API 3.11 so as to call a map export service (printTask). This used to work fine, until I decided to print a graphics layer with a scaleDependentRenderer. The ...
0
votes
1answer
374 views

Why does Uncaught TypeError: Cannot read property 'trim' of undefined occur in esriRequest

I am trying to use esri/request to pull in some data from an API. I am have two weird problems. First, when I try to run this, it doesn't complete and throws the following error in the browser console:...
2
votes
1answer
117 views

Web AppBuilder custom widget how to add third party node modules?

I know that ArcGIS Web AppBuilder Desktop is built using Node.js Is there any way we can add the third party node.js modules in Web AppBuilder Desktop using the npm command and then access these ...