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

Need Basic Viewer template for ArcGIS JSAPI 3.2/3.3

I am looking for basic viewer for ArcGIS JSAPI but not getting proper sample/example. I am going through ArcGIS resource also but looks like its not working. Going through this question also. ...
8
votes
2answers
4k views

Restricting base map on specific extent in ArcGIS API for JavaScript 3?

Currently I am using ArcGIS JS API ver 3.3/3.5 in my application. I want to restrict the basemap for US only .For example one can use default navigation features like zoom in, zoom out for the US ...
13
votes
4answers
5k views

Which framework is best to implement an application robustly, using ArcGIS Server JS API?

Over on the Esri forum, user Matt Moyles suggested that the approach used in the Esri JS samples isn't suitable for robust development of a web mapping application using HTML, JavaScript and CSS: ...
11
votes
3answers
14k views

Using own basemap with ArcGIS API for Javascript?

I'm trying to make a map using the Javascript API. I want to use my own basemap, but I can't find the most simple code to do this. I always see something like this: function init() { map = ...
3
votes
2answers
3k views

export map state as JSON: Web_Map_as_JSON

Is there a way to export the current map state as a JSON object, mostly named Web_Map_as_JSON. The JSON specification should be like this. In other words, it would be convenient to have a function ...
4
votes
1answer
4k views

Toggle Toolbar Button and Activate Identify

I already asked how to toggle an identify button in a previous question, and was given the correct answer to the question, but when I tried to implement it into a toolbar that would disable the ...
2
votes
2answers
2k views

Add a legend in an ArcGIS Javascript API

I am quite new to Javascript. I have made a html script that includes services I published to ArcGIS for server. It all does exactly what I want and I made it by copying working scripts together and ...
2
votes
2answers
4k views

Displaying 3D maps in ArcGIS JavaScript API 3?

We are going to create 3D maps in ArcGIS Desktop with the help of 3d analyst extension and then I want to integrate those maps with ArcGIS Java Script API 3.2/3.3 (after publishing maps on server 10.1)...
15
votes
3answers
3k views

Visualising clustered features in web maps?

I'm looking for the best symbol to display clustered features in the ArcGIS Server JS API. I don't like the "fly-out" animated cluster symbol, as used in the Silverlight API clustering or the JS ...
28
votes
6answers
8k views

What are differences between ArcGIS Web APIs (JavaScript/WPF/Silverlight/Flex)?

Esri currently offers 3 different web API's that can be freely downloaded. Are they all equal? If not, what are the relative strengths/weaknesses of each of these API's?
4
votes
1answer
6k views

Changing ArcGIS Server 10.1 port (6080 to 8080)

Due some network issue (Maps are not displaying in secure environment), I want to change the default port 6080 to 8080. I am going through Web help and few links in which they mentioned that install ...
10
votes
3answers
4k views

Restrict pan and zoom in ArcGIS Javascript API? [duplicate]

I'm creating a web map of a university campus. I have the map functioning, but I don't want to be able to pan off of the basemap, into whitespace. Do you know of a function that will auto-pan the ...
5
votes
2answers
7k views

Calculating distance between two points with esri.geometry in ArcGIS API for JavaScript?

The function getLength(point1, point2) should calculate distances between two points. When I am trying to calculate distance between points having 100 meters between them p1=new esri.geometry.Point(...
4
votes
1answer
7k views

automatic zoom to layer in arcgis js api

I'm trying to zoom to layer automatically as soon as the map finishes loading using the guide here. To be clear, I'm only loading one layer and just want to zoom in on one of the layers provided by ...
4
votes
2answers
4k views

Hiding infoWindow of ArcGIS API for JavaScript while using measure tool?

In my Javascript API Web application I'm using the infoWindow to query a parcel layer and display display information in a popup when I click the parcel. I've set this functionality to turn on and off ...
4
votes
2answers
531 views

Adding large amount of data to web map using ArcGIS API for JavaScript?

I've got problem, I'm creating map based application, and now I have to add to map about 100 000 graphic points, from coordinates. I was trying in many ways to do it, but always process of adding ...
16
votes
1answer
7k views

Is the ArcGIS Server JavaScript API free to use?

The 2008 blog post announcing the ArcGIS Server JS API says: Everyone can use the ArcGIS JavaScript API. There is no fee for using the ArcGIS JavaScript API or deploying an application built with ...
6
votes
4answers
3k views

Is there a 3rd party ArcGIS viewer (builder) for Javascript?

Esri provides an ArcGIS Viewer for Flex as well as an ArcGIS Viewer for Silverlight. Strangely though, there are no plans for a similar viewer for Javascript. Are there any 3rd parties that have ...
5
votes
2answers
9k views

ArcGIS Server Setting proxy.ashx with ArcGIS API for JavaScript gives Error 403?

I am trying to set up the proxy for my web application because the request exceeds 2000 characters. I set up the proxy as described in ESRI site. When I run my application I get the error as shown ...
2
votes
2answers
4k views

Spatial query in ArcGIS Javascript Api 3.1

I have scenario in which I have to select features drawing a polygon and and get the attribute values in to a tables or lists.The features on the map consist of polygon, line,point at the same time so ...
2
votes
2answers
2k views

ArcGIS javascript API Extent formats

I am trying to understand how the extent works in the javascript api. I create an extent like the following: var beginExt = new esri.geometry.Extent(-159.6716766, 19.520, -67.843, 64.8348, new ...
1
vote
1answer
2k views

How to determine the accuracy of getFeatureInfo on a WMS layer?

I have added a WMS layer to the ArcGIS Server JSAPI and am attempting to query it using getFeatureInfo when the user clicks on the map. This is mostly working, except that the accuracy of the ...
1
vote
1answer
1k views

Configurable Map Viewer (CMV) - Configure dynamic layer to not display all sub-layers?

Using the example below, from the CMV, what would be the best way to not show the Fire Stations layer in the Louisville Public Safety map service assuming I wanted to see everything else and I wanted ...
0
votes
1answer
741 views

Creating if-else condition with ArcGIS API for JavaScript combo boxes?

I have an ArcGIS JavaScript API Web App that uses multiple combo boxes. I would like to create an if-else conditional statement between two fields in my feature layer. If one field is chosen in ...
0
votes
2answers
127 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 ...
31
votes
3answers
3k views

Is there a “Select by Attributes” plugin/widget for ArcGIS Server JS API?

I'm hoping to find some existing code which emulates the "Select by Attributes" dialog in ArcMap, within the ArcGIS Server JavaScript API. Writing a hard-coded QueryTask is easy - I'm looking for ...
7
votes
2answers
32k views

Making heat maps using ArcGIS?

I want to prepare the heat maps so what parameters are required for that?? I have large point data (I want to represent the density on the map) I gone through the following posts : How to build ...
7
votes
2answers
3k 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 ...
14
votes
3answers
6k views

Identifying layers from multiple ArcGIS Server instances using ArcGIS API for JavaScript 2?

This applies to ArcGIS Server 9.3 with the JavaScript API 2.4. My goal is to click on the map and have the Identify task run on all visible Dynamic layers. IdentifyTask requires a URL to the REST ...
12
votes
5answers
6k views

Looking for a Table of Contents sample for the ArcGIS Server JavaScript API

Where can I find an example of a Table of Contents control to plug into the ArcGIS Server JavaScript API 2.3? Ideally it should support feature/dynamic/tiled layers; show symbology; and allow grouped ...
11
votes
5answers
6k views

CORS issue ArcGIS 10.1 IIS (Cross Origin Resource Sharing)

I have ArcGIS 10.1 installed with the web adapter for IIS. I've added a config file to the root of IIS7 to enable Cross Origin Resource Sharing (CORS) as per this page. I've pushed the cors enabled ...
4
votes
3answers
5k views

Printing with ArcGIS API for Javascript?

Any examples of how to print a map using the ArcGIS API for Javascript (JSAPI)? All from the client?
8
votes
3answers
3k views

Moveable ArcGIS Identify Popup Window (Dojo)

I'm trying to get a popup window that identifies a location to be moveable. My code is similar to the API example: var popupOptions = { fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol....
11
votes
3answers
2k views

What is the future of ArcGIS web development ? Is it JavaScript and HTML5? [closed]

I want to know about the future of ArcGIS web development; is it HTML5? I used to work with ArcObjects and .NET Web ADF so what is the best technology I must follow, especially when I know that ...
5
votes
2answers
2k views

Different legend properties with ArcGIS API for JavaScript

I have a map template that I use to display a variety of feature layers and dynamic layers. I have found a snippet of code to add the legend to my map: //add the legend dojo.connect(myMap, '...
4
votes
2answers
5k views

Compute Angle of line in conventional bearing using ArcGIS API for JavaScript?

I am trying to compute angle between two lines (line segment) using ESRI (ArcGIS, JS) in conventional bearing (Eg: N29'E) I am using Add Toolbar to draw a line segment where point A is a fixed point (...
2
votes
3answers
778 views

Change SDE Version in ArcGIS JavaScipt API depending on connected user

I am programming for an web editing application with ArcGIS API for JavaScript. I've published a version of ArcSDE with Feature Acces and I need to know how can I change in the web application from ...
2
votes
1answer
3k views

Why isn't my ArcGIS JavaScript QueryTask working?

var map; require([ "esri/map", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/ImageParameters", "esri/tasks/QueryTask", "...
1
vote
2answers
4k views

Convert spatial Geographic data from sql server 2008 to Json

Is there any example to convert spatial data (point,line,polygon) stored as geographic in sql server 2008 into Json and display data using Arcgis Javascript Api 3.0.I have tried converting geographic ...
7
votes
2answers
2k views

Using FeatureLayer as pure client side query in ArcGIS API for JavaScript?

I've created this wrapper around feature layer where I create the empty feature layer as is in the API help page : new FeatureLayer(featureCollectionObject, options?) providing the first ...
7
votes
2answers
2k views

Styling a Chart within a Popup

I have a dojox bar chart on my app, that is populated from a QueryTask everytime the extent changes. I am making use of the Tufte theme (the only one that has a transparent background), and ...
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 ...
6
votes
2answers
1k views

Rendering huge amount of points? [closed]

I am new to ArcGIS, and currently developing a small app that uses ArcGIS JavaScript API. I have encountered a couple of problems while working on this. I have about 5000 points that I am returning ...
6
votes
2answers
2k views

How To Use Tiled Map Services with Different Spatial References in ArcGIS API for JavaScript?

I have the following code fragment in an esri page to try and change basemaps, the following code works, unless the next basemap layer uses a different spatialreference. if (baseMap) _map....
6
votes
1answer
2k views

Using toggle button with ArcGIS API for JavaScript?

I am trying to use two toggle buttons which have been added to a map to toggle layers on and off in my simple web application. I am having problems getting the toggle button to respond when clicked or ...
6
votes
1answer
1k views

Toggle Identify with Button

I am attempting to set up an Identify button that will only allow the identify functionality to be performed when the button is pressed. I have gotten to the point that the identify only works when ...
6
votes
4answers
12k views

FeatureLayer creating in javascript ArcGIS API

I got the sample called "Feature Layer with ONDEMAND mode" in the ArcGIS for js resource center. This example just adds layer with rivers to the map. I want to use my own features instead of using ...
6
votes
1answer
1k views

Looking for Alternatives to Google gmaps utility widget for ArcGIS JSAPI API

I have been using https://code.google.com/p/gmaps-utility-gis/ as a solution to displaying Google imagery as a base layer on a ESRI JSAPI map. With the advent of JSAPI 3.4 and full AMD support this ...
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
670 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 ...