Questions tagged [esri-javascript-api]

30 questions
6
votes
1 answer

@types/arcgis-js-api in angular 5 application

I am using arcgis-js-api types in my angular5 application. When i try to import the types in multiple components i am getting uncaught reference error: __esri is not defined. I have included arcgis-js-api to the types array in tsconfig.app.json…
5
votes
1 answer

Esri Maps PopupTemplate's content method called only once per feature

I am using Esri maps inside an Angular app, and I am rendering my popups as Angular components with data published from the PopupTemplate's content method: layer.popupTemplate = new PopupTemplate({ content: (feature: { graphic: __esri.Graphic })…
asgallant
  • 26,060
  • 6
  • 72
  • 87
4
votes
0 answers

Angular Injectable service that is dependant on DOM element

I am just grasping Angular (6) framework, and it's quirks and features. And there is this one thing, that I would need, but as it seems, it goes against Angular paradigms - a service, that needs a reference to DOM node. More specifically - Esri Map…
Wish
  • 1,594
  • 1
  • 18
  • 36
3
votes
2 answers

ESRI ArcGIS Javascript : Polygon from JSON not working

If you reference the image, JSON string, and code snippets below, it outlines the code, console output and expected behavior of trying to draw a polygon (or really any geometry/graphic) using the ESRI ArcGIS Javascript API. Not sure what is going…
JBizz
  • 53
  • 6
2
votes
1 answer

arcgis js API 4.7 error in Internet Explorer- "no native wasm support detected"

Im using ArcGIS JS API 4.7, in an angular 6 application. and using esri-loader to access esri methods within my angular services/components Using following versions.. "arcgis-js-api": "^4.7.2", "bootstrap": "^4.1.0", "core-js":…
2
votes
3 answers

How to call a JavaScript function that is inside a "define" - anonymous method

How to call a function which is defined inside an anonymous function but both in the same JS file. Here is my code snippet. How to call _testMethodInside() from testMethodOutside()? // Line 1 to 13 is an existing code from ESRI API define([ …
Dhana
  • 1,618
  • 4
  • 23
  • 39
2
votes
1 answer

Chart JS chart not rendering in ArcGIS popup when using navigation arrows

I'm putting a chart in the popup of my points. On the initial click, the popups display the chart and if I use the forward navigation arrow on the popup, the next chart renders. However, if I use the back arrow the chart will not render again. The…
1
vote
1 answer

arcgis api can't connect to wmts which has secret key

arcgis api for js can't connect to wmts sever with secret key the wmts sever increas Adding Key Verification before update: url:"http://t0.tianditu.gov.cn/img_c/wmts" after update: url:"http://t0.tianditu.gov.cn/img_c/wmts?tk=your secret key" my…
mikesui
  • 11
  • 2
1
vote
1 answer

Distance calculation between two points using esri javascript api

We are building a web application that uses an esri map. What i am trying to do is calculate the distance between two points. The coordinates for these points are in two separate json objects. Next i generate two esri points by parsing the latitude…
goodcat
  • 200
  • 2
  • 9
1
vote
0 answers

Graphic items not refreshing when dragging MapView

Is there any way to make the centered point to move whilst dragging the map? It seems currently its not possible to add graphics nor remove them whilst dragging happens. require([ "esri/Map", "esri/views/MapView", "esri/Graphic", …
CodeBox
  • 111
  • 4
1
vote
2 answers

How to create a Dash Line with alternative different colour in esri ? Can we achieve this using SimpleLineSymbol?

Example : -------------- here alternative dash with red and yellow color.
1
vote
2 answers

ESRI Maps setting MapView.extent cuts off top and bottom of extent in display

I have an ESRI map that I initialize with a given extent. When I draw the map with its initial extent, the extent of what is actually displayed is cut off by about 5-10%, so some features on my FeatureLayers lie outside the initial view. It seems…
asgallant
  • 26,060
  • 6
  • 72
  • 87
1
vote
1 answer

Javascript using ArcGIS: InfoWindow not showing values from field

I have a feature layer with specific countries on top of another feature layer showing all the countries of the world. If you click on these specific countries an info window pops up. The info window should show the name of the country. But it…
1
vote
1 answer

Getting popuptemplate from feature layer to pop up when selecting row from table using ArcGIS API for JavaScript?

Using esri javascript api 4.3 in an Angular 2 application. I initially generate the map using this code: ngOnInit() { this.map = new Map({ basemap: 'streets', }); this.map.layers.add(new FeatureLayer({ url:…
P. Lynch
  • 11
  • 4
1
vote
0 answers

return inner observable, from inside an observable

In an angular project, I have a service which needs to async load a library. To ensure that methods, which use this library, don't call it before it's loaded, I created an isLoaded ReplaySubject, which doesn't emit until the library has loaded. To…
Charlie Elverson
  • 1,180
  • 8
  • 18
1
2