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
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. ...
3
votes
1answer
228 views

Synching Two ArcMap JavaScript webmaps to respond to panning

I am looking for some advice on how to approach a problem I am having. I am looking to build an ArcGIS webmap using JavaScript and HTML 5 that reacts to a user panning on two separate, synchronous ...
0
votes
1answer
16 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
13 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
24 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 ...
2
votes
2answers
248 views

Converting Coord extend Lambert II (WGS84) to Geographical coordonate (lat lng) using ESRI API

I am using the esri API and I am facing an issue to convert Coordinate extend Lambert II to Geographical coordinate. For example : x : 633951 y : 1959059. I have try to use webMercatorUtils like ...
2
votes
1answer
30 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="...
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 ...
3
votes
1answer
40 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
116 views

ArcGIS server can not be used in Mobile browser and Firefox browser/ ArcGIS Javascript

I am using ArcGIS JavaScript API to develop a web page to consume services from ArcGIS Server. The page loaded good in Chrome browser but not work for Firefox, and also both Android and Safari mobile ...
0
votes
2answers
58 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 ...
3
votes
1answer
53 views

Panning to Point in WrapAround180 past initial extent in Arcgis Javascript API

With my map set to WrapAround180: true, I have a icon list outside of the map that pans to a location on the map when you select an icon in the list. If you are outside of the initial extent and ...
-1
votes
0answers
37 views

Drawing polygons on a map using ArcGIS JavaScript API 3.31?

First a user draws a polygon on a map using the draw toolbar, like this: function initToolbar() { tb = new Draw(map); tb.on("draw-end", addGraphic); // event delegation so a click ...
0
votes
1answer
140 views

Using ArcGIS JavaScript to calculate length of line feature where clicked

I am working with arcgis JavaScript API and a linear referencing feature. I want to be able to click on a line of a feature and calculate the length from beginning of the line to where I clicked. Then ...
0
votes
1answer
24 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 ...
-2
votes
1answer
33 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
34 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()....
2
votes
1answer
174 views

How to get mapPoint z coordinate by Lat and Lon

Please see the map on: https://codepen.io/stzdzyhs/pen/WamYav the whole code is also inserted below. When click on the scene(A IntegratedMeshLayer), it can show the Lon, Lat, and Z values in the ...
3
votes
2answers
103 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 ...
0
votes
1answer
26 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
369 views

Printing secured services

ArcGIS Server Version: 10.4.0 ArcGIS JS API: 3.25 ArcGIS Desktop: 10.2.1 Browser: IE 11 In my web application, I am consuming secured services and have a requirement to print the map contents. ...
1
vote
1answer
95 views

Getting email addresses of pointers after selection with JSON or array and ArcGIS API for JavaScript?

I am trying to create a map where I can create a selection area, and get info of all graphic pointers under it, I tried to modify with following example, but they are using web service and queries, ...
0
votes
1answer
16 views

How to find the size of the ArcGIS map when the map takes up less space than the containing div (zoom=0)

I've been digging through the ArcGIS map trying to figure out how to find the size of the map. The map object has width / height but those are the containing div and not the width / height of the ...
1
vote
1answer
24 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/...
4
votes
1answer
168 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
41 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 ...
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 ...
-1
votes
1answer
319 views

Creating Layer editing/Analysis in ArcGIS web map application using Javascript API [closed]

I want to make an ArcGIS web map application in which user can select different layers of the published map (data of the layer in Postrgresql) and do some analysis based on layer data.import data to ...
2
votes
1answer
334 views

Graphics disappear when zoom in

Recently I have this really weird bug : I have a new graphics-layer, that I build on runtime, with a point-graphic in it. On higher extent - ever thing's great, on lower extent (zoom-in) the graphic ...
0
votes
1answer
546 views

Selecting Polygon Feature using ArcGIS API for JavaScript?

I used ArcGIS JavaScript API 3.25 for developing. I want to select polygons within 1km radius. so I used a sample code that esri provides. But it works only for point features. I want to use that ...
2
votes
1answer
295 views

Cannot set map extent in ArcGIS JavaScript API 3.17

I have my map set to a custom projection SVY21/3414 This map service only supports Tiled and not Dynamic. I manually convert the projection coordinates using proj4 and it works fine for my graphics. ...
1
vote
1answer
810 views

ESRI Javascript - Print Task GP Service - Symbology Issue

I am using the ESRI js API, and using a python GP service to run a print task to PDF with custom layouts. This works great, except when i have any map service enabled in the map. The layer in the ...
0
votes
1answer
138 views

Changing Data Types within the CMV Map Service

Is it possible to format fields that appear in tables within the map service? In the table results after a spatial query, date fields are converted to UTC rather than duplicating the values from the ...
0
votes
1answer
645 views

Auto Panning to Cursor Position using ArcGIS API for JavaScript [closed]

Does anyone know if it's possible using the ArcGIS JS API to make it so the map auto-pans based on the user's cursor position if they get within a close distance to the edge of the map viewing area? ...
2
votes
1answer
25 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 ...
3
votes
1answer
184 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 ...
1
vote
1answer
209 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....
1
vote
1answer
1k views

Accessing Attributes of Individual FeatureLayer Points with ArcGIS API for JavaScript

I have been struggling for some time with selecting points from a featureLayer which is stored on an ArcGIS webserver. Each of these point graphics contains information such as an ObjectID, SiteName, ...
0
votes
1answer
2k views

Hiding popup template in ArcGIS API for JavaScript

I am creating a Custom Popup template as follows: countyPop = new PopupTemplate({ title: "County: {NAME}", fieldInfos: [{ fieldName: "POP2000", ...
0
votes
1answer
45 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 ...
0
votes
1answer
252 views

Adding multipoint to feature layer using ArcGIS API for JavaScript?

I want to display a marker whenever I receive websocket message but with this code I can only display the first point and then when I receive the second message I can't display it. socket.onmessage = ...
1
vote
1answer
287 views

Display custom fields/content in popup for existing ArcGIS Map API Service

I'm using the ArcGIS Map API "Historic_National_Boundaries_NEW (FeatureServer) > Year_2000" present over here : API Link It has two pre-defined fields 'OBJECTID' and 'NAME_2' (for each country) ...
1
vote
1answer
163 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 ...
0
votes
1answer
51 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
2answers
388 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 ...
2
votes
1answer
2k views

Custom ArcGIS GraphicsLayer (JavaScript)

I am working on an application that will retrieve data from various sources and construct ESRI GraphicsLayer objects from the data and display it on a map. I have created custom FeatureLayers before ...
-1
votes
1answer
34 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
21 views

ArcGIS ArcGISDynamicMapServiceLayer, setExtent

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

Modifying code from ArcGIS Story Maps

I am looking to make a map from our online ArcGIS sites and host them on our own server. I got that all done, but I am trying to modify the code to my liking. There is a section in github (https://...
5
votes
2answers
968 views

Point clustering only works for part of area using ArcGIS API for JavaScript

I am using the 3rd party scripts for point clustering as published by Globoserve, http://globoserve.posterous.com/ . I followed the instructions to the letter - and just replaced the queryTask ...