Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [arcgis-javascript-api-4]

For when 4.x is version of ArcGIS API for JavaScript that you are using

-2
votes
0answers
20 views

Local Moran's I index in JavaScript [closed]

There are statistics on the population, I want to do a spatial analysis and use the local Moran index. On the ArcGIS site there is a sample code, only written in Python, I have never written on Python,...
2
votes
1answer
20 views

ESRI Directions widget version 4. Adding Stops?

Is there a way to add stops programatically to the latest Directions widget, or must I use the widget GUI? (I see that it is still 'beta') Version 3 of the JS API has this function: Version 3 add ...
0
votes
0answers
36 views

Polyline point missing using ArcGIS API for JavaScript?

I am struggling with some code. The issue I am facing while drawing a poly-line I needed pan option so i have changed the draw mode from freehand to click. My problem is that sometimes while clicking ...
0
votes
0answers
50 views

ArcGIS API 4.11 JavaScript Feature Table Alternative

I cannot find a simple/basic example online of adding a feature table to the bottom of a map in ArcGIS API 4.11 from a Feature layer (using JavaScript). So the functionality would allow you to click ...
0
votes
0answers
14 views

ArcGIS API not visible FeatureLayer

function myFunc (){ if ((document.getElementById('MP').checked)&(document.getElementById('wom').checked)&(document.getElementById('child').checked)) { ...
0
votes
0answers
12 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
1answer
15 views

Have GraphicsLayer working but now need to put it in or convert to FeatureLayer (JavaScript)

I have a GraphicsLayer working for "Regions" and the corresponding popup template information for the staff within each region (below). function fillRegionMarkers() { // Create ...
0
votes
0answers
25 views

WMTSLayers seems not working in EPSG:25830

WMTSLayer in Javascript API 4.11 seems not work when spatialReference EPSG:25830 is selected. The problem is that the request is generating by the API is incorrect, Tilerow parameter is wrong. The ...
1
vote
1answer
33 views

SNAPSHOT mode of Feature Layer in ArcGIS JavaScript API 4.x

Is there any posibility to set Feature Layer in "SNAPSHOT mode", as it was in ArcGIS JS API 3.x? The main goal is to fetch features once to the client and avoid additional queries at each map pan/zoom ...
1
vote
0answers
55 views

Emitting map click using ArcGIS API for JavaScript?

I am trying to emit a map click from the MapView object using its emit method. I have successfully done this in the 3x API from the Map object. This same method, however, is not working for me in the ...
0
votes
1answer
108 views

ArcGIS JS API Failed to load feature layer

I want to add test feature on my ArcGIS map using feature layer. I create layer using Graphic as a source. After a lot of googling I create my point the following way: require([ "esri/Map", "esri/...
0
votes
1answer
56 views

ArcGIS JS API SimpleMarkerSymbol is not a subclass of Layer

I have polar ArcGIS map and want to display my own data on it. I will get data using AJAX REST queries to my server. As I understand, it isn't commonly used way to get data in ArcGIS, but presenting ...
1
vote
1answer
42 views

Disable wheel scroll zooming with ArcGIS Javascript API 4.11

I want to disable wheel scroll zooming so the viewer can scroll down the page without losing the cursor in the map. But this code freezes scrolling altogether, so when the cursor is over the map, ...
0
votes
0answers
40 views

Submitting GP service fail

I want to download the feature layer which I input as a string parameter to my GP service. When I run the script I got the following errors. First time when I run it: job-submitted gp_service_run2....
0
votes
1answer
39 views

Getting Search Widget response's lat long in ArcGIS API for Javascript 4.x?

How would I retrieve the lat/long of the city/location selected using the Search Widget? I do not need to display this location on a map. All examples I have so far come across attach the Widget to ...
0
votes
0answers
20 views

Referencing active widgets in ArcGIS API V4.x

How can I reference an active widgets in a view (map or scene) in ArcGIS JavaScript version 4.x Version 3.x widgets were dojo-widgets (mostly) so using "dojo/Registry" Registry.byId("widgetId") ...
0
votes
1answer
59 views

Get GeoJSON or simple WKT from a GPFeatureRecordSetLayer ArcGIS js API

Is it possible to get the GeoJson representation of a GPFeatureRecordSetLayer that is returned from GPServer task? I am able to draw the feature on the map (using the ArcGIS js API) with code like ...
2
votes
1answer
100 views

De-highlight (change opacity of) other features that don't share same values

I have this Arcgis Online webmap that is a base for my testing in Arcgis Javascript. I have not done anything with the javascript file, other than the basic setup, as I am new to this. I was wondering ...
2
votes
1answer
111 views

ESRI Web Appbuilder developer edition vs JavaScript API

What is the benefit to using one over the other besides the out of the box widgets and functionality offered by Web AppBuilder? If you can customize the code in Web AppBuilder, what really is the ...
0
votes
0answers
19 views

Visualize variables using both marker size and color

I currently use colorRendererCreator.createContinuousRenderer() (docs) to visualize a variable from a CSV layer. I wonder is it possible to visualize another variable using the symbol's size? I ...
0
votes
1answer
12 views

ArcGIS JS API 4.x - Polyline size(extrusion) in 3D View

I've a PolyLine , I need to adjust its height and display it in SceneView (As a paper with 0 thickness) . I was able to display the PolyLine as a Line and I could be able to adjust its elevation (...
0
votes
1answer
15 views

How to conduct a query in another scene layer in a webscene?

I have the following situation, I have imported a web scene into a script. The webscene consist of two scene layers and during most of the script I am only working with one scene layer. However ...
0
votes
0answers
9 views

ArcGIS Route Optimization REST API stops order

I have recently come across ArcGIS for route optimization and it is a great API. I am facing just an issue here in terms of my expectations. I am trying to use findBestSequence to find the best ...
1
vote
1answer
34 views

Retrieve selected feature on ArcGIS Online as string?

For now I am trying to create a webmap with the ArcGIS API (4.x) for JavaScript. I have a bit understanding of the workings of JavaScript, however I couldn't find code in which it's possible to select ...
1
vote
0answers
36 views

ArcGIS JS API Popup does not show properly

This is regarding arcgis js api popups. when viewed in web the popups appear in good way, but when the browser is changed to mobile, the popups submerge below the screen. I would like to know how to ...
0
votes
0answers
53 views

ArcGIS JS API vs 4.10 Add Feature Thumbnail to a DIV Template

Hi @Bill Chappell and users, I would like to add add a thumbnail related to each feature on a mapView on click or click on next feature this latter due to features overlapping. My GeoJSON has an ...
0
votes
0answers
13 views

Alternate between Web Mercator and UTM basemap in ArcGIS Javascript 4.x Map

Is it possible to use the esri/widgets/BasemapToggle with basemaps in two different projections? I'm starting out with the vector-dark gray basemap and in the toggle I'm setting the next basemap to ...
1
vote
1answer
37 views

Add a Header to BaseMapGallery Widget added in ExpandWidget ArcGIS Javascript API 4.1

I want to add a Header in the BaseMapGallery Widget. I have added the BaseMapGallery widget in my ExpandWidget as content. How can I now add some text to the BaseMapGallery widget (e.g. instructions) ...
0
votes
0answers
17 views

Draw shape in map and save to server ArcGIS JavaScript version 4+

is it possible to use sketchViewModel to draw polygons and using applyEdits() to save as feature layer in server?
0
votes
1answer
46 views

How to style custom elements to match the ArcGIS widgets?

Using the ArcGIS Server v4 JavaScript API, the instructions for creating a custom widget are very complex. In my case I simply need to add some custom buttons, and style them to match the existing ...
1
vote
1answer
53 views

How to configure modal widgets in ArcGIS Server JavaScript API version 4?

The ArcGIS Server JavaScript API version 4 has the concept of widgets, such as the LayerList or Legend widgets. Is it possible to set these widgets to be modal, whereby opening any widget closes all ...
1
vote
1answer
44 views

ArcGIS Online vs JS rendering differences

I am experiencing some issues working with ArcGIS JS API v4.9. I created a map on my offline software that I imported into ArcGIS Online. The map contains polygons with labels inside them and some ...
1
vote
1answer
21 views

Continious icon rotation

Is there a way to continuously rotate an icon from the CalciteWebCoreIcons? I have a layer with the single icon on it, that shows up correctly. view.graphics.add({ id: "centers", ...
0
votes
1answer
32 views

Adding markers to a layer at runtime

I would like to use two layers (units, calls) over the streets base map. I have a timer loop that runs every 30 seconds and I would like to clear the units layer, then add the new unit markers to the ...
2
votes
1answer
61 views

ESRI Search Widget - Alter Search Parameters (ArcGIS JS v4.9)

The Search widget within the ArcGIS JavaScript API (v 4.9) works by returning all records that contain your search string. In other words, if you search for "123" You'll get "123 S Main St", "5123 W ...
2
votes
1answer
71 views

Chart JS chart not rendering in ArcGIS popup when using navigation arrows

I'm putting a chart in the popup of my points. On the initial click, the popups display the chart and if I use the forward navigation arrow on the popup, the next chart renders. However, if I use the ...
0
votes
1answer
56 views

Can I use the Search Widget on fields related to a featurelayer?

Is it possible to point the search widget to related records? For example, I have a featurelayer of spaces, which is related to a table of names based on the spaceID. I would like to be able to ...
0
votes
1answer
76 views

ArcGIS Esri feature layer query get object lat and long

I am trying to do a query on a feature Layer and the get an object's Lat and Lng, so I can center it on the map. However after doing the query, I get a graphic that has only an x,y position. the ...
0
votes
1answer
248 views

Adding table (dgrid/OnDemandGrid) under map using ArcGIS API for JavaScript?

I am working with ArcGIS API for Javascript 4.9. I want to create a simple map view and display a table under it. I am using this script as a base https://developers.arcgis.com/javascript/latest/...
0
votes
0answers
15 views

Visual variable renderer doesn’t work on mobile

I don’t even know where to start with this one. I have developed this simple application: http://matthewiannowlin.com/school-tax-referendum/ If you try this on a desktop, the layers will render ...
1
vote
0answers
41 views

ArcGIS API for JavaScript - Search widget with external geocode service

To be brief, I want to add to my Search widget new geocode service that is not exposed by the ArcGIS Server REST API (more precisely - OneMap REST API - https://docs.onemap.sg/). I wonder if it is ...
1
vote
1answer
162 views

How do I add use a method to add a FeatureLayer to a Map?

I'm using Angular 6 with the ESRI API for JavaScript 4.9. I have a working application but now it's time to refactor and make this project more polished. I have a series of FeatureLayers added to the ...
1
vote
1answer
208 views

How to use filter on the Search widget in ArcGIS JS API 4.9?

var searchWidget = new Search({ view: view, includeDefaultSources:false sources: [{ locator: new Locator({ url: "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"}), ...
0
votes
1answer
64 views

Getting coordinates in Projected Coordinate System using ArcGIS API for JavaScript?

I have map built using the ArcGIS API for Javascript 4.8. The basemap is the ESRI "streets" basemap in wkid 102100 (latestWkid 3857). How do I get the coordinates in the following to be output as ...
0
votes
1answer
359 views

Combining legend and layer list using ArcGIS API for JavaScript?

I'm building a web app using ESRI's ArcGIS API for Javascript 4.8. I have a legend and a layer list widget on the page. The legend displays the symbology used but lacks ability to toggle display of ...
2
votes
1answer
120 views

ESRI Search Widget activeSourceIndex Usage (ArcGIS JS v4.8)

I am new to ArcGIS JS. I have read the docs but I am looking for some example of setting the default search service. I am looking to use all services (featureLayer and esri geocoding services) but ...
0
votes
0answers
101 views

How to add labels using featurelayer and sceneview in ArcGIS API for JavaScript 4.3

I am using using featurelayer and sceneview in ArcGIS API for JavaScript 4.3 and want to add labels. I have followed code examples from the API documentation but the labels do not show. How do I get ...
0
votes
0answers
25 views

dash line in SceneView ArcGIS JS API

The style property of SimpleLineSymbol is currently not supported in 3D SceneViews (in ArcGIS JS API 4.8), so it's not possible to create dash lines in 3D SceneViews by simply changing the style ...
3
votes
2answers
69 views

Hosting HTML files so they are accessible through AGOL

I recently made a web mapping application using the ArcGIS for JavaScript API, but I am having a difficult time making it accessible to users of my organizations AGOL account. I naïvely thought I ...
1
vote
0answers
52 views

ArcGIS feature layer built of SQL View not visible

I am building a custom web app using the ArcGIS JS 4.8 API with an ArcGIS Web service and I have run into an issue. The root cause that I am trying to fix is to do with features not being filtered ...