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

Determining invalid parameters for geoprocessing service

I have a loop that feeds the parameters to execute syncronymous geoprocessing services. When the loop runs it gives me the results when it receives valid params, and I get a generic error for the ...
1
vote
1answer
30 views

Web AppBuilder Custom Widget - Function Executing Sequence

I am having a weired issue that func1(), which is coded in front of func2(), is executed after func2() in my custome widget. The widget draws a buffer on a click event, and when a "Show Results" ...
1
vote
1answer
61 views

How to get base map ids from basemap gallery ArcGIS JS (i.e. topo)

Context: I am trying to simply create a 'Save Button' from selection of basemap in basemap gallery... The only thing missing is I cannot find the 'well known string ids' from the basemaps in the ...
3
votes
1answer
58 views

ArcGIS queryTask() always returns an empty set

Using the ArcGIS JavaScript API 4.14 to query a feature service on a server that is federated to my instance of Portal/ArcGIS Enterprise. No matter what I do the queryTask.execute() is returning an ...
0
votes
1answer
138 views

Update z-index of new graphic layer

I am creating/drawing a new polyline successfully; the only problem is it's going under my other graphic layers. Is there any ability to set the z-index of this to bring it above the over layers? I ...
0
votes
1answer
111 views

Turn certain layers on and off in ArcGIS Web AppBuilder Developer Edition

Does anyone know a way in ArcGIS Web AppBuilder Developer edition that I can create a button or a link that turns certain layers on or off? For example, if I have three layers [1] Homes [2] Rivers ...
1
vote
1answer
60 views

get a PolyLine path to go to center of screen

I am trying to draw a polyLine to the center of the screen (as the second path, point B) ... I tried referencing the below to get center: any pointers? coordinatesBx = map.extent.getCenter()....
0
votes
1answer
80 views

How to replace http for https before DOM Construct on load KMZ file with ArcGIS API JS

I have an application and it is loaded with https, this application loads a map with a KMZ file, and the content of that file has external reference to a PNG image that is loaded with http. This ...
0
votes
2answers
160 views

Min and Max for each image of NDVI to calculate Em and LST

I am working on my script to calculate LST for all the images in the collection separately and then use the calculated LST to estimate Mean Annual LST. I have calculated NDVI for each image, and the ...
-2
votes
1answer
76 views

Reading local GeoJSON file using ArcGIS API for JavaScript

I am using ArcGIS API for JavaScript 4.14. I change the "url" which only receive the "http"-start str to "data",but it didn't work. const geojsonLayer = new GeoJSONLayer({ data: "js/...
1
vote
1answer
141 views

Uncaught (in promise) TypeError: GraphicsLayer is not a constructor

import Map from "esri/Map"; import MapView from "esri/views/MapView"; import Graphic from "esri/Graphic"; import GraphicsLayer from "esri/layers/GraphicsLayer"; import webMercatorUtils from "esri/...
0
votes
1answer
17 views

Specific div elem for click event within view.when/view.on

view.when(function(){ view.on("click", function () { doSomething = !doSomething;}); }); The above works as a global click event. HOWEVER, I am trying to specify a specific div elem not a ...
4
votes
1answer
222 views

polyline path to follow a draggable modal

