Questions tagged [arcgis-js-api]

The ArcGIS API for JavaScript is a lightweight way to embed maps and tasks in web applications. You can get these maps from ArcGIS Online, your own ArcGIS Server or others' servers.

The ArcGIS API for JavaScript is a lightweight way to embed 2D or 3D maps and tasks in web applications. You can get these maps from ArcGIS Online, your own ArcGIS Server or others' servers.

More info: https://developers.arcgis.com/javascript/

Depending on your question, it may make sense to ask it over in the GIS StackExchange

804 questions
374
votes
16 answers

"Uncaught SyntaxError: Cannot use import statement outside a module" when importing ECMAScript 6

I'm using ArcGIS JSAPI 4.12 and wish to use Spatial Illusions to draw military symbols on a map. When I add milsymbol.js to the script, the console returns error Uncaught SyntaxError: Cannot use import statement outside a module` so I add…
Jerry Chen
  • 4,199
  • 2
  • 9
  • 13
31
votes
10 answers

How to convert from UTM to LatLng in python or Javascript

I have a bunch of files with coordinates in UTM form. For each coordinate I have easting, northing and zone. I need to convert this to LatLng for use with Google Map API to show the information in a map. I have found some online calculators that…
Staale
  • 24,584
  • 22
  • 63
  • 85
19
votes
7 answers

How do I find the center of a number of geographic points?

If I have a series of points as longitude and latitude, how would I calculate the center of all of those points?
dvorak
  • 28,591
  • 4
  • 25
  • 29
13
votes
3 answers

ArcGIS Javascript - Zoom to show all points

I am trying to add some functionality that will zoom the map in/out depending on the points that are returned from a query. So for example, say we're zoomed in on the state of Texas. If I execute a query and the service returns back points that are…
John F.
  • 3,840
  • 5
  • 25
  • 38
9
votes
3 answers

How can I use Esri Arcgis Map in ReactJs Project?

I'm trying to use Esri map. To include map in my project, here is what I found: require([ "esri/map", "esri/dijit/Search", "esri/dijit/LocateButton", "esri/geometry/Point", "esri/symbols/SimpleFillSymbol", …
Muhammad Ateeq Azam
  • 863
  • 1
  • 10
  • 23
9
votes
2 answers

AngularJS + ArcGIS

I am trying to use ArcGIS JavaScript API inside an Angular application. As I see, it uses Dojo. So, I am trying to initialize ArcGIS from Angular directive like this: link: function (scope, element, attrs) { dojo.require('esri.map'); var…
Sergei Basharov
  • 43,294
  • 56
  • 177
  • 295
8
votes
3 answers

Remove all CSS rules

Is there a way to wipe out all CSS rules once style sheets have already been loaded? I have to use a proprietary JavaScript library (ESRI's ArcGIS Server API) which is built on top of Dojo. I make extensive use of Dojo's widgets and would like to…
Chris Cummings
  • 1,897
  • 4
  • 22
  • 36
7
votes
1 answer

ArcGis 3.5 issue with Requirejs

I am using ArcGIS 3.5 Javascript API and RequireJS I implemented it using this code: