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

Setting minZoom at runtime in ArcGIS API for JavaScript

I want to set maxZoom and minZoom at runtime. Initially I set maxZoom and minZoom as shown in below code new this.Map("map1", { basemap: "streets", center: new this.Point3(-98.35, 39.50), ...
1
vote
1answer
16 views

Problem creating FeatureLayer object in esri javascript API

I'm just a simple farmer tending to his ArcGIS online hosted feature layers. I pinpointed the problem as that I can't seem to properly create a FeatureLayer object based on a url to a hosted feature ...
0
votes
0answers
7 views

Viewing Revit file using ArcGIS Javascript API

I have a Revit file with GPS information in it. Is there any provision to view that Revit model in ArcGIS Web directly without using ArcGIS desktop by publishing it as a web view and then opening ...
1
vote
1answer
25 views

ESRI Converting JSON Object to Polygon Object

I am using require.js // output of polygonString is // {"spatialReference":{"latestWkid":3414,"wkid":3414},"rings":[[[18240.432900000364,43817.389900000766],[18214.047899999656,43880.139900000766],[...
0
votes
0answers
16 views

Publish a feature service from a shapefile in ArcGIS Online using JavaScript

I have created a custom HTML page for data extract analysis using ArcGIS API, the API save the shapefile in zip format by default in my ArcGIS portal, so I just want to publish the shapefile(.zip) as ...
-1
votes
0answers
27 views

Using Extract Data analysis tool using ArcGIS API

We have 2 layers hosted on ArcGIS Online (Point layer and polygon layer) and trying to make a GIS location based query on the polygon layers in a way that all the points within a specific polygon ...
0
votes
1answer
20 views

Resetting all layers one time, when click is fired

Within a click function, I have the below code: home.addEventListener('click', () => { myAPP.mapview.map.layers.items.forEach(item => { item.visible = false; }); ...
0
votes
1answer
29 views

Creating map with multiple selectable layers using ArcGIS

I want to make a map with an option for the user to choose between 3 layers to view. All layers with a certain type of point. If possible, I would also like the user to view more than one layer at a ...
0
votes
1answer
28 views

Possible to loop through and turn off ALL layers?

The below finds my layer and shows visible property in the console, when I toggle it there from 'true' or 'false' it changes. myApp.mapview.map.findLayerById('cool_layer'); But when I run the below ...
1
vote
0answers
20 views

Restrict layers in attribute table widget in JavaScript?

I'm building a webapp, where you can change from several map services. In every map service there are several layers with same naming, but not with the same number of layers. I cannot set the ...
-1
votes
1answer
28 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
21 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
27 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
26 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
34 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
70 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
2answers
25 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
27 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
40 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
47 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
52 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
35 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
38 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
30 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
89 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
49 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
55 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
184 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
47 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
126 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
49 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
294 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
39 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
86 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
124 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
25 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
70 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
28 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
88 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
69 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
2 3 4 5
39