All Questions
Tagged with esri-javascript-api or arcgis-js-api
1,002 questions
0
votes
0
answers
79
views
How to set the display extent of a featurelayer
const polygonLayer = new FeatureLayer
My service data is quite large, so I only want to load the features within a specified extent. I tried setting the fullextent but it didn't work. I can't use ...
-1
votes
1
answer
63
views
JavaScript function not returning array [duplicate]
I have an ESRI 3.46 JavaScript application. There are a couple of functions which return data from an API. I am looping through the results and creating an array to be returned to other areas of my ...
0
votes
2
answers
133
views
How Can I Avoid Calls to js.arcgis.com From My Javascript pp
I'm building a JavaScript app with the ArcGis JavaScript SDK. We have a requirement that the app should run on prem without external dependencies. How can I use the SDK without it making calls to js....
0
votes
1
answer
62
views
Angular + RxJS + Esri Feature Layer queryFeatures - applyEdits operations pipe & retry operation
I am trying to build an application where vpn connection plays a critical role so if a user disconnects from its vpn i would like to keep try to query or try to apply edit to feature layer if vpn ...
1
vote
1
answer
100
views
ESRI Search Widget - Edit Arcgis map js search input with multiple sources(version 4.30)
Currently I want to edit the dropdown source, and add a check box to select as shown, instead of displaying it as default. Anyone who knows please help me.
const searchWidget = new Search({
...
0
votes
1
answer
73
views
How to use PieChartRenderer (ArcGIS) in javascript
In my user interface, I want to display data per neighborhood via a pie chart, whereby different age groups correspond to different pieces of the pie chart. Relevant code:
import { setDefaultOptions, ...
0
votes
1
answer
98
views
Load specific layer of GeoServer to A WMSLayer using Esri JSAPI 4
I am trying to load a geoserver wms layer to a WMSLayer using Esri JS API 4.x, thought the code below loads ok using Esri JS API 3.x
require(["esri/layers/WMSLayer","esri/layers/...
3
votes
0
answers
76
views
Unable to update ArcGIS JavaScript SDK feature layer renderer dynamically
Following this ArcGIS JavaScript SDK sample, I'm able to visualize feature layer data using a continuous color ramp. However, I'm unable to update the renderer's color ramp value dynamically.
I would ...
1
vote
1
answer
226
views
Widget Not Adding Layers When Configured via JSON Config in React/Esri App
I am using ArcGIS Experience Builder.
I'm working on a React component that toggles visibility of map layers in an Esri map. My widget works perfectly when I hardcode the layers configuration, but ...
0
votes
0
answers
44
views
Popup.js:6 Uncaught (in promise) TypeError: d.ActionsCollection is not a constructor
The popup is not opening when I click on the point in the map and it leaves an error in the console, "Popup.js:6 Uncaught (in promise) TypeError: d.ActionsCollection is not a constructor"
...
1
vote
1
answer
312
views
ArcGIS Maps SDK for JavaScript Popups
I have ArcGIS for javascript 4.24 and the following code where i want to display a popup if the user clicks outside of a polygon.
view.on("click", function (evt) {
view.hitTest(...
0
votes
1
answer
435
views
ArcGIS Maps SDK for JavaScript 4.x - Passing token for secured FeatureLayer resource
I am migrating a 3.x Enterprise ArcGIS Server Javascript application to 4.x. The application adds secured FeatureLayer layers to the map using a service token that was generated by a separate process.
...
0
votes
0
answers
102
views
ArcGIS JS 4.x - layers misaligned
Currently using Arcgis JS API 4.28 (https://js.arcgis.com/4.28)
I'm stuck with two layers (basemap and data layer) not aligning up correctly
+++++
UPDATE #1 There is a flat file live demonstration so ...
1
vote
1
answer
447
views
How to add button with click event on popupTemplate in ACGIS JavaScript
I meet a problem when trying to add button on popupTemplate in ARCGIS JavaScript;My environment is node.js, and the version of ARCGIS JavaScript is 4.28.
The code snippet is as following:
const ...
1
vote
1
answer
407
views
Rename a namespace from an external npm package in typescript
I am working alot with the ArcGIS JS API in typescript, using their @arcgis/core ES6 modules. In that package, they export a namespace:
// @arcgis/core/interface.d.ts
declare namespace __esri {
// ...
0
votes
0
answers
233
views
No 'Access-Control-Allow-Origin' header is present on the requested resource when using arcgis javascript in node.js
I meet a problem when using ARCGIS JavaScript(version 4.9) to handle map data.
My environment is node.js with express.
the following is my code snippet:
esriConfig.request.trustedServers.push("...
0
votes
1
answer
456
views
ArcGIS Maps SDK for JavaScript: Feature Layer renderer not rendering UniqueValueInfos
My renderer for my featureLayer (My feature layer) only renders the Legend but does not draw out any features on the map. It seems as though my uniqueValueGroups are working but uniqueValueInfos does ...
1
vote
2
answers
710
views
Using an ArcGIS Online Web Experience in Offline Mode
I want to use an ArcGIS Online Web Experience in an environment where there is no internet connection. I installed the ArcGIS Experience Builder Developer Edition, created a new application, ran the ...
0
votes
2
answers
244
views
Geojson data is not properly visible on the archgis map
I am trying to show Pakistan flood data on the ArcGIS map. the map is loading fine. Geojsos' point is showing as well but when I click it, it doesn't show any data. Can you please look into this? I ...
1
vote
1
answer
287
views
Popup does not hide the fields correctly when using GraphicsLayer - ArcGIS Javascript API 4.x
Using ArcGIS API Javascript 4.x and a GraphicsLayer, the popup does not hide the fields correctly. It is working fine with FeatureLayer but I need to use GraphicsLayer for this request. Attached ...
2
votes
2
answers
7k
views
Multiple Default Exports error for Vue+Vite
I am working with Vue and using Vite and typescript. I have come across this problem that i get this error that says ```A module cannot have multiple default exports.ts(2528)``.
<script setup lang=&...
6
votes
2
answers
723
views
Add onClick handler to MapView in React?
I'm using the ArcGIS API for JavaScript to display a map and I want to get the selected feature when someone clicks on the map. This is my MapComponent
export const MapComponent = () => {
const ...
1
vote
1
answer
1k
views
Esri ArcGIS Map in Next.js app not working for me
Im having an issue getting a map to display via arcgis and next.js, perhaps if i had more eyes on it i might understand. Here is the code:
Main Page:
'use client'
import Header from './components/...
0
votes
1
answer
369
views
Get the ID of a new Feature after adding to MapView via Editor Widget
I'm pretty new to ArcGIS so pardon my ignorance: how can I get the ID of a newly added Feature of a MapView?
Using the ArcGIS JavaScript SDK, I have a MapView defined as follows:
var portalItem = new ...
0
votes
1
answer
328
views
Arcgis maps SDK 4.27 with Asp.Net Core 3.1 MVC does not read require tag constructors
The below code works when launched when created as an html page in notepad. However, once I try to deploy as part of a Asp.net Core project it will not display unless i change the Arcgis SDK down to 4....