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
votes
1answer
26 views

Sketch Widget in JavaScript API for ArcGIS

Is there any way to extract the coordinates of the vertices of the graphics drawn using sketch widget? I want to use those coordinates to generate a kml file.
0
votes
0answers
15 views

Basemaps without a portalitem ID

The goal is to save the state of a basemap from the basemap gallery, then re-render it later. I have done this sucesfully with all my basemap using the below portalItem.id however there are a few ...
0
votes
1answer
21 views

init.js:36 GET https://js.arcgis.com/3.28/esri/WebMap.js net::ERR_ABORTED 404

I got above error in my browser developer tools window. This happened when I added esri/WebMap to my widget.js file of custom widget I was building.
1
vote
1answer
23 views

Programatically toggle Basemap labels

I can toggle the active basemap programmatically using the code below, but how can I also include a widget to show or hide the basemap labels programmatically? myApp.widgets.basemapManager....
0
votes
2answers
33 views

Hyperlink in ArcGIS JavaScript API map identify dialog?

IBM's Maximo Spatial 7.6.1 uses the ArcGIS JavaScript API/map service to serve up a web map to Maximo: In the Maximo map, I've included URLs as values in the GIS layer. I want to be able to use the ...
1
vote
1answer
21 views

On the fly/Dynamic measuring not working on Measurement Widget with different Basemap

I am developing an application with OS Open Carto Map as a Basemap and I have added a Measurement widget in the app. The measurement widget works fine for when the points are clicked for distance and ...
3
votes
1answer
65 views

Creating Custom Vector Basemap with ArcGIS API for JavaScript

I am using the ArcGIS API for JavaScript 3.x and would like to add a vector tile layer that I created to my map as a basemap that appears in the basemap gallery dijit. I am able to load my layer into ...
0
votes
1answer
19 views

restrict search to specific city - ArcGIS JS API 3.31

I'd like to use the Search widget to search for addresses and intersections in a custom web app (JS v3.31). Is there any way to restrict this search to a particular city? I see how to restrict it to ...
1
vote
1answer
26 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
24 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
33 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
44 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
34 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
29 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
36 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
27 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
61 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
40 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
37 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
16 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
175 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
42 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
113 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
38 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"> <input type="text" value="" id="...
1
vote
1answer
254 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
35 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
66 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
118 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
26 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
24 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
24 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
61 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
41 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
26 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
15 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
24 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
77 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
47 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
61 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
55 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
33 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
12 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
32 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
58 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
127 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
202 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
141 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
92 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
81 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. ...

1 2 3 4 5 39