The ArcGIS API for JavaScript is a web mapping API from Esri.

learn more… | top users | synonyms

0
votes
1answer
12 views

ArcGIS Javascript API AMD require syntax and Dojo ContentPane compatibility

I am trying to recreate the ArcGIS Javascript API/Dojo ContentPane layout template shown here for my own custom application. I would like to switch from using dojo.require() legacy syntax to using AMD ...
3
votes
1answer
14 views

Define a circle extent using the circle tool - arcgis javascript api

I have the following script for drawing a circle and I want to limit the user to a predefined radius: $('#circle').click(function () { clearPreviousSearch(); ...
0
votes
1answer
14 views

ArcGIS API for Javascript Not Adding Layer and/or Graphic during mouse event handler?

I am trying to add a graphic to my graphics layer during a map mouse event. In the javascript console, I can see that my graphic object is created and no error is thrown when I add the graphic to my ...
0
votes
1answer
19 views

Unable to print using ArcGIS javascript under IE9

I am trying to print a web map using ArcGIS javascript 3.10 under IE9 but got RequestError: Unable to load ...
1
vote
1answer
29 views

query.where statement using date range in JS API

I'm trying to construct a query.where statement using 2 input type=date fields on the page. The date field in SQL Server in the format 2014-12-31 00:00:00.0000000. The input fields date is in the ...
0
votes
0answers
20 views

Prevent rendering of a layer until time definition is applied

I want to add layers to a map, with some criteria. Before the layer is drawn, I want to a set a time definition on the client-side to limit the data being rendered. I've tried setting the time ...
1
vote
1answer
32 views

Programatically add feature to Feature Layer with ArcGIS JavaScript API

I've so far been able to add a feature layer from an ArcGIS server, and I've also been able to add an editor widget which allows me to draw to feature with the mouse. The added features are being ...
1
vote
1answer
18 views

ESRI Javascript API OAuth support for non-arcgis-online application

We are just in the opening salvos of developing a self-hosted ArcGIS Web application. All the OAuth examples I see seem to be assuming ArcGIS Online logins, or that the application will use those ...
1
vote
0answers
19 views

How to print CJK characters in the title using ArcGIS javascript api?

I am trying to print Chinese characters title using ArcGIS javascript (3.10); however, the characters becomes a square block. I am able to see the characters in the JSON passed to the print task but ...
0
votes
1answer
15 views

displaying coded names in the grid

I am trying to display coded names (treespecies) in the grid, instead of values using arcgis java script. It says updateFeature is undefined. Below is my entire code, which I tried. <!DOCTYPE ...
0
votes
0answers
49 views

Chrome/Firefox Performance Issues

Just curious if anyone else is having performance issues with Chrome and Firefox while using an arcgis javascript web application. I have been developing an application that works great in Internet ...
1
vote
1answer
23 views

Plotting the centroid of a polygon feature layer

I'm working with arcGIS javascript api 3.12. My current call for displaying the feature layer is as follows: var recLayer = new ...
2
votes
1answer
48 views

arcgis javascript api map spatialreference changes when i add a layer

This one is strange: i have a map that takes features from a gp service and turns them into a graphics layer. If i add the layer, for some reason the map's spatialreference changes from 4686 to 4326, ...
0
votes
1answer
26 views

Is it possible to use the symbology of an already published map service, so as to create a renderer in javascript api?

I have created a map service with fixed symbology. I want to create a graphics layer which will use the same symbology, through a renderer. In other words, I want to use the already existing ...
2
votes
1answer
25 views

Takes Two Clicks to Select New Feature

I'm writing a web app using ESRI's Javascript API and a map I created in ArcMap 10.1 hosted on ArcGIS online (Feature Service, not WebMap). I have written the code necessary to print attributes in a ...
1
vote
0answers
35 views

graphics all change to same color when map zooms in or out

As the title states, I have a working "draw tool" where you can draw on the map using polygons, simple marker symbols, lines, and text. Whenever you draw any of these symbols on the map using ...
0
votes
1answer
16 views

Automatically select the default feature in TemplatePicker ARCGIS Javascript

I am using this example to implement the editing on my map. Editing Without Widget ARCGIS Javascript The code employs a templatepicker which uses the layers on the map to show the features which can ...
0
votes
1answer
42 views

Configurable map viewer (CMV) - Find the area of drawn polygon

I am trying to get the area of a polygon and divide that by 16.94 ft^2. I have plugged in a Template I found. I am missing something. I am trying to get the template and my original code to talk. ...
1
vote
1answer
21 views

set definition expression based on slider values

Using the Esri JavaScript API I want to control the set.DefinitionExpression values based on a user controlled range slider. The data is loaded from REST as ondemand using: var POP_Total = new ...
0
votes
1answer
32 views

How to get drive distance polygon with ServiceAreaTask?

I'm using an ArcGIS Online ServiceAreaTask to calculate drive-distance polygons. In the ServiceAreaParameters that I pass to ServiceAreaTask.solve(), there is an attribute named impedanceAttribute. In ...
0
votes
1answer
38 views

How to customize the ArcGIS print legend text using javascript

Is there a way to customize ArcGIS print service so that it will not print the layer id and the string that is given in ClassBreakRenderer in the legend. var layer = new FeatuerLayer(url, { id: ...
0
votes
1answer
37 views

How to add customization to Configurable Map Viewer (CMV)?

Looking to learn more about CMV Viewer. For example, how would I add capability like: map on load: for learning how to configure CMV Viewer for my own needs, I'd like to start by learning to add ...
2
votes
1answer
30 views

Popup in Sidebar With Hosted Feature Layer, not ArcGIS Web Map

I see this example of how to put the contents of a popup into a sidebar, but I can't really follow it. I'm not sure how to implement it for my site, which uses feature layers hosted on ArcGIS Online, ...
0
votes
0answers
35 views

API for Java and JavaScript app integration

Are there any APIs to make calls or integrate JavaScript functions to a Java written application? I have come across Rhino's liveconnect.js, but this is uncharted territory for me, and would like a ...
0
votes
1answer
63 views

Finding the closest facility in a feature layer from a webmap

I have created a webmap on which a feature layer is displayed and I'm trying to find the closest facility when the user clicks on the map. Based on Find closest facilities in the Javascript API ...
0
votes
1answer
26 views

How to upload shapefile as input to geoprocessing service using javascript api

I need to pass a shapefile as input to my geoprocessing service so as to perform extra process with the features included in it? The geoprocessing service will be called from the clients web page ...
0
votes
1answer
18 views

why the graphics layer coming from the Geoprocessing service in WGS_84, is projected correctly on a Web Mercator Auxiliary Sphere Basemap

I have made a Geoprocessing service, which results (features) are in wgs_84 (4326). My map's spatial reference is wgs_84 Web Mercator Auxiliary Sphere 102100 (projected system) Considering that the ...
1
vote
0answers
30 views

404 Encountered Loading Legacy (v2.8) PrintTemplate in ArcGIS JS API

I'm very new to ArcGIS so forgive me if this is a rudimentary problem. I've created a simple page which implements the PrintWidget and PrintTemplate functionality Building this small example using ...
0
votes
0answers
39 views

ArcGIS API Javascript Server creating a dropdown menu

I am trying to rebuild this ESRI example with my own feature layers: https://developers.arcgis.com/javascript/jssamples/dataadapterfeaturelayer.html Since I just want a dropdown menu existing out of ...
0
votes
2answers
47 views

Javascript + ESRI + Dropdown menu with layers

Dear people of stackoverflow, I have a script that generates a basemap with a layer that I have put on top of it. I am trying to create a dropdown menu in which the user of my HTML5 page can select ...
0
votes
1answer
32 views

How to re-project graphics returned from a geoprocessing service on the fly? [duplicate]

I have a geoprocessing service returning a feature-set in WGS_84. I want to show that graphics on the map using Arcgis JS api. As I can see my geometries are not re-projected on the fly, since my ...
0
votes
1answer
21 views

How to work on map created by using arcgisUtils.createMap

arcgisUtils.createMap(id,"map").then(function(response){ //update the app dom.byId("title").innerHTML = response.itemInfo.item.title; dom.byId("subtitle").innerHTML = ...
0
votes
2answers
35 views

How to make a geoprocessing service return results in a specific spatial reference

I have made a geoprocessing service which retrieves data from my enterprise geodatabase. My geometries are stored in wgs 84 srid (4326), but i need my data to be returned with a different spatial ...
0
votes
1answer
17 views

How to hide labels in ArcGISDynamicMapServiceLayer

Hi guys does anyone know how i would go about hiding labels in a ArcGISDynamicMapServiceLayer? This is part of my code so far: var routeLayer = ArcGISDynamicMapServiceLayer(...); ...
1
vote
1answer
62 views

Map Spatial Reference

I was having some trouble when trying to zoom to certain point in ESRI base map. So basically I got an ESRI base map and added a map overlay on top of it: function setMap() { function init() { ...
2
votes
2answers
55 views

How to prevent ArcGIS JS map from failing when using a Bootstrap “hidden” class?

I'm trying to put an ArcGIS Server JS API map within a div with a hidden-sm class in Bootstrap 3, so that the map is not shown on small devices. <div class="row"> <div class="col-md-4 ...
2
votes
2answers
51 views

Javascript API: How can I change renderer on the fly with feature layer hosted on ArcGIS Online?

I am new to Javascript and somewhat new to GIS (especially web applications of GIS). I'm trying to understand how I can have a drop down menu or html buttons to change which data is rendered in my ...
0
votes
1answer
43 views

Configurable Map Viewer (CMV) - average the values of the points

I have been able to select points and find the sum of the points. What I really need is to average the points. Here is my (acquired from someone else) code for finding the sum. define([ ...
0
votes
1answer
31 views

How to avoid Cross Origin problem when trying to use ArcGIS Online Geocode server?

I'm trying to use a javascript locator object with a geocode server of ArcGIS Online: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Locators/ESRI_Geocode_EU/GeocodeServer When I call the ...
0
votes
0answers
21 views

Legend label failed to send to the 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 ...
1
vote
1answer
26 views

Polyline graphics not displaying in Javascript API?

I am getting features (graphics) back from an IdentifyTask, setting a symbol and adding to a graphics layer. Polygons and points show up just fine, but not lines. Has anyone else encountered this? ...
1
vote
1answer
60 views

Configurable Map Viewer (CMV) - select by drawing polygon around points, then average the values of the points

I have seen this question and have tried the code suggested: Adapting ESRI ArcGIS API for JavaScript Feature Layer With Selection sample for use in Configurable Map Viewer (CMV) But I have been ...
1
vote
1answer
35 views

Automate testing of web app based on ArcGIS JS API

So, there are multiple products that can let you automate testing interaction with web pages. I have used Selenium IDE for some time now and it works great for creating unit tests for HTML elements on ...
2
votes
0answers
40 views

ArcGIS Server Map Service - Best Way To Visualize Coincident (Identical) Point Features

I have an ESRI Map Service serving out several point layers with 10k+ point features. Because of these high feature counts, I use a dynamic map service where a symbolized image is generated on the ...
1
vote
1answer
30 views

Filter Geocoder by Country

I'm trying to filter esri's geocoder for a specific country. I've had some success, but nothing works extremely well. I would have thought simply adding sourceCountry = "xxx" to the parameters of ...
1
vote
1answer
60 views

ArcGIS javascript API setDefinitionExpression returns wrong result set

New to GIS and ArcGIS. I am trying to use the javascript API setDefinitionExpression to limit the output of a FeatureLayer on the map; however, the result set returned by the function is incorrect. ...
0
votes
1answer
35 views

Trying to add graphic to query result

I'm pretty new to javascript and have some code that zooms to a query results extent, but I also want to highlight the query result. Console.log shows I'm returning an object but i cant seem to add ...
1
vote
1answer
49 views

Programmatically access a declarative ToggleButton

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 widget ...
1
vote
1answer
26 views

Create event handler for “x” button on type: 'floating' widget?

How do you create event handler for "x" button on type: 'floating' widget? "OnClose" fires every time: this.parentWidget.hide(); is called. I want to intercept the event when the "x" button in the ...
0
votes
1answer
40 views

How to set the map extent so as to show conccurently all the features included in different map layers

I want to load may diffent layers on my map using the ArcGis JS API. I want to set my map's extent so as to show all the features of all the layers concurrently. In other words I am looking for the ...