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

0
votes
0answers
14 views

Finding cells at which polygon lies and also cells contained within polygon? [on hold]

I have divided the map into rows and columns at the backend using the extent height and width of map (ArcGIS API for JavaScript) and I have a set of polygons on the map. Now I want to know the cells ...
1
vote
1answer
27 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 ...
0
votes
0answers
9 views

ArcGIS Online credentials not recognized in Android app [on hold]

I have a Web app where I display WebMaps or WebScenes using the ArcGIS API for JS (version 4.10). It is working fine in desktop with maps or scenes shared both publicly or privately (where I need to ...
1
vote
0answers
25 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
24 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
9 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
26 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
13 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
26 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
35 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 ...
0
votes
1answer
32 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
20 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
27 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
37 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
49 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
43 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
43 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
92 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
13 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
35 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
74 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
108 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
32 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
153 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
66 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
62 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
22 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 ...
2
votes
1answer
44 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
37 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 ...
0
votes
2answers
355 views

CSVLayer doesn't show HeatMap in Angular 6

I am using ArcGIS JavaScript 4.8 API and I have integrated the CSVLayer to an Angular 6 application but it is not showing up any heat map. The legend shows that it is getting renderer data and heatmap ...
1
vote
0answers
57 views

Feature Layer not showing up when adding an automatic rotation function to SceneView

I am building a simple web application using the ArcGIS API for JavaScript (4.x). I created a map with an associated FeatureLayer and then a SceneView and everything works fine. However, I'm trying to ...
2
votes
1answer
132 views

Heatmap not working on FeatureLayer (ArcGIS JS API 4.8)

I tried my best but didn't get success to show heatmap on FeatureLayer with latest ArcGIS JavaScript API 4.8. My Code is located here. I used HeatMapRenderer to render the point on the map as the heat ...
0
votes
1answer
244 views

Get FeatureLayer Attribute by Clicking

I'm using ArcGIS API for JavaScript 4.8. My goal is to get the Census tract ID value of the clicked Feature in a FeatureLayer and display the ID value in an alert box. I got stuck when trying to use ...
-1
votes
1answer
24 views

What is the process for using data in various projections with the ESRI JS API v4.8?

We have an extensive collection of GIS data sitting in ArcSDE, exposed via map and feature services, and already in a regional (projected) coordinate system. We are starting to explore building web ...
0
votes
1answer
92 views

Radio Button in Layer List Widget Instead of Eye Icon

I'm using portalItem to display a web map in a web page and the Layer List widget to control the layer display. I want to show one layer at a time using radio buttons, instead of having to click on ...
1
vote
1answer
40 views

ArcGIS JS - Printing with private layers

I have a map built using ArcGIS JS API v4.8. The map has a basemap and FeatureLayer that are both secured by a custom API and a server-side proxy. I'm looking to make use of the Printing widget, but ...
2
votes
1answer
113 views

Add new fields to the FeatureLayer dynamically - arcgis JS API Version 4.7

I've uploaded GeoJSON to Esri cloud and created a feature layer. Now I'm able to plot the featurelayer into my map. I'm trying to color each feature based on measures which comes from my DB. Here ...
1
vote
1answer
365 views

How to load GeoJSON into map using JavaScript API in ESRI

I'm new to ESRI Map. I'm working on latest version of JavaScript API. I'm trying to load GeoJSON from https://bit.ly/2IZk4Nj into my Map. I'm able to load GeoJSON from ESRI Feature Service URL. I ...
0
votes
0answers
26 views

Esri ArcGIS API for JavaScript: how to return polygon info for point within polygon in KMLLayer

Using the 4.7 JS API, I have multiple KMLLayers on my map, each containing hundreds of polygons. Given a point on the map, How can I identify all of the polygons across multiple layers that contain ...
1
vote
0answers
180 views

Workaround for no point clustering in ArcGIS Javascript API 4.7

I'm working with the ArcGIS Javascript API v4.7 and I've run into a roadblock. I have several points on my map with the same coordinates. Therefore they show up exactly on top of one another with no ...
0
votes
1answer
133 views

Esri JS API 4.7 - Changing the view spatial reference in place

Asked this already in GeonNet, but asking here as well as I can get valuable help from both sites. I'd like to change the view.spatialReference property in place to be able to switch between basemaps ...
3
votes
2answers
284 views

XY Points incorrect on map (ArcGIS Javascript API 4.7)

Hopefully something silly I'm overlooking. I started building my map with this sample code But once I started using my own data, it isn't appearing correctly on the map. Example: These coordinates [...
1
vote
1answer
41 views

can the geometry element be accessed within CSVLayer in ArcGIS for JS 4.x

I was wondering if there is a graphic or geometry element that can be access within CSVLayer in arcgis JS 4.7, I have been unable to extract the geometry which I want to save as a JSON or array that I ...
0
votes
1answer
260 views

GraphicsLayer not redrawing visually while a Graphic is being dragged (JS API 4.7)

I've implemented a 'route between points' site using the 4.7 JavaScript API. The logic works fine, but I'm having a graphical display issue: when a point is picked up and dragged to a new location it ...
0
votes
1answer
157 views

Labeling a 2D feature layer in ArcGIS javascript API 4.x

I'm in the process of updating my application from ArcGIS JS API3.x to 4.7. I'm unable to add labeling to a feature class. As per ESRI, they support labeling only for 3D or a MapImage layer in 2D. In ...
3
votes
1answer
207 views

esriRequest json response to feature layer

I am using JavaScript 4.7 and I am able to retrieve json using esriRequest from our ArcGIS server. However, I have difficulty in showing this data on the map layer. the call map.addLayer(...
1
vote
0answers
72 views

How to connect to a Portal for ArcGIS js API

I have some issues connecting to my ArcGis Portal JavaScript API. I don't know what to specify in: require(["in here"], function (in here) { }); And also where to put authentification ...
1
vote
0answers
27 views

Change Order of Features in Popup with ESRI ArcGIS Javascript API version 4

I am using version 4.5 of the ESRI ArcGIS Javascript API with a MapImageLayer. I'm setting popup templates on each layer. The problem is that, when showing the Popup following a click in the map, if ...
0
votes
1answer
243 views

How to display related records in popup using ArcGIS Javascript API?

I am attempting to display related fields in a popup window. I've created a GraphicsLayer, consisting of features from the results of a QueryTask. Upon adding the features to the GraphicsLayer, I am ...
0
votes
1answer
89 views

Get field attributes from Esri JavaScript API query

I'm trying to get the geometry in an array from a queryTask using the Esri JavaScript API v4.7. I'm sure I'm missing something but I dont know what. I want to take geometry from this to then create a ...