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
3
votes
1answer
160 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
156 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....
0
votes
0answers
14 views

Installing JavaScript locally on federated ArcGIS Server

I am installing JavaScript locally on an ArcGIS Server that is federated with Portal and uses the Web Adaptor on the Portal machine. I am following the instructions here: https://support.esri.com/en/...
0
votes
1answer
18 views

Group layers in layer list

I'm new to ArcGIS API for Javscript V3, and trying to dynamically create group layers and add layers together in a existing layer list. I'm not sure how to get this done.
5
votes
2answers
3k views

Getting value coded of domain from map layer with arcgis javascript api

I'm trying to read domain values on a map, how to achieve this objective in arcgis javascript api? any help?
0
votes
1answer
195 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
1k views

Creating buffer using ArcGIS API for JavaScript?

How can I create a buffer that is based on the shape of the geometry that has been drawn? My map application creates a default square buffer extent and I want to create a buffer round a circle based ...
0
votes
0answers
23 views

Customizing legend in layerlist widget of ArcGIS API for JavaScript?

Here is an example code that I use in my work. There are a few issues with this: The layer title appears one more time in the legend of layerlist. How can I remove it or change to other text? ...
1
vote
1answer
225 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
0answers
36 views

Using ArcGIS Online for public-facing site, while keeping source datasets private?

I would like to build a public-facing map using the ArcGIS Server JavaScript API, which will display datasets stored in ArcGIS Online. ArcGIS Online seems to work on the premise that all users have a ...
1
vote
2answers
299 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 ...
0
votes
1answer
36 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 ...
0
votes
2answers
38 views

Select all features from current map extent ArcGIS JavaScript 3.29

I am trying to select all the features which are present in the current extent of map i.e which are visible on screen. I find this link helpful but it iterates through all the graphics and check if ...
3
votes
1answer
230 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
2answers
1k views

How to get Symbol from a feature layer

How can I get the symbol from a FeatureLayer? I want to use the symbol of a FeatureLayer to symbolize a graphic layer.
2
votes
0answers
60 views

Esri mapview USGS earthquake trigger popup from outside of map

I am trying to show some recent earthquake information in Esri maps using USGS earthquake API data. I am able to fetch the list from API data and also I got the map with those listed information ...
0
votes
1answer
39 views

Getting MapView to stay within bounds

Working with a map to only allow panning within a certain set bounds. In my case I want the application to allow the user to pan around just within the bounds of a specific Island. So far I can only ...
0
votes
0answers
39 views

esriRequest error No 'Access-Control-Allow-Origin' header is present on the requested resource