Here is what I am trying to do: on click (right now just click anywhere on the map) will draw the line and display a drag-able modal pop-up, I have static coordinates set for the start point (which ...
1
vote
1answer
56 views

polyline second path to draggable div

How can I simply draw a line between two lat long coordinates values on a map using ESRI ArcGIS JS API?! This most basic task is taking a gruesome amount of effort. I am able to draw a line with the ...
3
votes
2answers
200 views

Setting map extent using offset in ArcGIS API for JavaScript v3.x

I am trying to set map extent using an offset because there is a panel floating over the left side of the map and sometimes, when I zoom to a feature extent, the feature is partly hidden behind it. I ...
2
votes
1answer
95 views

Making a popup (which is a DIV containing a panel consist of textbox and a button) to float within the map DIV only

The HTML for the popup is: <div id="commentBox" class="commentBox"> <div class="panel panel-default"> <div class="panel-body"> &...
1
vote
1answer
298 views

Proper Way to Load WMSLayer in ArcGIS JSAPI 4.12

I'm getting #load() Failed to load layer TypeError: Cannot read property 'indexOf' of undefined error when I tried to load WMSLayer in my application. I've tried several different WMS service URLs ...
-1
votes
1answer
52 views

How can I show map from GeoServer using JavaScript on my web with base map OpenLayers? [closed]

http://localhost:8080/geoserver/flood/wms?service=WMS&version=1.1.0&request=GetMap&layers=flood%3Apak_water_areas_dcw&bbox=61.2723655700684%2C23.694694519043%2C75.8473587036133%2C36....
0
votes
1answer
134 views

Displaying data from standalone PostGIS using ArcGIS API for JavaScript? [closed]

I'd like to serve out data from a PostGIS server and consume it as a layer in the ArcGIS JavaScript API. Searching for "arcgis javascript postgis" I see information on ArcGIS Desktop, ArcGIS Server ...
0
votes
0answers
157 views

Adding Javascript API widget to Esri's Angular CLI boilerplate code

I'm using the Esri Angular CLI template from Github here: https://github.com/Esri/angular-cli-esri-map. I've been trying to understand how I can add a widget to the esri-map.component.ts file. I've ...
2
votes
1answer
31 views

ArcGIS JavaScript 4 Layout

I am getting started with ArcGIS JavaScript 4. I want to create a layout with header menu, left pane and right pane with map. All the ESRI examples seem to refer to JavaScript 3. In the code below ...
1
vote
1answer
36 views

How to insert polyline on ArcGIS JavaScript 3.x?

I am using JavaScript 3.x library of ArcGIS for plotting the polyline but nothing to show on the map. function simtest() { var p1 = esri.geometry.geographicToWebMercator(new esri....
1
vote
1answer
28 views

Changing order of attribute data in InfoWindow on click of multiple features

I have an ESRI Web App Builer 2.7 stand alone web application where it is required that we are able to control the order of attribute data appearing in an Infowindow on clicking multiple features. ...
1
vote
0answers
12 views

How to show marker on buffer and show the info on click of that marker ArcGIS JavaScript?

First for creating the buffer the below function is used function custombuffer(radial,latt,longt,zoomlevel) { map.graphics.clear(); var pt = new Point(Number(longt), Number(latt), ...
0
votes
1answer
129 views

Exporting data using sketch tool in ArcGIS API for JavaScript

I am looking to see if it possible to extract data from a feature when we use sketch tool. After I draw a polygon it is selected as a feature what can I write to get the data behind that select ...
1
vote
0answers
42 views

Limiting size of require statement when using ArcGIS JavaScript API

Sometimes I look back at my code or someone else's and see these crazy long require statements - sometimes, hundreds of lines long. Some of the options for limiting the size of the require statement ...
0
votes
1answer
42 views

ArcGIS ArcGISDynamicMapServiceLayer, setExtent

I have a layer made with ArcGISDynamicMapServiceLayer like this: return esriLoader.loadModules([ 'esri/layers/ArcGISDynamicMapServiceLayer', 'esri/layers/ImageParameters', 'esri/InfoTemplate' ])...
0
votes
1answer
17 views

ArcGIS JavaScript API 3.3 change the value of a field to lowercase in InfoTemplate

Is there a way to change the case of a text field in an InfoTemplate using ArcGIS JavaScript 3.3? Let's say I am bringing in a feature layer, and it is a requirement that I ensure that the field ...
1
vote
0answers
30 views

Setting Graphics rendering level like ArcMap UniqueValueRenderer in ArcGIS AP for JavaScript

I have to add a Map Layer on Map which I am able render with UniqueValueRenderer. After rendering I want to have certain value matching graphics always on Top if they are over lapping. But I am not ...
0
votes
2answers
125 views

ArcGIS JavaScript 3.3 add ArcGIS REST API Queried Feature Layer URL as Layer

Using the Query Generator on an ArcGIS REST Feature Layer, I generated a URL that filters the data by a geometry extent ({xmin: -104, ymin: 35.6, xmax: -94.32, ymax: 41}) This returns Current River ...
1
vote
1answer
51 views

Placing symbol at map extent center

I am using ArcGIS Web AppBuilder (Version 2.13 August 2019). I have a widget, and on button click, I need to place a symbol at the centre of the map. I tried using : selectFeatureService: function (...
-1
votes
2answers
112 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
1answer
61 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 ...
0
votes
1answer
37 views

ArcGIS JS-API, zoom to extent [closed]

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
16 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
38 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
131 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
218 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
428 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
415 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
155 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
102 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
158 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
44 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
72 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
26 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
55 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
368 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
78 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
424 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 ...

1
2
3 4 5
40