All Questions
Tagged with arcgis-maps-sdk-javascript not javascript
1,960 questions
0
votes
1
answer
73
views
Create a point/Polyline on map
I am new to ArcGIS JavaScript API.
With below code, am trying to add a point/Polyline on the map
Spatial Reference is 2881
for Example POINT (914723.27587074414 524669.72858949) and PolyLine(912367....
0
votes
1
answer
49
views
How to get ordered results from ArcGIS in case of using statistics with group by
Now if I implement query via ArcGIS Server 10.7.1 using params like this including outStatistics, groupByFields:
params = { ....
'groupByFieldsForStatistics': 'DFIRM_ID',
'outStatistics': '[{...
1
vote
1
answer
703
views
Couldn't access MapView from Experience Builder Widget
My widget requires MapView and it needs use through out the application. However, I am not able to get it. The problem is activeViewChangeHandler is not executed at all. I followed this documentation.
...
0
votes
1
answer
45
views
Web AppBuilder Developer Edition - "this" Keyword Conflict with Button Element
I created a button element with an onclick handler using the following method:
domConstruct.create('button', {
...
value: someValue,
onclick: this.onBtnClick
});
The onBtnClick method uses the ...
0
votes
1
answer
56
views
Show only certain attributes in custom JS applications with ArcGIS JSAPI 4.25
When you publish a map service from ArcGIS Pro, you can control the popup field options that get displayed when viewing said map in the "Map Viewer Classic" page, as seen in the image below. ...
1
vote
1
answer
1k
views
Convert ESRI JS Graphic geometry into WKT format
I am drawing an object on map and retrieving it's geometry using following code:
this.draw = new SketchViewModel({
layer: this.drawLayer,
view: this.view
});
this.draw.on("create", function(...
2
votes
1
answer
178
views
Obtain a FeatureLayer's default renderer in ArcGIS JS SDK?
When creating a new FeatureLayer in the ArcGIS Maps SDK for JavaScript, it's possible to specify a renderer, to tell the layer how draw on the map.
If you don't specify a renderer, the symbology ...
1
vote
0
answers
86
views
JavaScript ArcGIS: Change style of Measurement widget 3D [closed]
I am using Measurement widget from ArcGIS SDK for JavaScript: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html
Everything works fine, however I would like to ...
0
votes
1
answer
312
views
Use my own map service ArcGIS JavaScript API 3.43
I have my own custom service map. I have a base map, layers etc...
I need to use it instead of ArcGIS default basemaps and layers.
For now I trying this:
<!DOCTYPE html>
<html>
<head&...
0
votes
1
answer
30
views
How do blur points when it is not selected by a filter in ArcGIS?
I want to implement a filter to be able to blur all points on my map.
const nzgdFeatureLayer = new FeatureLayer({
url: "url...",
definitionExpression:"",
...
1
vote
2
answers
216
views
Setting scale range for MapImageLayer in ArcGIS JavaScript API
I am trying to set scale range in JS API v 4.x as seen here in 3.x. However when I try to use the load event as in the example it does not work in 4.x.
Does anyone know how to accomplish this same ...
0
votes
0
answers
92
views
ArcGIS Javascript 4.25: Coded value descriptions in popuptemplate
Please help. I am using ArcGIS JavaScript 4.25 to display values in a popup using Query on a featurelayer (ArcGIS Server). The coded value is shown in the popup instead of the related description.
...
1
vote
0
answers
194
views
Change the state of a Sketch without destroying it (ArcGIS API for JavaScript and React) [closed]
I'm working on an application that the user defines a point on a map and then goes on to take that point's information to do other stuff. Originally, this has been done by having an event listener ...
1
vote
0
answers
26
views
Colorize extruded buildings by construction years in ArcGIS JS API
I would like colorize my extruded buildings by construction years like old ones red and new ones blue color. It is possible with renderer but I want it dynamic. I mean when I change years with slider, ...
0
votes
1
answer
339
views
Change background color of highlighted feature layer ArcGIS JavaScript
I have a feature layer and I am highlighting the feature of the feature layers on click. It is working fine.
Now what I want is, I want to change the background color / fill some color in that ...
1
vote
0
answers
48
views
Filter extruded buildings by colour according to their construction year in ArcGIS JavaScript API
I tried to filter my extruded buildings according to their construction year. I saw this example: https://developers.arcgis.com/javascript/latest/sample-code/visualization-sm-color-mesh/ and tried it ...
1
vote
1
answer
57
views
Highlight my selected 3D buildings in ArcGIS JavaScript API
I tried to query and select my 3D buildings related to their names or heights and can achieve the selection but I want to highlight selected ones. How can I do that?
Or is there any better way to ...
1
vote
1
answer
59
views
Connect query on button in ArcGIS JavaScript API
I tried to connect my query code to the button. I want to show my 3D building features on a map related to their height values. When I click or slide my button, I want to see or highlight buildings ...
1
vote
1
answer
502
views
How Can I Edit or Save My Features on Database in ARCGIS JS API
I create a map by using Esri JS API and try to edit my building features. I want to create new features (or delete them) on the map and I want to save changes on my database. How can I do that?
...
1
vote
2
answers
166
views
How do I pass the clipping parameter for the export request in ArcGIS API for JavaScript 3
Starting at ArcGIS Server 10.8, for map services using the ArcGIS Pro runtime, the export request now supports the clipping parameter to clip the image produced, according to the geometry included in ...
1
vote
0
answers
50
views
Using searchWidget.on()
I am new to using widgets and when using search with several layers and when performing a specific zoom in each one of these (layers of points and polygons) it happens that the zoom is carried out at ...
0
votes
1
answer
775
views
ArcGIS JS - How to destroy, clear, erase, free and get rid of features?
I'm using ArcGIS JS 4.25.5 and Angular 14.
I have a map where I can dynamically load and unload layers, and this map serves multiple purposes throughout the software, so I have to strip out all the ...
0
votes
1
answer
298
views
Change the size and color of the box that contains the legend and the layers
I am new to JavaScript. I have a code for a globe of the planet. I have to change size and colors of the box where the legend is. How can I change the size and color of the box that contains the ...
1
vote
1
answer
72
views
How to use an image as the base of a SceneView in ArcGIS for JS 4.x
In SceneView I want to add an image as the base image what do I do?
It looks like this picture.
0
votes
1
answer
253
views
ArcGIS JSAPI 4.24 - Map Only Renders Locally and Not Remote
My organization is in the process of overhauling our self-hosted ArcGIS setup and as such we are moving from the 3.27 JSAPI to the 4.24 JSAPI with all our of in-house web apps. We are using the ...
1
vote
1
answer
249
views
How to control the highlight effect when opening a feature layer's popup?
By default, when a featureLayer has a popupTemplate specified, clicking on the feature will open the popup and also apply a highlight effect to the feature, as in the Intro to PopupTemplate example - ...
1
vote
1
answer
141
views
How to obtain the visible extent of a SceneView?
Using the ArcGIS JavaScript API v4.24 it's possible to get the Extent of a SceneView::
The extent represents the visible portion of a map within the view
This works as expected in a 2D MapView, or ...
1
vote
2
answers
435
views
Displaying all attributes on click for features in Map Image Layers (ArcGIS JS 4.24)
I am using the ESRI JS 4.24 API to create a mapping application that pulls in a Map Image Layer that is hosted on ArcGIS Portal. I am having trouble getting attributes to show in my pop-up. I would ...
0
votes
1
answer
681
views
How to abort pending query requests?
Using ArcGIS JavaScript API 4.24 I have a map which is configured to query a layer each time the map extent changes. This means that multiple sequential requests are sent if the map is moved quickly:
...
1
vote
1
answer
139
views
How to match a query's response to its parent query?
Using ArcGIS JavaScript API 4.24 I'm triggering a series of queries, then sending the responses to a function to handle them. Here is a simplified example:
let whereClauses = ["capital = 'Y'"...
0
votes
1
answer
95
views
How to use ArcGIS uniqueValues For two Fields in ArcGIS JavaScript API
Using ArcGIS JavaScript API 4.24 and uniqueValues from esri/smartMapping/statistics/uniqueValues I am able to get Count of all features in a FeatureLayer (fcLayer in this code)
In this example respond ...
1
vote
0
answers
145
views
Time slider for image service
I am trying to make a time slider for an imagery service that would take the time stops from the imagery dates. The imagery service has been published from a mosaic dataset that has a field called &...
0
votes
1
answer
707
views
Select by rectangle or by click using ArcGIS JavaScript API
I have a small button that has one job, select features on the Map. I am using the SketchViewModel class, to create a rectangle. Then use this rectangle to query features that intersect it. The ...
0
votes
1
answer
498
views
Map Disappearing on HTML page when Sizing is changed from pixels (px) to percentages (%)
I am trying to allow this map to be resized via screen size (Mobile, Tablet, Chrome (Half Screen, Full Screen, etc.) so I know I can't set a specific pixel amount. However, when I do set a percentage ...
0
votes
1
answer
75
views
JavaScript ArcGIS: Update scene clipping area after creation
I want to update (increase / decrease) scene clipping area after I create it. My goal is to give the user ability to adjust the clipping area. I am using scene view, if that's relevent.
I've managed ...
0
votes
1
answer
487
views
Get feature id onclick using ArcGIS JavaScript API (from vector tile layer)
Similar to the question asked here - Get features onclick ArcGIS JavaScript API.
I want to get attributes of a feature clicked using ArgGIS Js v4 API. MabBox / Maplibre allows for this - https://docs....
0
votes
1
answer
1k
views
Loading WebMap using ArcGIS API for JavaScript
I am attempting a very basic script that loads a Portal WebMap using the Esri JS API. Here is the error message I am getting:
(index):146 [esri.WebMap] #load() Failed to load web map
l
details:
error:...
0
votes
1
answer
149
views
Modifying text and adding suffix to legend items in ArcGIS JS API
I have put together a simple ArcGIS JS webapp that draws data from a webmap, which you can see here.
I'm currently stuck at modifying the legend itens to include a percentage sign (%) after each class....
3
votes
1
answer
601
views
Deploy Custom ArcGIS API for JavaScript App (NOT a Web App Builder or Experience Builder App) to Portal for ArcGIS or ArcGIS Online
I have read this question, https://community.esri.com/t5/arcgis-api-for-javascript-questions/deploying-a-custom-web-map-app-on-..., but the answers did not address the question. I have also searched ...
0
votes
1
answer
245
views
Using JavaScript unable to work out how to log into organizational ArcGIS Enterprise Portal
I have written an ArcGIS app using JavaScript API 4.23 accessing ArcGIS online (personal account). The code is stored in an .html file I have saved on my hard drive. I now want to point the app at my ...
0
votes
0
answers
95
views
geometry/quantizationParameters vs. cacheHint/resultOffset/resultRecordCount
Very simple code, something like this:
const featureLayer = new FeatureLayer({
url: "https://domain.org/arcgis/rest/services/Layer1/FeatureServer/0",
});
map.add(featureLayer);
This ...
0
votes
1
answer
47
views
ArcGIS: Fetching raster tiles that are custom desined
Is it possible to fetch tiles as bitmaps, that were designed in a map builder by ArcGIS, like it can be done in Mapbox?
1
vote
1
answer
1k
views
Trigger click event on existing map marker
I am showing some markers using latitude and longitude, but there is a navigation drawer view, where I can click on the location.
So if I click on any particular location from the drawer, how can I ...
1
vote
0
answers
83
views
ArcGIS JavaScript API and Wordpress: How would you populate text box outside map with info from inside the map
So, using WordPress, my organization is creating a survey/questionnaire. Within this multi-stage questionnaire, they want an address box with a map underneath. They want the user to be able to type in ...
1
vote
1
answer
1k
views
How to temporarily disable a feature layer's popup, then restore it again later?
I have an ArcGIS Server JavaScript API v4 map containing some feature layers which each have a popupTemplate defined, so clicking on the layer(s) automatically shows the layers' popup.
I need to ...
2
votes
0
answers
381
views
Create Extent to use in mapView.goto
I would like to use the goTo() method of the mapview, and pass it an Extent that I construct in the code.
I created the extent by:
const extent = new Esri.Extent({
xmax: maxX,
xmin: minX,
...
0
votes
2
answers
204
views
Disable "world hillshade" layer from esri/map in JS
I'm using arcGis on the web with js api.
I'm creating a new map:
new Map({
basemap: 'topo-vector',
}
when i observe the map, i see that besides the 'topo-vector' the is another layer: "world ...
0
votes
0
answers
148
views
ArcGIS API for JavaScript 4.23 : Cannot use SQL CAST function with layer.definitionExpression but it work fine with query builder
I'm working with features which needs to be filtered.
I need to use the definition expression : https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html#definition...
...
1
vote
0
answers
346
views
Adding angular component to MapView.UI ESRI JS API
Stack: (Angular 13.x, ESRI JS API 4.22)
I have three components
Form (first thing the users see when the app loads)
Dashboard component ( it contains the component bellow )
mapview.component.ts (this ...
0
votes
0
answers
400
views
Is there an "Add Data Widget" equivalent for the ArcGIS Server JavaScript API?
The ArcGIS Web AppBuilder has an Add Data widget which:
allows you to add data to the map by searching for layers in ArcGIS content, entering URLs, or uploading local files. In this way, you can ...