arcgis-js-api

How to get get name of hospital or street in particular area when draw polyline through Javascript ArcGIS Api?

痞子三分冷 提交于 2021-02-11 14:24:46
问题 Actually I am using ArcGIS API for JavaScript 4.7. I want to get name of hospital or street in particular area when draw polyline . How to achieve that ? Suppose I draw a area through polyline. In this area there are some hospital or street ..etc . Now I need the name of hospitals or street within that area. the result look like :- [street1,street2, ...] , [hospital1,hospital2, ...] Update error :- esri.layers.graphics.QueryEngine", message: "Unsupported query" details: undefined} this error

Is there a way to load/update the data without removing feature layer and without flicker effect using arcgis javascript api 4

只愿长相守 提交于 2021-01-29 17:59:50
问题 I am creating a feature layer from feature collection by fetching data from external query service and adding to the map with some data. As per my project need I have to refresh the data on the map after every 5 seconds. To achieve this I am requesting data using external query and after getting the response data I am removing the previous feature layer and adding a new one. Issues : While adding the new layer on the map it takes a little time (~1 sec) to reflect the feature on the map which

How to sum the results of a fetch using multiple functions?

白昼怎懂夜的黑 提交于 2021-01-29 06:56:46
问题 I am working with OpenWeatherMapAPI to calculate the sum of precipitation for the previous 5 days. To do this I have 5 async functions with api calls using the fetch api. The data received, that concerns me, is the hourly historic weather data spanning a 24 hour period. Full code bellow . The json response is stored to a constant (Ex. const histData1 ) where it is then iterated through to sum all of one values over that given 24 hour period. Note: humidity is used as a proof of concept

How to sum the results of a fetch using multiple functions?

一世执手 提交于 2021-01-29 06:54:49
问题 I am working with OpenWeatherMapAPI to calculate the sum of precipitation for the previous 5 days. To do this I have 5 async functions with api calls using the fetch api. The data received, that concerns me, is the hourly historic weather data spanning a 24 hour period. Full code bellow . The json response is stored to a constant (Ex. const histData1 ) where it is then iterated through to sum all of one values over that given 24 hour period. Note: humidity is used as a proof of concept

Custon SVG icon on ArcGIS map widget

吃可爱长大的小学妹 提交于 2021-01-29 05:40:26
问题 I have to add a custon SVG file instead of the navigation icon from ArcGIS in the 'locate' widget ('esri-icon-locate'). Here the problem is, the default icon is appearing top of the custom svg file. Is there any way to hide the default icon? view.when(_ => { const n = document.getElementsByClassName("esri-icon-locate"); if (n && n.length === 1) { n[0].classList += " mapnavigation" } }); and the css, .mapnavigation:before{ display: block; background: url('mapnavigation.svg'); background-repeat

dojo multipleDefine error with mapkitJS and ArcGIS esri-loader

旧街凉风 提交于 2021-01-28 01:11:19
问题 I cannot figure out where MapkitJS and esri-loader are having issues together. From researching on here and elsewhere, it seems like there is likely a naming conflict with another package. Here is a link of the resolved issue for esri-loader . I read all the pages on that link. I have a site that uses both MapkitJs and ArcGIS . Mapkit has always worked fine until I brought in ArcGIS . Both scripts are lazy loaded via a provider. After reading about the issues, I wait until Mapkit is

CORS anywhere returning proxy text, not desired target resource

亡梦爱人 提交于 2020-12-15 05:01:47
问题 I am trying to set up a proxy using node, express, and an instance of cors-anywhere for my arcgis-js-api app. My server file looks like this: import express from 'express'; import cors from 'cors'; import corsAnywhere from 'cors-anywhere'; const { PORT } = process.env; const port = PORT || 3030; var app = express(); let proxy = corsAnywhere.createServer({ originWhitelist: [], // Allow all origins requireHeaders: [], // Do not require any headers. removeHeaders: [], // Do not remove any