I have an API that uses Basic Authentication (Username, Password). I am trying to use this in an esriRequest to pull back the JSON data object from the GET request. To test this (and potentially avoid ...
3
votes
2answers
68 views

Snapping does not work for WFSLayer in ArcGIS JavaScript API 3

I have a web application that I now need to use WFSLayer for some of the map layers. The problem is that snapping does not seem to work for WFS layers. The layer I use for drawing is a FeatureLayer. ...
1
vote
0answers
18 views

GeoJSON Layer - ArcGIS JS API - External URL with oAuth2.0

I am using ArcGIS JS API and connecting to an external GeoJSON service for my GeoJSON Layer. However, for security reasons oAuth2.0 has been enabled on the service. So now I am lost as to how to ...
1
vote
2answers
158 views

Getting halfway point in Polyline in ArcGIS API for JavaScript?

I would like to reach the mid point of a polyline. I just tried the centroid and realcentroid properties but I only got a soluction in ArcPy with the code below: Midpoint = geometry....
0
votes
1answer
68 views

How to Specify Out Unit to Be in Decimal Degree in ArcGIS JS API

I am using a Map service on ArcGIS Server 10.4.1 which is in this format Spatial Reference: 102100 (3857) Single Fused Map Cache: false Initial Extent: XMin: -9819759.37726215 YMin: 5128008....
1
vote
1answer
25 views

ArcGIS JavaScript API set size of CSV Marker by attribute

Using ArcGIS Javascript API 3.29 is it possible to set the size of a CSV Layer marker using a field value through the renderer? Using this EXAMPLE in their samples, they add a CSV layer to the map ...
0
votes
1answer
22 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 ...
2
votes
1answer
39 views

ArcGIS JavaScript API popup-show all attributes

I'm publishing services to ArcGIS server and I want to test them out in a simple HTML web map. I would like to create a pop-up window to test if the attributes are coming through. Since I will be ...
2
votes
1answer
146 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 ...
1
vote
1answer
19 views

esri/dijit/editing/AttachmentEditor use proxy when viewing attachments

I'm trying to figure out why the ArcGIS JavaScript API AttachmentEditor does not use a proxy when viewing attachments. I have my proxy set up correctly, and it uses it in every other situation but ...
0
votes
1answer
34 views

ArcGIS JavaScript API Buffer Units from Dropdown

I am trying to create a buffer that will have the distance and units inputted by the user. I'm having trouble getting the JavaScript to recognize the which Unit of Measurement the buffer is being ...
2
votes
0answers
130 views

How update location field (geometry) in Oracle Spatial using asp.net web application?

I want to update a geometry column in Oracle Spatial database via Asp.net web application, I couldn't find samples for update query or datatypes that can hold geometry data in asp.net. I use C# for ...
1
vote
1answer
19 views

Why is the CSV Layer converting a Date-Time field to Unix Timestamps?

I am using the ArcGIS JavaScript API to add a dynamic map in my application. I am loading data through a csvLayer. The data looks something like this: Here's a snippet of me initiating the csvLayer: ...
0
votes
0answers
15 views

Display Feature Layer content on default popup ArcGIS Javascript API

I have a map that import a layer using the function var layer = new FeatureLayer( url: "https://xxxxxxxx" outfields: ["nom_cant", "nom_prov", "nom_distr"], ) Also I am using the default popup (...
0
votes
1answer
41 views

Creating bounding box in ArcGIS API for JavaScript?

I am trying to create a bounding box for my map in ArcGIS 3.28. I want the bounding box to stay in a given area based on the coordinates given. I found a class called Extent in the API Reference that ...
1
vote
1answer
107 views

Set extent in a webmap Esri

I'm creating a storymap from a developers tutorial I found on Esri. The point of the tutorial is to insert an additional reference map. Everything is working well but I want the extent to closely ...
2
votes
1answer
54 views

Using Google Maps Restricting Bounds API with ArcGIS JavaScript API?

I am trying to make a map with ArcGIS 3.29, but in my map I need a bounding box. The ArcGIS API does not have a bounding box function, but the Google Maps API does. What I am having trouble with is ...
1
vote
0answers
24 views

Access secure services from ArcGIS Portal with API JavaScript [closed]

I was reading this tutorial, that explains how to access secured services on ArcGIS Online. But I wonder if there is a way to do the same but with Portal and access my secured own data.
1
vote
0answers
22 views

Keeping TOC layers unchecked on first load in ArcGIS JavaScript API

I am new to ArcGIS and it's API. I am using NLiu's TOC widget for displaying the layers. It is working perfectly, however, I wanted to keep all layers unchecked when it is loading on the browser (for ...
0
votes
3answers
387 views

Zooming into a particular polygon

I am getting the polygon id by doing identifyParams.geometry = evt.mapPoint; identifyParams.mapExtent = map.extent; identifyTask.execute(identifyParams, function(result) { var i; var ...
2
votes
1answer
1k views

Programmatically accessing declarative ToggleButton? [closed]

I've just started with Dojo/Javascript and even though I kind of understand all the AMD way of coding, I keep getting stuck on these (probably) easy things. How can I programmatically access a ...
1
vote
1answer
45 views

Unable to zoom using ArcGIS API 3.28

I've been trying to create a map and have it's initial zoom and center position be the query result's coordinates (a polygon, in this case) but it just refuses to zoom in, both using zoom in the ...
2
votes
1answer
128 views

ArcGIS API 4.11 JavaScript - “Click” “drag” stopPropagation()

Using JavaScript in the ArcGIS API, I am querying a feature layer from a Map View, calculating points within a certain radius when the user "click" "drag" with the mouse. I want to be able to stop ...
6
votes
3answers
5k views

Turn Popups On/Off in ArcGIS Online Webmap via Javascript API Web Application

I am writing my first ArcGIS Javascript API web map application and consuming a web map authored in ArcGIS Online. The ArcGIS Online web map apparently does most of the work for me in terms of ...
1
vote
1answer
36 views

ArcGIS JavaScript 3.28 extent not working

I'm trying to get an extent to work on a web map app but keep getting an error when trying to pass the extent parameter: <!DOCTYPE html> <html> <head> <meta http-equiv="...
1
vote
0answers
52 views

ArcGIS-JS-API failed to execute query

I'm trying to execute this (it's JavaScript but it doesn't matter): queryTask.execute(query, function (results) { and I get an error: Failed to execute query These are the parameters: var ...
0
votes
1answer
113 views

Custom pop-up for multiple results in ArcGIS Online application

I have a point layer that contains business locations where the businesses offer services from different providers. i.e. competing businesses. A customer is requesting a modified pop-up to display, ...
0
votes
1answer
46 views

Configuring attachments for ArcGIS Local Government “Citizen Service Request” App

Has anybody configured the Citizen Service Request app that ESRI's Local Government has developed? I have it ready to go, but can't get the attachments to work properly, either pics or documents. I ...
2
votes
1answer
625 views

Legend label failed to send to print service using ArcGIS javascript?

I am try to print my map with legend to PDF format; however, the legend label in the PDF is saying Override 1 instead of the label I specified in class breaks. There are other maps I can print ...
5
votes
1answer
291 views

Drawing geometrical shapes with dimensions using ArcGIS API for JavaScript?

I have to draw the geometrical shapes with their dimensions and show it with that shape. As in below images, I want to show the length and width of the rectangle, the radius of the circle and the ...
2
votes
1answer
23 views

Adding featureSet into a featureLayer (dynamic renderer)

I'm trying to use a renderer and a legend on data from a featureSet, it displayes symbols and popups but the renderer fails. The data comes from a featureLayer but I display it with view.graphics so ...
0
votes
1answer
33 views

How to filter a csvLayer based on attributes?

Ill start out by just explaining what I'm trying to achieve. I'm running an arcgis application based on the javascript API. I'm Rendering a CSVLayer into my SceneView like such: require(["esri/Map", ...
2
votes
3answers
1k views

Restricting zoom levels based on Bing Map availability?

My site is built on ArcGIS Server 10 with the JavaScript API 2.3, and uses Bing Maps as the background mapping. Although the site is aimed at NSW, Australia we allow the user to zoom anywhere in the ...