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
5
votes
2answers
4k views

How to trigger a hover event for map graphics in ArcGIS Javascript API?

I want to trigger an event when the user hovers over a geometry that they drew. I know how to set up hover events for DOM objects, but not for graphic elements within the map window.
5
votes
1answer
681 views

Unclear on proxy used for AJAX in Javascript

I do understand how the proxy helps in transferring the XMLHttpRequest between the ArcServer and the Server (IIS/Apache) but where I am confused is that the first time the Html Doc loads, doesn't the ...
5
votes
3answers
3k views

ArcGIS Portal use server-side obtained authorization in the client / JavaScript

I have an ASP.NET MVC web application that is authenticating users server-side against ArcGIS Portal successfully using Owin.Security.Providers.ArcGISPortal. I would like to use the granted ...
4
votes
1answer
2k views

ArcGIS Geoprocessing Service Output Location

I am publishing an ArcGIS geoprocessing service using a Python script tool and can't seem to figure out the correct output path to use. I would like to share the results as a map service, which means ...
4
votes
3answers
1k views

Retrieving geoprocessing results in ArcGIS JavaScript API

I'm executing a geoprocessing script in an ArcGIS JavaScript API map viewer, and it works until I attempt to read the job's output parameter. My script: function extractModel(results) { var ...
4
votes
1answer
491 views

Zoom hangs ArcGIS API for JavaScript application?

I'm using ESRI arcgis 3.13 I have map with minZoom set to 3. When user tries to zoom in to level 19, the program just hangs and after a while, comes back with a generic browser error not from the ...
3
votes
2answers
3k views

Javascript Api's ArcGISTiledMapServiceLayer won't show map

I am currently trying to show a map that has been tiled. I am using version 10 of the Arcgis server, and version 2.5 of the Javascript api. The odd thing I am running into is that the map will not ...
3
votes
3answers
866 views

Should I start a new project using the Silverlight API?

I'm about to start a new mapping project for a client, and am considering using the ArcGIS Server Silverlight API, since it gives a lot of the required functionality out-of-the-box (especially with ...
3
votes
1answer
3k views

How to synchronously execute a queryTask

How can a queryTask be executed synchronously? I'd like a feature set to be returned instead of deferred object.
3
votes
1answer
984 views

TitlePane not rendering - working with basemapGallery sample code

I am attempting to implement the basemapGallery code found in the API samples here. There seems to be an issue with the TitlePane into which my basemapGallery is nested. It simply does not render. ...
2
votes
5answers
4k views

Convert geographic coordinates to UTM zone 29N with Javascript

I have an issue converting lat longs to UTM with the ArcGIS javscript API. Lets say that I have a map, based on the UTM zone 29N, also known as WKID 32629. I have a known set of coordinates from a ...
2
votes
1answer
453 views

Is it possible to add vector tile layer published by GeoServer layer using ArcGIS JS API?

GeoServer can publish vector tile layer in format of “application/x-protobuf;type=mapbox-vector”, and I believe the ArcGIS JavaScript API supports this format. So is it possible to add vector tile ...
2
votes
2answers
509 views

ArcGIS Javascript Viewer with ArcGIS Server [duplicate]

I'm certain this question must have been asked/answered, but I just can't find it. I'm running ArcGIS Server and want to build a basic viewer that points to my locally hosted services. I'm not ...
2
votes
1answer
809 views

Accessing secure ArcGIS Online map service from custom web mapping application?

I'm building a custom web mapping application for a client. The application will be hosted externally to ArcGIS Online, but the application is registered with AGOL. The application will access the ...
2
votes
2answers
4k views

Intersect features / point in polygon

I have a base map on top of which I have added a feature layer . I pull thousands of json data from my db which has lat/long information , then I create points using lat/long and I plot those points ...
2
votes
2answers
830 views

Is it possible to reproject KML using ESRI's Javascript API?

Specifically into NAD83. Google tells me that KML only supports WGS84, but I can't seem to find much info on being able to reproject KML using ESRI's Javascript API. Basically, I've got this base ...
1
vote
1answer
2k views

replacing dijit.ComboBox with dijit.Select results in error (ArcGIS Javascript API)

I am currently populating a Dojo ItemFileReadStore with the results of an ArcGIS query (Javascript 3.4 API), which is then passed to a Dijit COmboBox. I am now having problems with the ComboBox in iOS ...
1
vote
1answer
244 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
1k views

Projection problem with ESRI JSAPI and ArcGIS map service

I was trying to obtain a gpx file with some coordinates by drawing on an Openlayers map with an ArcGIS baseMap. When I draw the polyline and create the gpx, if I open it on Google Earth, what I see ...
1
vote
1answer
637 views

Adding curved features to map with ArcGIS API for JavaScript?

I've tried without much success to add a curved line feature to the ArcGIS JavaScript map. I created a polygon with a curved edge in ArcMap: curved line http://imageshack.com/a/img538/9702/p6mj9B....
0
votes
2answers
925 views

Simulate a mouse-click inside an ArcGIS Online JavaScript Application

I have a JavasScript application consuming an ArcGIS Online Web Map. I want to open a default popup at a specific coordinate. Is there a way to simulate a mouse-click at that point, or a better ...
0
votes
1answer
296 views

How to configure web map data layer that can accept csv data uploaded by user?

I made this map: http://tinyurl.com/a368268 on arcgis online. How do I get the same map but instead you can upload a new csv every time? Instead of having to first add it as data layer on arcgis ...
0
votes
1answer
713 views

Difference between Graphic() or a FeatureLayer() in ArcGIS

I've been adding paths and markers on my maps with the Graphic() service, but I know you can do it all with multiple FeatureLayer(). What is the main difference between doing it all with one or the ...
10
votes
5answers
4k views

what is the right way to delete all features from featureLayer

I have a featureLayer and I don't want to kill it and create another one. I want to delete all features from the current featureLayer. I found that I can use applyEdits method but in order to use it I ...
8
votes
2answers
11k views

Adding a FeatureLayer ARCGIS JavaScript API

I am currently exploring ArcGIS JavaScript API. I have my own map services and feature services up on my local server. I would want to use the FeatuerLayer to select and highlight feature on the map. ...
6
votes
1answer
1k views

What server and API to use for displaying complex polygons with dynamic symbology?

Background I need to interface a map into an existing website which allows the user to query a database and which currently results in a table listing population statistics per county. For example, ...
5
votes
1answer
808 views

Using download JavaScript code option of ArcGIS Online without getting basemap too?

I am trying to create a Web App, using the ArcGIS Online feature of downloading the javascript code, with the map id being used for connecting to the ArcGIS Online. I was able to do that successfully ...
5
votes
3answers
878 views

How do I use the Terrain with Labels basemap in the Map constructor

Seems like all the other basemaps can be used in the esri.Map() constructor, but this one doesn't have a corresponding entry in the list of acceptable values. I've tried just "terrain", and it didn't ...
5
votes
2answers
2k views

Force an ArcGIS API for JavaScript WMSLayer to use EPSG: 900913 (instead of 102100)

I have a use case where an external WMS server can serve maps in the Web Mercator projection using EPSG code 900913, but won't recognize ESRI's 102100 code. My question is: can I force all WMS ...
5
votes
1answer
686 views

Change Order of Features in Popup with ESRI ArcGIS Javascript API

I am using version 3.12 of the ESRI ArcGIS Javascript API and have noticed that the order of the features that show up in my info window popup does not correspond to the order layers those features ...
5
votes
2answers
2k views

Set definition expression from click event

I'm trying to set a definition expression according to a user-selected value from a drop down menu, but I can't get the map to update the feature layers according to the expression. The user is able ...
4
votes
2answers
3k views

Identify all layers on the map without pre-designing the infoWindow

This applies to the ArcGIS Server JavaScript API 2.4. The Identify Task sample shows how IdentifyTask can be used to find features in multiple layers, as specified in the IdentifyParameters: ...
4
votes
1answer
3k views

Automating Pop up configuration of web app in ArcGIS for Portal?

I have been tasked to customize several hundred layers (pop up windows) in Portal for ArcGIS (web app). I was wondering if there is a faster way to accomplish this, instead of using the on client pop ...
4
votes
1answer
2k views

TypeError: featureLayer.fields is undefined from ArcGIS API for JavaScript

When working with the ArcGIS API for JavaScript, I have been getting an error in FireBug when trying to execute the following script: var featLayerURL = "http://sampleserver1.arcgisonline.com/ArcGIS/...
4
votes
1answer
4k views

ArcGIS JavaScript API Select Features

I'm having some trouble using the selectFeatures method with a feature layer. The code below builds a query using input text. If anyone has any pointers on what I could be doing wrong here, it'd be a ...
4
votes
3answers
2k views

Adding Layer using esriRequest Response in ArcGIS API for JavaScript?

For various reasons I need to add layers to a map object using a response returned by an esriRequest to an ArcGIS Server. One reason being the data will change constantly and hard coding FeatureLayer ...
3
votes
2answers
4k views

How to zoom to feature when clicking on drop-down list box item with ArcGIS JS API?

I am developing a web application with ArcGIS JS Api that is similar to this smart campus: UCSB Interactive Campus Map. Here, in the Building drop down list box, you can select a building, and the ...
3
votes
1answer
772 views

UTM NAD 1927 to DMS

I have requirement to convert UTM NAD 1927 Northing (4804172), Esting(753352) to Geographic coordinatesystem(Degrees Minutes, Seconds). Iam doing like below m_mapPoint[0] = new esri.geometry.Point(...
3
votes
3answers
2k views

Defining spatial reference for WMS layer in ArcGIS API for JavaScript?

I'm just starting with the ArcGIS Javascript API, and I'm having some issues adding layers from my geoserver to my basic map application. I started with the WMS resource info sample from the ESRI ...
3
votes
1answer
817 views

Identify with Layer Toggling

I have spent some time reading the numerous threads about setting the identify task to work with layer toggling and I seem to have it working properly except for one small issue. The identify task ...
3
votes
1answer
555 views

ArcGIS Javascript API - How to submit a defect?

I would like to know the best way to notify ESRI of a possible defect in the JSAPI and gis.stackexchange seems like the best mechanism for doing so (Derek reads it and fixes it). That being said, ...
3
votes
1answer
1k views

Adding image watermark to map via ArcGIS API for JavaScript?

i need to use a png as a watermark for a map that is generated via javascript api. Don't know how to do that. I'm using ArcGIS 10.1
3
votes
2answers
6k views

How to Use Custom Basemaps with BasemapToggle widget?

I'm trying to upgrade my app from version 3.3 to version 3.7 of the JavaScript API and am switching out the basemap gallery for the new BasemapToggle widget. I have two custom basemaps that I want to ...
3
votes
1answer
1k views

Does the ArcGIS Javascript API support multiple map service urls per layer?

I've called tilecache from OpenLayers in the same manner as the example below. Is it possible to do something similar with the ArcGIS WMS map layer? var urlArray = ["http://tilecache.osgeo.org/wms-c/...
3
votes
1answer
619 views

Need help: Sorting elements of a combo box in ArcGIS Java script API (ver. 2.8)

I am using sorting elements in combo box in ArcGIS Java Script API (v.2.8) & for sorting I am using “ fetchProperties="{sort:[{attribute:'name', descending:false}]}". All entries in combo box are ...
3
votes
3answers
3k views

How to count point features in polygon using ArcGIS API for JavaScript?

I have published in my ArcGIS Server two layers: A polygon one and a point feature one. Points are contained in polygons. I would like to know how to count the number of points belonging/contained to ...
3
votes
2answers
5k views

ArcGIS API for JavaScript - error in Dojo parser.parse()

I started creating a Dijit based on a template HTML file. I started by referencing Dojo CSS and JS directly, and all was fine. Later when I wanted to add a map into my dijit, first - changing ...
3
votes
0answers
485 views

ArcGIS for Javascript : Locate Widget Activate Popup for Layers X > Z? [duplicate]

Using ArcGIS for Javascript I have a map with a City Council District feature layer. I would like for the user to enter their address in the 'Address Finder' / Locate Widget (that's what it's called ...
3
votes
2answers
501 views

getResultImageLayer is not working

I am trying to obtain the shapefile output that I am receiving from the gpTool, which is hosted on the ArcServer, and placing it on the Map using, gp.getResultImageLayer(jobInfo.jobId,"final_shp", ...
2
votes
1answer
1k views

Displaying labels created using LabelLayer only at certain scales in ArcGIS API for JavaScript

I am using ESRI Javascript 3.7 framework to develop a map application, in it I am trying to display labels created using LabelLayer at certain scales only, say from 1:1 to 1:500 scale only. How can I ...